refactor(P3b): move validator factories into the ModalityRegistry#255
Merged
Conversation
Second slice of P3 (backend#796). The 11-arm if/elif in utils/validators_mapping.map_validators moves VERBATIM into one factory per ModalitySpec (bodies in modalities/validators.py, attached via build_validators in the registry). map_validators is now a thin lookup: REGISTRY.get(cat) -> spec.build_validators(options); an unknown/None category still returns [] (kept loud by test_category_congruence, which requires every schema category to resolve a non-empty set). Behaviour-identical: the validator sets are byte-for-byte the same (verified per category). Full suite 1033 passed, 97.3% coverage; modalities/validators.py and the new validators_mapping shim are 100% covered. Stacked on #253 (P3a). P3c (sidecar transfer plan; folds in semseg / #136) follows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
Author
|
👋 Heads-up — Code review queue is at 15 / 8 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
This was referenced Jun 15, 2026
Merged
fix(label): strip whitespace from label values to prevent silent class duplication (issue #261)
#262
Merged
fix(dataset rm): delete staging files from a uid-65532 pod, not jobs-manager (#259)
tracebloc/cli#78
Open
divyasinghds
previously approved these changes
Jun 15, 2026
…ators-registry # Conflicts: # tracebloc_ingestor/utils/validators_mapping.py
divyasinghds
approved these changes
Jun 15, 2026
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.
Second slice of P3 (epic backend#796). The 11-arm
map_validatorsif/elif moves verbatim into one factory perModalitySpec(modalities/validators.py, attached viabuild_validators).map_validatorsis now a thin registry lookup.Stacked on #253 (P3a) — base is the P3a branch; retargets to
developwhen P3a merges. Diff shows only the P3b slice.Behaviour-identical: validator sets byte-for-byte the same (verified per category). Full suite 1033 passed, 97.3%; new modules 100%.
test_category_congruence+test_validators_mappingpass unchanged.P3c (sidecar transfer plan; kills the mask_id leak; closes semseg #136) follows.
🤖 Generated with Claude Code