Skip to content

Phase 13: automate config_version traceability lock and CI check#322

Open
hiroshitanaka-creator wants to merge 1 commit intomainfrom
codex/implement-config_version-check-and-automation
Open

Phase 13: automate config_version traceability lock and CI check#322
hiroshitanaka-creator wants to merge 1 commit intomainfrom
codex/implement-config_version-check-and-automation

Conversation

@hiroshitanaka-creator
Copy link
Copy Markdown
Owner

Motivation

  • Ensure config_version changes to Pareto/battalion settings are tracked and cause CI failures if lock is not updated, completing PHASE 13 (M4-C) governance requirement.
  • Provide a deterministic, auditable lock that maps each tracked config file to its version and file SHA-256 so unreflected edits are detected automatically.

Description

  • Add scripts/update_traceability.py which collects version and SHA-256 for tracked files and can write a lock or --check against docs/traceability/config_versions.lock.yaml.
  • Add docs/traceability/config_versions.lock.yaml containing current fingerprints for 02_architecture/philosophy/pareto_table.yaml and 02_architecture/philosophy/battalion_table.yaml.
  • Add tests/test_traceability_config_lock.py that asserts scripts/update_traceability.py --check succeeds and the lock contains expected paths/fields.
  • Inject a CI step into the test job to run python scripts/update_traceability.py --check so PR/merge runs will fail when the lock is stale.

Testing

  • Ran python scripts/update_traceability.py which updated/created docs/traceability/config_versions.lock.yaml successfully.
  • Ran pytest tests/test_traceability.py tests/test_traceability_config_lock.py -v and both traceability tests passed (7 passed).
  • Ran a broader pytest tests/ -v --maxfail=1 to 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

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +84 to +88
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

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.

1 participant