Uh oh!
There was an error while loading. Please reload this page.
refactor(taxonomy): pin the CLI registry == schema both ways; drop dead instance_segmentation (#1005) - #189
Conversation
…ad instance_segmentation (#1005) The task taxonomy lives in 5 hand-synced copies across 3 repos; the only divergence today is instance_segmentation — present in the CLI registry (16th entry) but deliberately absent from the ingest.v1 schema + the ingestor registry. #1005's "decide first" question (planned vs dead) is settled by the ingestor: instance_segmentation is DEAD — it "briefly shipped with no validators and no file transfer, so configs half-ingested" and was removed (data-ingestors constants.py, #240/#99). So this drops it from the CLI, rather than keeping a misleading "not implemented" placeholder. - Remove instance_segmentation from categoryRegistry (registry now == the schema enum, 15 == 15) and from the two tests + code comments that named it as a known/pending category. It now falls to the "unrecognized category" gate like any other non-category (still exit 2; test unchanged in outcome). - Add TestRegistryWithinSchema — the reverse of the existing TestRegistryCoversSchemaCategories (schema ⊆ registry). Together they pin registry == schema BOTH ways, so the registry can neither fall behind the schema (a valid --category rejected as "unrecognized" — the token_classification RC drift) nor carry an extra the ingestor won't accept (the instance_segmentation half-ingest class). A future known-but-unschema'd placeholder must be DECLARED in the new registryAliases allow-list (empty today), so an intentional superset is explicit, never silent — exactly the #1005 proposal. Factored the schema-enum parse into a shared helper. - Mutation-verified the new gate bites: re-adding instance_segmentation to the registry fails TestRegistryWithinSchema with an actionable message. This is the CLI third of #1005. data-ingestors already pins registry == schema (tests/test_category_congruence.py + test_schema_validation). Remaining: the backend copies (UserDataSet.CATEGORY_CHOICES + global_meta/constants.py) still carry instance_segmentation and aren't tied to the schema — a separate PR (it needs a choices migration, and global_meta is slated for deletion). Part of backend#1005 (ties RFC-0002 §9 / cli#174). Part of the data-ingest epic backend#1008. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
LukasWodka
commented
Jul 8, 2026
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6e40580. Configure here.
saadqbal
commented
Jul 9, 2026
Clean, well-reasoned PR 👍 Verified the core invariant directly against the embedded schema — enum is exactly 15, Only nit, non-blocking: the RFC (docs/rfcs/0002) still frames planned-vs-dead for |
Uh oh!
There was an error while loading. Please reload this page.
Summary
The task taxonomy lives in 5 hand-synced copies across 3 repos (#1005). The only actual divergence is
instance_segmentation— in the CLI registry (16th entry) but deliberately absent from the ingest.v1 schema and the ingestor registry.The "decide first" question (planned vs dead) is settled by the ingestor:
instance_segmentationis dead — it "briefly shipped with no validators and no file transfer, so configs half-ingested (DB rows + API records, zero files staged)" and was removed (data-ingestorsconstants.py, #240/#99). So this drops it from the CLI rather than keeping a misleading "not implemented" placeholder.What changed (CLI third of #1005)
instance_segmentationfromcategoryRegistry— registry is now == the schema enum (15 == 15) — and from the two tests + code comments that named it. It now hits the "unrecognized category" gate like any other non-category (still exit 2).TestRegistryWithinSchema— the reverse of the existingTestRegistryCoversSchemaCategories(schema ⊆ registry). Together they pin registry == schema both ways, so the registry can neither fall behind the schema (a valid--categorywrongly rejected as "unrecognized" — the token_classification RC drift) nor carry an extra the ingestor won't accept (theinstance_segmentationhalf-ingest class).registryAliasesallow-list (empty today) — an intentional superset is explicit, never silent. Exactly the #1005 proposal. Factored the schema-enum parse into a shared helper.instance_segmentationfailsTestRegistryWithinSchemawith an actionable message.Scope
test_category_congruence.py+test_schema_validation). ✔ Nothing needed.UserDataSet.CATEGORY_CHOICES+global_meta/constants.py) still carryinstance_segmentationand aren't tied to the schema — a separate PR: it needs achoicesmigration, andglobal_metais slated for deletion. #1005 stays open until that lands.Type
Tech-debt / correctness · cli · RFC-0002 foundation. Part of backend#1005 (ties RFC-0002 §9 / cli#174). Part of the data-ingest epic backend#1008.
Note
Low Risk
Category taxonomy and validation messaging only; no auth, staging, or submit path changes. Slight behavior change for the removed dead category string.
Overview
Aligns the CLI category registry with the embedded ingest.v1 schema enum by removing dead
instance_segmentation(not in schema/ingestor; previously caused half-ingest risk) and tightening parity tests.Registry & behavior:
instance_segmentationis gone fromcategoryRegistryand related docs/comments.--category=instance_segmentationnow follows the unrecognized category path (exit 2), not the known-but-unsupported message. README roadmap/status no longer lists it as a future CLI task.Tests: Adds
TestRegistryWithinSchema(registry ⊆ schema, with an explicit emptyregistryAliasesallow-list) alongside the existing schema ⊆ registry test, so registry == schema both ways. SharedschemaCategoryEnumhelper reads the embedded schema; hand-maintained expected lists and ingest gate tests are updated accordingly.Reviewed by Cursor Bugbot for commit 6e40580. Bugbot is set up for automated code reviews on this repo. Configure here.