Skip to content

refactor(P3b): move validator factories into the ModalityRegistry#255

Merged
divyasinghds merged 2 commits into
developfrom
refactor/p3b-validators-registry
Jun 15, 2026
Merged

refactor(P3b): move validator factories into the ModalityRegistry#255
divyasinghds merged 2 commits into
developfrom
refactor/p3b-validators-registry

Conversation

@LukasWodka

Copy link
Copy Markdown
Collaborator

Second slice of P3 (epic backend#796). The 11-arm map_validators if/elif moves verbatim into one factory per ModalitySpec (modalities/validators.py, attached via build_validators). map_validators is now a thin registry lookup.

Stacked on #253 (P3a) — base is the P3a branch; retargets to develop when 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_mapping pass unchanged.

P3c (sidecar transfer plan; kills the mask_id leak; closes semseg #136) follows.

🤖 Generated with Claude Code

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>
@LukasWodka

Copy link
Copy Markdown
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.)

divyasinghds
divyasinghds previously approved these changes Jun 15, 2026
@divyasinghds divyasinghds self-assigned this Jun 15, 2026
…ators-registry

# Conflicts:
#	tracebloc_ingestor/utils/validators_mapping.py
@divyasinghds divyasinghds merged commit ff6c5a1 into develop Jun 15, 2026
3 checks passed
@divyasinghds divyasinghds deleted the refactor/p3b-validators-registry branch June 15, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants