Closes #123 Implemented: Canonical severity ordering invariants for config_version_hash determinism #123 - #134
Conversation
…n_hash determinism - Add pub fn canonical_severity_order() as single source of truth - Refactor compute_config_version_hash to consume canonical_severity_order - Add 8 regression tests for severity ordering invariants and hash determinism - Add .config-version-hash.baseline for CI regression guard - Document severity iteration order as public ABI in event_schema.rs and CODEX_CONTEXT.md
|
Thanks for working through this — a canonical severity ordering is a nice piece of determinism work! Currently the Checks tab shows no completed runs for the four CI jobs that gate contracts here: That almost always means the per-PR workflow has not fired yet. Pushing a rebase (or an empty commit) onto latest |
Boos You need to click the "Approve and run" button on the Checks tab. for all four jobs to fire automatically. |
|
@Promise278 your CI cannot ru because you have conflicts, this isn't an approval issue. |
conflicts solved |
Problem
compute_config_version_hash iterated an inline literal array of severity symbols ([critical, high, medium, low]). Nothing in the test suite enforced that this ordering was load-bearing — a contributor re-ordering those four symbols would silently break backend parity forever. There was also no test asserting that adding a 5th severity wouldn't break the determinism guarantee.
Changes
Single source of truth (lib.rs):
Regression tests (tests.rs — 8 new tests):
CI baseline (.config-version-hash.baseline):