[issue #99] Validate workflow template role ids against role and model registries in CI - #123
[issue #99] Validate workflow template role ids against role and model registries in CI#123Saber5656 wants to merge 3 commits into
Conversation
…registries in validate_all
…gative coverage
|
Warning Review limit reached
Next review available in: 31 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Milestone M0 (contract hygiene) of the deterministic-harness migration (epic #120); unblocks deterministic role binding (#110). Adds a fail-closed CI validation that resolves every
steps[].roleof every active workflow template against the role sources, and fixes the existing silent contract drift (tech-implementerdeclared nowhere).Changes
organization/runtime/workflows/scripts/template_role_validator.pyorganization/runtime/workflows/registry.yaml(status=active: 6 templates / 21 steps) and resolves eachsteps[].roleagainst three sources: theorganization/roles/<id>/directory, the role registry (role_layers), and the model registry (Model Routing table).status=activerows resolve; non-active roles fail withmodel_registry_entry_not_active, missing/empty status withmodel_registry_status_missing, unknown status values withmodel_registry_status_invalid— all typed errors naming template file, step, and role id. Parse errors and missing registries fail closed.organization/runtime/workflows/templates/standard_code_change.yaml: implement-step roletech-implementer→tech-backend(exists in the role directory and both registries, and matches how other code-change templates assign the implementation role).scripts/validate_all.py: validator registered inCONTRACT_CMDS, so.github/workflows/validate.yml(push/PR) runs it with no workflow changes.organization/runtime/workflows/tests/test_template_role_validator.py(5 cases) including end-to-end negative coverage: a fixture with an unknown role id run as a subprocess asserts typed JSON errors, non-zero exit, andvalidate_allcontract failure (run_contract→result=fail).Testing
python3 organization/runtime/workflows/scripts/template_role_validator.py→decision: ok, 6 active templates / 21 steps, no errors.python3 organization/runtime/workflows/tests/test_template_role_validator.py→ pass (5 cases).python3 scripts/validate_all.py→result: pass(42 suites incl. the new one, contracts incl. the new validator).role_directory_missing,role_registry_entry_missing,model_registry_entry_missingwith non-zero exit propagating to a contract failure.Review
tech-qarole review (independent session), two rounds:statuscolumn ignored (reference/deprecated roles accepted → silent drift); (2) negative test covered only direct function calls, not the CLI exit → validate_all propagation.Closes #99
🤖 Generated with Claude Code