Repository navigation
Pin the expected seed-7/30-turn legacy baseline hash (REQ-MIGRATION-002) - #40
Conversation
Freezes the M0 golden reference per SPEC_CHANGELOG revision CODE_RUNTIME_QA_02: a new regression test asserts the normalized snapshot hash against a checked-in expected SHA-256, not just same-seed repeatability. Documents the seed, turn count, observed runtime and reproduction command in docs/spec/LEGACY_BASELINE.md, and updates the REQ-MIGRATION-002 row in IMPLEMENTATION_STATUS.md to reflect this pending evidence. Closes #39
REVIEW/QA verdict: PASS for REQ-MIGRATION-002 contentReviewed against the strengthened The patch is correctly bounded and closes the missing evidence gap without changing legacy economics:
No economic mechanism, normalization rule, runtime behavior or milestone scope needs correction in this PR. From the specification/QA side, this head is acceptable for independent ACCEPTOR merge review. After merge, a separate bounded evidence-reconciliation step should promote |
|
ACCEPTOR verdict: ACCEPT (posted as a comment — GitHub refuses a same-account review) Verified independently at head
Independent reproduction (worktree at e5f1e58):
Merging via squash. |
…43) * Prove the M0 legacy/canonical isolation boundary (REQ-MIGRATION-004) Adds a static cross-runtime reference scanner (src/diagnostics/isolationBoundary.ts) that audits src/**/*.ts and TradeCraftSimulation/**/*.cs for textual evidence one runtime names the other's implementation, with fixture-based negative-control tests proving the scanner rejects a genuine prohibited reference. Documents scope and limits in docs/spec/MIGRATION_BOUNDARY.md. Also reconciles the REQ-MIGRATION-002 row in IMPLEMENTATION_STATUS.md now that PR #40 (closing Issue #39) has merged at 6063ed9, per AUTHOR_RUNBOOK.md section 1. Closes #41 Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> * fix(isolation-boundary): close exclusion-bypass in guard-module filter excludingGuardModule matched any path containing the substring "isolationBoundary", so a genuine prohibited cross-runtime reference in a similarly-named file (e.g. src/domain/isolationBoundaryBridge.ts) silently escaped the real-tree audit. Both operator QA and the ACCEPTOR independently reproduced this against PR #43's head. Narrow the exclusion to exact, normalized repository-relative paths for the guard's own two files, and add a negative-control test that drives the fixture through the full auditRepositoryIsolationBoundary traversal (not just the pure scan) to prove the bypass is closed. Also correct MIGRATION_BOUNDARY.md, which named build-and-test as the check running npm test; per ci.yml that's the typescript job. Closes #41 --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Closes #39
Achieved outcome
The M0 legacy baseline is now frozen: a regression test asserts the seed-7,
30-turn normalized snapshot hash against a checked-in expected SHA-256 value,
not just same-seed repeatability against itself. This satisfies the
strengthened acceptance from
SPEC_CHANGELOG.mdrevisionCODE_RUNTIME_QA_02for
REQ-MIGRATION-002.Tested revision
e5f1e58f464e44f98adb463e4c54d6fd772e85b1Changed artifacts
TradeCraftSimulation.Tests/LegacyBaselineSnapshotTests.cs— addsExpectedSeed7Turn30Hash(the frozen golden SHA-256 for seed 7 / 30 turns)and a new test,
The_seed_7_thirty_turn_baseline_matches_the_frozen_expected_hash, thatasserts the current normalized hash equals it. The two pre-existing tests
(same-seed repeatability, different-seed non-collision) are unchanged.
docs/spec/LEGACY_BASELINE.md(new) — records the seed, turn count,observed runtime (.NET 9.0.19, target framework net9.0, ubuntu 24.04
linux-x64), the normalization/hash procedure, the expected value, and the
exact
dotnet test --filterreproduction command.docs/spec/IMPLEMENTATION_STATUS.md— updates theREQ-MIGRATION-002rowto reference this Issue/PR and the new proving test, and explicitly says
not to treat the row as
IMPLEMENTEDuntil this PR merges (at which pointa future run should record the merge commit).
Acceptance criteria
normalized hash against a literal checked-in SHA-256 measured from the
unchanged legacy runtime —
The_seed_7_thirty_turn_baseline_matches_the_frozen_expected_hash.different-seed sanity test remains intact — both pre-existing tests
unchanged and green.
independently of console formatting, in
docs/spec/LEGACY_BASELINE.md;demonstrated locally that the assertion fails with an intentionally
incorrect expected value (a run of all-zero digits), then restored the
valid value before committing (not part of the diff — done as a local,
uncommitted verification step; see Highest-risk area below for how a
reviewer can redo it).
normalization unchanged.
head (see Checks table).
proving test and this work item, does not assert an unknown merge
commit.
Checks
dotnet restoredotnet build --configuration Releasee5f1e58dotnet test --configuration Releasee5f1e58npm cinpm run typechecknpm testnpm run builddist/canonical.jsbuiltpython3 scripts/policy_guard.py --base masterpython3 -m unittest discover -s scripts/testsNot checked
Nothing required by this Issue's Verification section was skipped.
Assumptions and unknowns
docs/spec/LEGACY_BASELINE.md(.NET 9.0.19) is this run's CI/sandbox environment, not a claim about every
future CI runner. If a future runner resolves
net9.0to a different patchversion and that changes floating-point behavior enough to shift the hash,
that is baseline drift to investigate under the note already in the test
file and
LEGACY_BASELINE.md— not something this PR can rule out inadvance.
done locally by temporarily substituting an all-zero string, confirming the
failure, then restoring the correct value — it is not preserved as a commit
in this PR's history, only as the acceptance-criteria note above and as
something a reviewer can trivially redo by editing the constant.
Highest-risk area for review
The single frozen hash constant,
ExpectedSeed7Turn30Hash. If a reviewerwants independent confidence it is not a typo or a stale value, redo the
dotnet test --filtercommand indocs/spec/LEGACY_BASELINE.mdand diff itsoutput against the constant, or temporarily edit the constant and confirm the
test fails as expected.
Remaining gate
None for this Issue's scope. This PR does not merge itself — it is handed off
for independent ACCEPTOR review per
AGENTS.md.