Skip to content

id(world_fixture): tic-tac-toe determinism fixture recorded under a module hash the checked-in wasm no longer matches — replay test red on main #5021

Closed

Description

@dezren39

id(world_fixture): tic-tac-toe determinism fixture was recorded under a module hash the checked-in wasm no longer matches — replay test red on main

Evidence

Verified on the laptop at origin/main 27f12c6 (also failing at eef89b9), file-captured logs /tmp/scan20-full.log and /tmp/scan20b.log:

cargo test -p id --lib -- checked_in_session_snapshot_hashes
test world_fixture::tests::replay_tests::checked_in_session_snapshot_hashes_are_stable ... FAILED
panicked at src/world_fixture.rs:1175:56:
called `Result::unwrap()` on an `Err` value: the module hashes to
a3fbe44805adfbec2fe7000dc9440af23171da997ca088d13f150debe4a3c583,
but the fixture was recorded under
8aaca464562944fa0832a9d42e97c838cad45a58fc8a12c293f3a222d884b9f9
  • pkgs/id/src/world_fixture.rs:328-339 — check_module compares the fixture header's recorded module_hash against module_hash(wasm) and refuses a mismatch; the test at :1175 unwraps it.
  • The module under test is the checked-in pkgs/id/apps/tic-tac-toe/program/tic-tac-toe.wasm (world_fixture.rs:1082); the fixture is pkgs/id/tests/fixtures/tic-tac-toe-determinism.jsonl, whose header records the older hash.
  • So one side drifted: either the wasm was rebuilt/changed without re-recording the fixture, or the fixture was re-recorded against a wasm that was never committed. The test never reaches the snapshot comparisons, so the determinism guarantee this fixture exists to pin is currently unenforced on main.

Why it matters

This fixture is the replay/determinism tripwire for world programs: if the recorded snapshots ever genuinely diverge, this test is how the fleet finds out. While it fails at the module-hash gate, that protection is off and the red suite masks other failures.

Acceptance criteria

  • Determine which side is stale: rebuild the tic-tac-toe wasm from its committed source and compare hashes; if the committed wasm is the intended module, re-record the fixture against it (regenerating the snapshot expectations through the fixture's own recording path); if the wasm drifted unintentionally, restore/rebuild the correct wasm instead.
  • cargo test -p id --lib world_fixture passes on main, including the snapshot-hash comparisons (not just the module gate).
  • The resolution states, in the closing comment, which side was stale and what changed it.

Activity

  1. added
    kind/testTest coverage, test infrastructure, or test-only fixes
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 3, 2026
  2. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

    • Agent: new-issue-creator job (new-issue-creator-code-b)
    • Session / ID: cron new-issue-creator-code-b, run 2026-11-03T16:27Z
    • Found via: filed this run
    • Task: Filed after verifying on the laptop at origin/main 27f12c6 that the tic-tac-toe determinism replay test fails at the module-hash gate: the fixture header records 8aaca464… while the checked-in wasm hashes to a3fbe448…. Queued as a triage packet to determine which side is stale before fixing.
    • Expectation: effort/s — done when the stale side is identified and corrected and cargo test -p id --lib world_fixture passes on main, with the closing comment naming which side was stale.
    • Links: evidence in the issue body; packet packet-5021-triage.json (repo-health-code-pilot)
  3. added a commit that references this issue on Nov 3, 2026
  4. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Fixed in PR #5171 (merged). The fixture was the stale side. What changed it: 168db50f7 (queue/7636-1064-abi-spec-conformance) updated the tic-tac-toe build.sh and recommitted the rebuilt wasm (69,319 -> 69,345 bytes) without re-recording the fixture, leaving its header at the previous build's module hash.

    The rebuild is behavior-identical — proven by the replay test itself: with only the header module_hash updated to the checked-in module's hash (a3fbe448...), checked_in_session_snapshot_hashes_are_stable runs the full replay and all five snapshot digests plus the final records match the expectations recorded under the old module. The wasm itself is untouched (consumed as checked in, never regenerated). Verified: cargo test -p id --lib world_fixture 27/27 green, and the collateral cli_integration test test_world_verify_rejects_agree_but_mismatch_header passes again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/testTest coverage, test infrastructure, or test-only fixespriority/normalOrdinary priority (the default)queue/queuedHas a queued task in the Supabase agent queuesource/creatorFiled by the new-issue-creator jobstatus/needs-triageNot yet triaged; needs a first looktask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions