Skip to content

docs(audits): capture UTS-1.e test6 + UTS-1.f wire parity - #5631

Merged
oferchen merged 1 commit into
masterfrom
docs/uts-1-e-f-secluded-args-wire-verification
Jun 10, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/uts-1-e-f-secluded-args-wire-verification

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

Close the wire-byte verification follow-ups to the UTS-1 secluded-args
fix series (#5516, #5610) with two docs-only audits.

  • docs/audits/uts-1-e-test6-actual-command.md (UTS-1.e) captures the
    upstream testsuite/00-hello.test test6 invocation that lsh.sh
    forwards to oc-rsync, ties the verbatim failure
    (target/interop/upstream-testsuite/00-hello.log:139-141) back to a
    missing server-side --old-args re-split (upstream
    target/interop/upstream-src/rsync-3.4.4/options.c:1640-1648),
    and walks the server entry point in
    crates/cli/src/frontend/server/run.rs:36-61.
  • docs/audits/uts-1-f-tcpdump-wire-parity.md (UTS-1.f) walks the
    -ais push/pull wire-byte layout for both the symmetric
    oc-rsync<->oc-rsync legs (test4/test5) and the asymmetric
    upstream-client -> oc-rsync-server legs, with verbatim citations of
    upstream rsync.c:283-320 send_protected_args() and
    io.c:1308-1367 read_args().

Verdict per direction matrix:

Direction Verdict
oc-rsync push -> oc-rsync server PARITY (symmetric)
oc-rsync pull -> oc-rsync server PARITY (symmetric)
upstream push -> oc-rsync server GAP_FOUND
upstream pull -> oc-rsync server GAP_FOUND

The asymmetric GAP is a regression: PR #5541 (commit d69254ab1,
title fix: wire delete pass into pipelined_incremental for NDX_DEL_STATS) carried a rebase artefact that silently reverted PR
#5516's cmdline+stdin merge in crates/cli/src/frontend/server/run.rs.
Confirm via git log --all -p -- crates/cli/src/frontend/server/run.rs.
Today's master (a314a7217) drops the cmdline tail at line 47:

effective_args = received_args.into_iter().map(OsString::from).collect();

That is the line that should still read PR #5516's merge:

let mut received_iter = received_args.into_iter();
let _arg0 = received_iter.next();
let cmdline_tail = args.iter().skip(1).cloned();
effective_args = cmdline_tail
    .chain(received_iter.map(OsString::from))
    .collect();

PR #5610's drain test (recv_secluded_args_consumes_terminator_completely)
remains valid and is orthogonal to the merge bug; the drain layer
already matches upstream io.c:1308-1367 byte-for-byte.

Follow-ups (enumerated, not raised)

  • UTS-1.e.followup - implement server-side --old-args re-split.
    Mirror upstream options.c:1640-1648.
  • UTS-1.e.followup.b - regression test in
    crates/cli/src/frontend/server/tests.rs pinning the test6
    invocation and the expected two-path positional split.
  • UTS-1.f.followup - reapply PR fix: accept -s secluded-args in oc-rsync --server flag string #5516's cmdline+stdin merge in
    crates/cli/src/frontend/server/run.rs:36-61.
  • UTS-1.f.followup.b - regression test in
    crates/cli/src/frontend/server/tests.rs pinning the asymmetric
    wire layout: cmdline --server --sender -slogDtpre.iLsfxCIvu,
    stdin rsync\0.\0/path\0\0, expected merged args
    ["--server", "--sender", "-slogDtpre.iLsfxCIvu", ".", "/path"].
  • UTS-1.f.followup.c - real pcap capture on the rsync-profile
    container once reachable, to lock the byte-byte parity claim with
    actual wire bytes (this PR uses symbolic reconstruction grounded in
    verbatim upstream source).

Constraints

  • Docs-only diff.
  • No production code, no branding crate touched.
  • No wire protocol features added.
  • No oc-rsync-specific feature impact.
  • Conventional prefix docs:.

Test plan

  • CI fmt + clippy green (docs-only diff)
  • No nextest / Windows / macOS / musl risk
  • Render check on GitHub
  • file:LINE citations resolve against current master (verified at
    commit time; target/interop/upstream-src/rsync-3.4.4/...
    paths are stable across the 3.4.4 tarball)

Cross-references

UTS-1.e (`docs/audits/uts-1-e-test6-actual-command.md`): document the
upstream `testsuite/00-hello.test` test6 command that lsh.sh forwards
to oc-rsync (`--server --sender -logDtpre.iLsfxCIvu --old-args .
'one two'`), capture the verbatim failure from
`target/interop/upstream-testsuite/00-hello.log:139-141`, and trace
the receiver-side `zero-length filename` error to a missing server-
side `--old-args` re-split (upstream `options.c:1640-1648`). Includes
two follow-up items.

UTS-1.f (`docs/audits/uts-1-f-tcpdump-wire-parity.md`): walk the
`-ais` wire-byte layout for push and pull through lsh.sh. The
symmetric oc-rsync<->oc-rsync legs (test4/test5) show PARITY, with
the drain layer matching upstream `io.c:1308-1367` byte-for-byte and
locked by PR #5610's regression test. The asymmetric upstream-client
-> oc-rsync-server legs are a GAP_FOUND because PR #5541's rebase
diff silently reverted PR #5516's cmdline+stdin merge in
`crates/cli/src/frontend/server/run.rs`. The drain test from #5610
remains valid; the merge fix needs to be reapplied. Includes three
follow-up items.

Both docs cross-reference PR #5516, PR #5610, PR #5541, the upstream
3.4.4 source at `target/interop/upstream-src/rsync-3.4.4/`, and the
captured fixture log at
`target/interop/upstream-testsuite/00-hello.log`.

No production code changes. No oc-rsync-specific feature impact. No
branding touched.
@oferchen
oferchen force-pushed the docs/uts-1-e-f-secluded-args-wire-verification branch from 3d46296 to 5459ec4 Compare June 10, 2026 20:16
@oferchen
oferchen merged commit 50c57eb into master Jun 10, 2026
8 checks passed
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 10, 2026
@oferchen
oferchen deleted the docs/uts-1-e-f-secluded-args-wire-verification branch June 11, 2026 03:11
oferchen added a commit that referenced this pull request Aug 24, 2026
…ire-verification

docs(audits): capture UTS-1.e test6 + UTS-1.f wire parity
oferchen added a commit that referenced this pull request Aug 24, 2026
When the upstream rsync client uses --secluded-args / -s, it splits its
argv: the server-options head (--server, --sender, packed flag string,
value-bearing long flags) travels on the command line, while the trailing
positional args (the dot separator and path arguments) stream over stdin
as NUL-delimited bytes. PR #5516 wired the merge into run_server_mode so
both sources combine into the effective argv before flag parsing. PR #5541
(URV-6.b NDX_DEL_STATS wiring) inadvertently reverted that merge along
with the regression tests, restoring the prior behaviour of replacing
effective_args with the stdin payload alone.

The regression discards the cmdline tail. Against an upstream client that
sets -s, the server loses the packed flag string entirely and aborts with
"invalid server arguments: missing rsync server flag string". The
00-hello suite kept passing because test4/test5 run oc-rsync on both ends
and the symmetric client buries the full arg list inside the stdin
payload.

Restore the merge contract from PR #5516: skip the synthetic "rsync" arg0
the wire prepends and prepend args[1..] (the command-line tail) before
the remaining stdin args. Re-add the two PR #5516 regression tests
covering both the packed -slogDtpre.iLsfxCIvu form and the standalone -s
spelling.

upstream: main.c::read_args() merges cmdline args with stdin args under
--protect-args / secluded-args (main.c:1852 callsite, io.c:1308
read_args(), rsync.c:283 send_protected_args(), options.c:2745 NULL
split). Documented in the UTS-1.e+.f audit (#5631).
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