docs(design): zsync seq-match heuristic semantics#3641
Merged
Conversation
Document the seq-match insertion point from the zsync-inspired matching design. Pins down how zsync's next_match/onlyone shortcut maps to oc-rsync's existing want_i adjacent-block hint surface in crates/match/src/generator.rs, the duplicate-block tie-breaker rule, the misprediction cost bound, and the wire-compat invariants that the implementation, golden-byte test, and benchmark PRs must keep green. Doc-only; no code changes, no CLI flag, no protocol change.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Document the seq-match insertion point from the zsync-inspired matching design. Pins down how zsync's next_match/onlyone shortcut maps to oc-rsync's existing want_i adjacent-block hint surface in crates/match/src/generator.rs, the duplicate-block tie-breaker rule, the misprediction cost bound, and the wire-compat invariants that the implementation, golden-byte test, and benchmark PRs must keep green. Doc-only; no code changes, no CLI flag, no protocol change.
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.
Design note for insertion point #2 of the zsync-inspired matching pipeline (issue #2064): the seq-match heuristic.
Summary
next_match/onlyone=1shortcut (rsum.c:190, 262, 352-356) onto oc-rsync's existingwant_iadjacent-block hint surface incrates/match/src/generator.rs(lines 103, 177-187, 221-225, 259-273) andDeltaSignatureIndex::check_block_match_slices(crates/match/src/index/mod.rs:229-251).Sections
seq_matchesdoesWire-compat
crates/protocol/tests/golden/and the upstream interop matrix (tools/ci/run_interop.shagainst 3.0.9 / 3.1.3 / 3.4.1) stay green.Test plan
docs/design/zsync-seq-match.mdis added.git log origin/master..HEADlists exactly one commit and one file.Refs
docs/design/zsync-inspired-matching.md(PR feat(fast_io): cache PBUF_RING probe and surface in --version #3635 / commit 48b2411).