Skip to content

TASK-054: Capture lockstep desyncs as committed regression fixtures - #42

Merged
pythoninthegrass merged 1 commit into
mainfrom
task-054
Sep 14, 2026
Merged

pythoninthegrass merged 1 commit into
mainfrom
task-054

Conversation

@pythoninthegrass

Copy link
Copy Markdown
Contributor

Summary

  • On a lockstep checksum mismatch, LockstepSession.capture_fixture() dumps both peers' input logs, full serialized state, and checksums into a JSON-safe snapshot (AC#1).
  • A deliberately corrupted peer (reusing TASK-053's proven injection technique) produces game/tests/desync_fixtures/corrupted_player0_input.json, committed and re-derived/diffed live on every task game:test run -- a future regression fails this test until fixed (AC#2, AC#3).
  • New fixture type (decision-037) rather than extending the single-actor oracle-corpus JSONL format, which has no room for a two-replica desync artifact.

Test plan

  • task game:test (128/128 passing, including new test_desync_fixture.gd)
  • task game:boundary-check passes (no sim-verb/NeoSnakeWorld violations)
  • task check fully green
  • Verified the regression contract directly: hand-corrupted a field in the committed fixture, confirmed task game:test fails; restored it, confirmed it passes again

https://claude.ai/code/session_01UApNDRB9xQFMKii7WYFFyx

…ures

On a checksum mismatch, LockstepSession.capture_fixture() dumps both
peers' input logs, full serialized state, and checksums into a JSON-safe
snapshot. A deliberately corrupted peer (reusing TASK-053's proven
injection technique) produces game/tests/desync_fixtures/
corrupted_player0_input.json, generated once with
DESYNC_FIXTURE_REGEN=1 and thereafter re-derived live and diffed against
the committed file on every task game:test run -- a future regression in
core/world.zig, the checksum algorithm, or the lockstep protocol fails
this test until fixed, mirroring how task oracle:fuzz promotes fuzz
failures into the corpus.

The existing single-actor oracle-corpus format has no room for a
two-replica desync artifact, so this is a new fixture type
(decision-037) rather than an extension of that schema.
@pythoninthegrass
pythoninthegrass merged commit 8be5aa9 into main Sep 14, 2026
3 checks passed
@pythoninthegrass
pythoninthegrass deleted the task-054 branch September 14, 2026 05:59
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