- ADR: ADR 0369
- Title: Replace duplicated
require_*validators with a sharedscripts/validation_toolkit.py - Status: in_progress
- Branch:
codex/adr-0369-mainline - Worktree:
.worktrees/adr-0369-mainline - Owner: codex
- Depends On:
adr-0039-controller-automation-toolkit,adr-0048-command-catalog-pattern - Conflicts With: none
- restore
scripts/validation_toolkit.pyto the exact ADR 0369 module contents - keep
scripts/test_validation_toolkit.pyas a zero-dependency smoke test - move non-ADR YAML identity helpers out of
validation_toolkit.py - migrate every current-main script that still defines local duplicated
require_*helpers - verify each migrated script in its own validation mode before committing
- run the full
make validate-schemasgate once the full migration is complete
- changing protected release or mainline truth surfaces such as
VERSION,changelog.md,RELEASE.md, orREADME.mdbefore the final merge step - changing validator behaviour beyond the canonical ADR 0369 implementations
- introducing non-stdlib dependencies or packaging
scripts/as a Python module
docs/adr/0369-python-validation-toolkit.mddocs/workstreams/adr-0369-python-validation-toolkit.mdscripts/validation_toolkit.pyscripts/test_validation_toolkit.pyscripts/identity_yaml.pyscripts/generate_cross_cutting_artifacts.pyscripts/generate_ops_portal.py- the current scripts returned by
git grep -l "def require_mapping\\|def require_str\\|def require_list" origin/main -- scripts/*.py workstreams/active/adr-0369-python-validation-toolkit.yamlworkstreams.yaml
python scripts/test_validation_toolkit.py- one per-script validation command for each migrated script
make validate-schemas
- ADR 0369 requires exact function signatures, docstrings, and error message
formats in
scripts/validation_toolkit.py; treat that file as a copy-exact contract, not a design space. origin/maincurrently contains extra helpers invalidation_toolkit.py; those must live elsewhere before the module can match the ADR again.- Several remaining scripts use local validators for duplicate-detection or
domain-specific parsing. Keep the domain-specific logic, but rename those
helpers away from
require_*when they are not canonical toolkit functions.