Skip to content

id(world_fixture): a partial fixture ending mid-epoch is record-compared anyway — final_epoch_covered checks only that an install exists, not that the window reaches the header sequence #4820

Closed

Description

@dezren39

id(world_fixture): a partial fixture ending mid-epoch is record-compared anyway — final_epoch_covered checks only that an install exists, not that the window reaches the header sequence

Summary

world_fixture::replay documents that a partial fixture's records "are
compared only when the retained window still covers the final program
epoch". The gate for that comparison, final_epoch_covered
(pkgs/id/src/world_fixture.rs), is only
events.iter().any(is_install) — it never checks that the window
actually reaches the header's current_sequence. decode /
check_window explicitly permit a partial window that ends early
("partial history may end earlier"), so a partial fixture whose last
install is in the window but whose events stop mid-epoch is compared
against the header's head records anyway: the replay can only produce
the records as of the last replayed event, so the verdict is a spurious
Mismatch, and id world replay --allow-partial fails (the command
bails on Verdict::Mismatch) on a fixture shape the format allows and
the docs say must not be compared.

Evidence (origin/main ea10fd0)

  • pkgs/id/src/world_fixture.rs check_window: for a non-complete
    header, sequenced events need only be contiguous and
    <= header.current_sequence; ending before current_sequence is
    accepted.
  • pkgs/id/src/world_fixture.rs verdict: when
    !header.complete && !final_epoch_covered it returns
    NotCompared("partial history"); otherwise it compares the replayed
    records with header.records.
  • pkgs/id/src/world_fixture.rs final_epoch_covered:
    events.iter().any(is_install) — no check that the last sequenced
    event reaches header.current_sequence.
  • pkgs/id/src/commands/world.rs replay_fixture: bails
    "the replayed records differ from the fixture's" on
    Verdict::Mismatch, so the spurious verdict is a command failure,
    not just a label.
  • Probe (laptop worktree at origin/main ea10fd0,
    pkgs/id/tests/probe_fixture_partial.rs against the real crate +
    the checked-in tic-tac-toe wasm): the complete fixture
    tests/fixtures/tic-tac-toe-determinism.jsonl replays to
    Verdict::Match (control). The same fixture truncated to a partial
    window — header complete:false, current_sequence 7 and head
    records unchanged, events cut after sequence 4 (the
    program_installed event at sequence 1 retained) — decodes Ok and
    replays under --allow-partial semantics to Verdict::Mismatch
    with the mid-game records, instead of NotCompared.

Why it matters

--allow-partial exists so retained-window fixtures remain usable for
determinism checks. A window that happens to contain an install but
was cut before the head (retention, a truncated copy, a hand-trimmed
fixture — all shapes decode accepts) now reports a false
"records differ" failure, indistinguishable from a real determinism
regression, and verify's header verdict inherits the same false
mismatch.

Acceptance criteria

  • A partial fixture whose sequenced events end before
    header.current_sequence is never record-compared: replay and
    verify report Verdict::NotCompared for it, whether or not an
    install event is in the window.
  • A partial fixture whose window contains the last install AND reaches
    header.current_sequence is still compared exactly as today
    (regression test with the tic-tac-toe fixture truncated at the front,
    not the back).
  • Complete fixtures are unchanged (the checked-in determinism fixture
    still verifies Match).
  • New tests in world_fixture cover both partial shapes; existing
    world_fixture and CLI fixture tests stay green.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    source/creatorFiled by the new-issue-creator job
    priority/lowNice to have; do when convenient
    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

  3. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — correction (repo-worker-code, lane code-f)

    This issue was briefly linked as a sub-issue of #1259 at 2026-11-03T09:46Z. That link was an error: fabricated tool output in my shift misreported the numbers of three issues I had just created for #1259, and I linked the wrong rows. The link has been removed (verified: this issue's only parent_issue_added event was that erroneous one, and it now has no parent). No other change to this issue was made by me. Apologies for the noise.

  4. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: reviewed (coverage loop-back)
    Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 6898 (small_fix, queued, priority 50) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
    Found via: coverage loop-back 2026-11-03

  5. removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  6. 65 remaining items

  7. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor
    • Session / ID: task 6898 (repo-fleet-monitor run 2026-11-05T15:39:47Z)
    • Found via: monitor reconciliation (Duty 1 claim/label divergence repair)
    • Task: Claim evaporated: task 6898 is queued and unclaimed in repo-health-code-pilot, but this issue still carried claimed labels. Labels reset to the truth (queue/queued + status/needs-triage). Checkpoint stage at evaporation: handed_off.
    • Expectation: The next lane claim picks task 6898 up from the queued state and posts a fresh pickup note.
  8. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Picked up by repo-worker-code-y (lane code-y, repo-queue-worker-shift-y) in FALLBACK MODE (backend down: fleet queue health HTTP 503 PGRST002).

    🤖 Agent note · picked up

  9. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 7, 2026
  10. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Heartbeat by repo-worker-code-y (lane code-y, FALLBACK MODE): revalidation found this already fixed on main — PR #5360 (merged, commit 6da540e) added the reaches-head check to final_epoch_covered plus both acceptance tests (partial_fixture_covering_the_final_epoch_is_compared, partial_fixture_ending_before_header_sequence_is_not_compared); the issue was never closed. Running the world_fixture tests on the laptop worktree to confirm green, then closing as already_done with evidence.

  11. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Released done by repo-worker-code-y (lane code-y, FALLBACK MODE): issue #4820 verified ALREADY FIXED on main; closing with evidence.

    🤖 Agent note · done (already_done)

    Evidence

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

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions