Skip to content

docs(audits): wire-format unchanged under parallel dispatch (#1548) - #4205

Merged
oferchen merged 1 commit into
masterfrom
docs/wire-format-unchanged-parallel-1548
May 17, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/wire-format-unchanged-parallel-1548

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Adds docs/audits/parallel-dispatch-wire-format-verification.md covering whether enabling parallel dispatch can change the bytes oc-rsync sends on the wire.
  • Surveys all parallel-dispatch sites in crates/engine/src/concurrent_delta/ (work-queue drain, strategy dispatch, consumer threads, reorder buffer, spill buffer, and the ParallelDeltaPipeline facade in crates/transfer/src/delta_pipeline.rs).
  • Cites file:line for every claim and cross-references existing golden byte tests (crates/protocol/tests/golden_*) and interop coverage (tools/ci/run_interop.sh).

Key findings

  • Conditional PASS. ParallelDeltaPipeline has no production caller today (Receiver::set_delta_pipeline is never invoked; the field is set but never read), so the shipped binary always uses SequentialDeltaPipeline and the wire stream matches upstream receiver.c:recv_files() 1:1.
  • Internal reorder-machinery tests cover the in-process ordering invariant well, but there is no sequential-vs-parallel byte-equivalence assertion, no deterministic test for the force_insert deadlock-break path, and the interop matrix does not exercise parallel dispatch.
  • Lists four targeted follow-ups (parity test, force-insert test, parallel-mode golden, interop matrix dimension) that must land before the parallel path is wired into the user-visible config.

Test plan

  • cargo fmt --all -- --check (docs-only change; ran cargo fmt --all before pushing - no Cargo.toml touched)
  • CI: docs-only change should pass fmt+clippy and nextest unchanged

Document the byte-stream equivalence guarantee for the parallel-dispatch
infrastructure in crates/engine/src/concurrent_delta/. Surveys five
parallel sites and their reordering paths, lists existing internal and
golden tests, and flags four gaps (no production caller of
ParallelDeltaPipeline, no sequential-vs-parallel parity assertion, an
untested force_insert deadlock-break path, and no interop coverage of
the parallel path). Verdict is a conditional PASS: trivially true today
because the receiver always runs the sequential pipeline, with concrete
follow-ups required before the parallel path is wired into production.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 17, 2026
@oferchen
oferchen merged commit 64b5777 into master May 17, 2026
8 checks passed
@oferchen
oferchen deleted the docs/wire-format-unchanged-parallel-1548 branch May 17, 2026 08:13
oferchen added a commit that referenced this pull request May 17, 2026
Captures the design for parallelizing the receiver's per-file delta
apply loop while preserving per-file token order and wire-format
parity. Documents the current sequential surface, the dormant
ParallelDeltaPipeline that would host the change, the backpressure
model, and the gating prerequisites - chiefly the parity-test gap
flagged by audit #4205 (G2) - that block default adoption.

Recommends a phased opt-in rollout: land the sequential-vs-parallel
parity test first, then add a hidden CLI gate, then collect #4214 /
#4206 bench evidence, and only then consider flipping the default.
oferchen added a commit that referenced this pull request May 18, 2026
…4205)

Document the byte-stream equivalence guarantee for the parallel-dispatch
infrastructure in crates/engine/src/concurrent_delta/. Surveys five
parallel sites and their reordering paths, lists existing internal and
golden tests, and flags four gaps (no production caller of
ParallelDeltaPipeline, no sequential-vs-parallel parity assertion, an
untested force_insert deadlock-break path, and no interop coverage of
the parallel path). Verdict is a conditional PASS: trivially true today
because the receiver always runs the sequential pipeline, with concrete
follow-ups required before the parallel path is wired into production.
oferchen added a commit that referenced this pull request May 18, 2026
Captures the design for parallelizing the receiver's per-file delta
apply loop while preserving per-file token order and wire-format
parity. Documents the current sequential surface, the dormant
ParallelDeltaPipeline that would host the change, the backpressure
model, and the gating prerequisites - chiefly the parity-test gap
flagged by audit #4205 (G2) - that block default adoption.

Recommends a phased opt-in rollout: land the sequential-vs-parallel
parity test first, then add a hidden CLI gate, then collect #4214 /
#4206 bench evidence, and only then consider flipping the default.
oferchen added a commit that referenced this pull request May 18, 2026
…4205)

Document the byte-stream equivalence guarantee for the parallel-dispatch
infrastructure in crates/engine/src/concurrent_delta/. Surveys five
parallel sites and their reordering paths, lists existing internal and
golden tests, and flags four gaps (no production caller of
ParallelDeltaPipeline, no sequential-vs-parallel parity assertion, an
untested force_insert deadlock-break path, and no interop coverage of
the parallel path). Verdict is a conditional PASS: trivially true today
because the receiver always runs the sequential pipeline, with concrete
follow-ups required before the parallel path is wired into production.
oferchen added a commit that referenced this pull request May 18, 2026
Captures the design for parallelizing the receiver's per-file delta
apply loop while preserving per-file token order and wire-format
parity. Documents the current sequential surface, the dormant
ParallelDeltaPipeline that would host the change, the backpressure
model, and the gating prerequisites - chiefly the parity-test gap
flagged by audit #4205 (G2) - that block default adoption.

Recommends a phased opt-in rollout: land the sequential-vs-parallel
parity test first, then add a hidden CLI gate, then collect #4214 /
#4206 bench evidence, and only then consider flipping the default.
oferchen added a commit that referenced this pull request Aug 24, 2026
…4205)

Document the byte-stream equivalence guarantee for the parallel-dispatch
infrastructure in crates/engine/src/concurrent_delta/. Surveys five
parallel sites and their reordering paths, lists existing internal and
golden tests, and flags four gaps (no production caller of
ParallelDeltaPipeline, no sequential-vs-parallel parity assertion, an
untested force_insert deadlock-break path, and no interop coverage of
the parallel path). Verdict is a conditional PASS: trivially true today
because the receiver always runs the sequential pipeline, with concrete
follow-ups required before the parallel path is wired into production.
oferchen added a commit that referenced this pull request Aug 24, 2026
Captures the design for parallelizing the receiver's per-file delta
apply loop while preserving per-file token order and wire-format
parity. Documents the current sequential surface, the dormant
ParallelDeltaPipeline that would host the change, the backpressure
model, and the gating prerequisites - chiefly the parity-test gap
flagged by audit #4205 (G2) - that block default adoption.

Recommends a phased opt-in rollout: land the sequential-vs-parallel
parity test first, then add a hidden CLI gate, then collect #4214 /
#4206 bench evidence, and only then consider flipping the default.
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