Phase 13: automate config_version traceability lock and CI check#322
Phase 13: automate config_version traceability lock and CI check#322hiroshitanaka-creator wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea034b9711
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| current = lock_file.read_text(encoding="utf-8") | ||
| if current != expected: | ||
| print("Traceability lock file is stale.") | ||
| print("Run: python scripts/update_traceability.py") | ||
| return False |
There was a problem hiding this comment.
Enforce config_version bump on config content changes
The --check path only verifies that the committed lock file text equals a freshly rendered lock from current file contents, so changing pareto_table.yaml/battalion_table.yaml and re-running python scripts/update_traceability.py will still pass CI even if version was not incremented. This misses the governance contract in docs/spec/traceability.md ("config_version 更新 必須") and allows different config payloads to share the same runtime config_version, which breaks auditability of trace events that rely on that field.
Useful? React with 👍 / 👎.
Motivation
versionand file SHA-256 so unreflected edits are detected automatically.Description
scripts/update_traceability.pywhich collectsversionand SHA-256 for tracked files and canwritea lock or--checkagainstdocs/traceability/config_versions.lock.yaml.docs/traceability/config_versions.lock.yamlcontaining current fingerprints for02_architecture/philosophy/pareto_table.yamland02_architecture/philosophy/battalion_table.yaml.tests/test_traceability_config_lock.pythat assertsscripts/update_traceability.py --checksucceeds and the lock contains expected paths/fields.python scripts/update_traceability.py --checkso PR/merge runs will fail when the lock is stale.Testing
python scripts/update_traceability.pywhich updated/createddocs/traceability/config_versions.lock.yamlsuccessfully.pytest tests/test_traceability.py tests/test_traceability_config_lock.py -vand both traceability tests passed (7 passed).pytest tests/ -v --maxfail=1to sanity-check regressions which revealed one unrelated benchmark failure (tests/benchmarks/test_pipeline_perf.py::test_bench_deliberation_scaling), otherwise the suite exercised existing tests; the traceability change itself did not break traceability or schema tests.Codex Task