refactor(taxonomy): pin the CLI registry == schema both ways; drop dead instance_segmentation (#1005)#189
Open
LukasWodka wants to merge 1 commit into
Open
refactor(taxonomy): pin the CLI registry == schema both ways; drop dead instance_segmentation (#1005)#189LukasWodka wants to merge 1 commit into
LukasWodka wants to merge 1 commit into
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>
Contributor
Author
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.