Require receiver commits for Jepsen repair coverage - #20
Open
jeregrine wants to merge 2 commits into
Open
Conversation
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.
Problem
Jepsen used outgoing transport attempts to certify completed repair. A logical gate could drop every delta and snapshot frame before invoking the delegate while the checker still accepted multi-record delta repair and multi-chunk snapshot assembly as covered.
Fix
Require receiver commit evidence instead. The Jepsen VM wraps the existing delta-run and terminal snapshot-install functions before starting Group, observing the same stream's cursor before and after the original body in one serialized shard turn. The delta peak counts only newly applied contiguous records, excluding duplicate prefixes. Multi-chunk snapshot coverage requires successful terminal installation and cursor advancement.
The instrumentation is test-only and fails closed when its expected function signatures change. Production code and APIs are unchanged; shards only send local evidence messages, and a separate owner handles persistence. Sender attempt peaks remain available as diagnostics but cannot satisfy the checker.
Supporting information
The receiver evidence applies equally to distribution, TCP, and chaos. Persisted maxima survive VM restarts and are cleared between histories. A crash before evidence is persisted can conservatively lose coverage, never manufacture it.
Executable receiver regressions cover logical drops, rejected generations and mutations, gaps, duplicate-only traffic, provisional or incomplete snapshots, successful contiguous runs, completed multi-chunk installation, and fresh-BEAM reload. The pure checker consumes the same EDN fixture compared against live emitted receiver evidence, keeping its coverage schema tied to the node implementation.