Skip to content

docs(design): zsync seq-match heuristic semantics#3641

Merged
oferchen merged 1 commit into
masterfrom
docs/zsync-seq-match-2064
May 5, 2026
Merged

docs(design): zsync seq-match heuristic semantics#3641
oferchen merged 1 commit into
masterfrom
docs/zsync-seq-match-2064

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented May 5, 2026

Design note for insertion point #2 of the zsync-inspired matching pipeline (issue #2064): the seq-match heuristic.

Summary

  • Maps zsync's next_match/onlyone=1 shortcut (rsum.c:190, 262, 352-356) onto oc-rsync's existing want_i adjacent-block hint surface in crates/match/src/generator.rs (lines 103, 177-187, 221-225, 259-273) and DeltaSignatureIndex::check_block_match_slices (crates/match/src/index/mod.rs:229-251).
  • Pins the duplicate-block tie-breaker rule, the misprediction cost bound (one extra strong-checksum verify worst case), and the benchmark plan binding for Ensure --ignore-times forces a rewrite #2067.

Sections

Wire-compat

  • No code changes. Doc-only.
  • No CLI flag.
  • No protocol crate change.
  • COPY-token output stays byte-identical to the table-probe baseline.
  • Golden byte tests in crates/protocol/tests/golden/ and the upstream interop matrix (tools/ci/run_interop.sh against 3.0.9 / 3.1.3 / 3.4.1) stay green.

Test plan

  • No source files changed; only docs/design/zsync-seq-match.md is added.
  • Verified git log origin/master..HEAD lists exactly one commit and one file.
  • CI checks: fmt+clippy, nextest (stable), Windows, macOS, Linux musl - expected to pass since no code is touched.

Refs

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.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 5, 2026
@oferchen oferchen merged commit 3de7001 into master May 5, 2026
8 checks passed
@oferchen oferchen deleted the docs/zsync-seq-match-2064 branch May 5, 2026 09:37
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant