Skip to content

docs(test-support): RFC for protocol-level capture/replay harness (#1850)#3507

Merged
oferchen merged 2 commits into
masterfrom
feat/capture-replay-harness-rfc-1850
May 1, 2026
Merged

docs(test-support): RFC for protocol-level capture/replay harness (#1850)#3507
oferchen merged 2 commits into
masterfrom
feat/capture-replay-harness-rfc-1850

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented May 1, 2026

Summary

  • Adds docs/audits/capture-replay-harness.md (425 lines), an RFC sketch for a protocol-level capture/replay test harness in the test-support crate.
  • Surveys current state on master: crates/test-support/src/lib.rs (31 lines, single helper), flat golden_protocol_v28_*.rs / golden_handshakes.rs files in crates/protocol/tests/, and the live tools/ci/run_interop.sh harness.
  • Proposes a binary .ocrc capture format with a versioned header and per-frame records (direction, timestamp delta, MessageCode, payload), captured post-decompression at the multiplex frame boundary, gated by OC_RSYNC_CAPTURE_PATH.
  • Defines two replay modes (strict byte-equal vs structural) behind a single Replayer type, slotting into existing Read+Write transport seams (crates/rsync_io/src/ssh/connection.rs, daemon negotiation path).
  • Cross-references existing fuzz tasks (Add support for --no-bwlimit #1304, Refactor branding tests into dedicated module #1365, Prevent module burst from raising daemon bwlimit #1196, Handle truthy fallback overrides as default delegation #1303), completed pattern reference (Add helpers to convert BandwidthLimit into a limiter #1191), and internal docs's Strategy and Dependency Inversion guidance.
  • Phasing: this RFC is Phase 1; phases 2-5 deliver Recorder, strict-mode Replayer with first regression test, structural mode, and optional fuzz seed-corpus integration.

Includes Last verified: 2026-05-01 marker and explicit "RFC, sketch only. No implementation in this PR." at the top.

Test plan

  • All cited oc-rsync paths and line numbers verified against master via Read/Grep before authoring.
  • Document length: 425 lines (within target 300-450).
  • Hyphens only - no em-dashes or en-dashes (grep confirmed clean).
  • No Rust code added; docs-only PR.
  • CI: docs-only change; expect fmt+clippy, nextest, Windows/macOS/Linux musl checks all pass without rebuild.

oferchen added 2 commits May 1, 2026 11:36
)

Sketches a capture/replay test harness for the test-support crate, hooking
at the multiplex frame boundary to record post-decompression wire bytes
and replay them deterministically. Covers capture format, capture and
replay surfaces, integration points, use cases, open questions, and
phased delivery. Docs only.
@oferchen oferchen merged commit f585735 into master May 1, 2026
10 checks passed
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 1, 2026
@oferchen oferchen deleted the feat/capture-replay-harness-rfc-1850 branch May 1, 2026 21:08
oferchen added a commit that referenced this pull request May 5, 2026
) (#3507)

Sketches a capture/replay test harness for the test-support crate, hooking
at the multiplex frame boundary to record post-decompression wire bytes
and replay them deterministically. Covers capture format, capture and
replay surfaces, integration points, use cases, open questions, and
phased delivery. Docs only.
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