TASK-054: Capture lockstep desyncs as committed regression fixtures - #42
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LockstepSession.capture_fixture()dumps both peers' input logs, full serialized state, and checksums into a JSON-safe snapshot (AC#1).game/tests/desync_fixtures/corrupted_player0_input.json, committed and re-derived/diffed live on everytask game:testrun -- a future regression fails this test until fixed (AC#2, AC#3).Test plan
task game:test(128/128 passing, including newtest_desync_fixture.gd)task game:boundary-checkpasses (no sim-verb/NeoSnakeWorld violations)task checkfully greentask game:testfails; restored it, confirmed it passes againhttps://claude.ai/code/session_01UApNDRB9xQFMKii7WYFFyx