Repository navigation
fix: wire delete pass into pipelined_incremental for NDX_DEL_STATS (URV-6.b) - #5541
Merged
Merged
Conversation
2 tasks
…RV-6.b) The incremental-flist receive driver skipped delete_extraneous_files entirely, so DeleteStats stayed zero on every default-feature build and NDX_DEL_STATS never carried real counters during goodbye. Mirrors the existing delete-pass wiring in run_pipelined: when flags.delete is set, sweep the destination after symlink creation and before building the candidate transfer list, then surface the per-type counters via TransferStats.delete_stats and delete_limit_exceeded. Adds a regression test that configures the receiver the same way the incremental driver does and asserts the swept counters propagate to TransferStats. upstream: generator.c:do_delete_pass()
oferchen
force-pushed
the
fix/urv-6b-incremental-delete-wiring
branch
from
June 10, 2026 09:13
27057af to
94e7e83
Compare
6 tasks
oferchen
added a commit
that referenced
this pull request
Jun 10, 2026
… path (#5561) PR #5541 removed receiver/directory/missing_args.rs and its callers in pipelined.rs and sync.rs, but the call site in pipelined_incremental.rs was left behind. Master no longer compiles: E0599 "no method named process_missing_args_sentinels found for &mut ReceiverContext" at crates/transfer/src/receiver/transfer/pipelined_incremental.rs:94. Drop the orphan call to restore master compilation. The mode-0 sentinel handling stays removed in all three receiver drivers, matching the intent of the original cleanup.
4 tasks
oferchen
added a commit
that referenced
this pull request
Jun 10, 2026
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.
This was referenced Jun 10, 2026
oferchen
added a commit
that referenced
this pull request
Jun 11, 2026
…sing-args The sender side already emits a mode-0 sentinel file-list entry per upstream flist.c:2254-2258 when --delete-missing-args is in effect. PR #5523 added the matching receiver consumer, but PR #5541 (merged four hours later from a branch that pre-dated #5523) inadvertently deleted both `missing_args.rs` and its wire-up in the receiver transfer paths. Mode-0 entries are neither file, directory, symlink, nor special, so the existing create/transfer passes silently skip them, leaving the named destination path untouched. The upstream testsuite test `delete-missing-args-files-from` (issue #910) surfaces this as "missing-arg file ghost.txt was not deleted on the receiver" with a clean exit code 0. Restore the dedicated handler that mirrors upstream generator.c:1348-1354 (missing_args == 2 && file->mode == 0): iterate the file list once after directory/symlink creation but before the extraneous-delete sweep, remove the named destination path when it exists, and skip any further creation for that entry. Deletions route through the existing sandbox helpers (unlink_via_sandbox_or_fallback / recursive_unlinkat_via_sandbox_or_fallback) so the SEC-1.q TOCTOU guarantees still apply. dry_run and the absence of --delete-missing-args short-circuit the pass, matching upstream's statret guard and missing_args mode check. Wired into all three receiver transfer drivers (`run_pipelined`, `run_pipelined_incremental`, and `run_sync`) so the handler runs regardless of feature flags or fallback path. Regression coverage exercises the receiver against a real on-disk destination through both the wire-flist consume path (receive_file_list) and direct file_list construction, covering: file deletion, directory recursive removal, missing-destination no-op, dry-run skip, and the no-op when --delete-missing-args is off. upstream: generator.c:1348-1354 missing_args == 2 && file->mode == 0 upstream: flist.c:2254-2258 sender mode-0 sentinel emission
oferchen
added a commit
that referenced
this pull request
Jun 11, 2026
…sing-args The sender side already emits a mode-0 sentinel file-list entry per upstream flist.c:2254-2258 when --delete-missing-args is in effect. PR #5523 added the matching receiver consumer, but PR #5541 (merged four hours later from a branch that pre-dated #5523) inadvertently deleted both `missing_args.rs` and its wire-up in the receiver transfer paths. Mode-0 entries are neither file, directory, symlink, nor special, so the existing create/transfer passes silently skip them, leaving the named destination path untouched. The upstream testsuite test `delete-missing-args-files-from` (issue #910) surfaces this as "missing-arg file ghost.txt was not deleted on the receiver" with a clean exit code 0. Restore the dedicated handler that mirrors upstream generator.c:1348-1354 (missing_args == 2 && file->mode == 0): iterate the file list once after directory/symlink creation but before the extraneous-delete sweep, remove the named destination path when it exists, and skip any further creation for that entry. Deletions route through the existing sandbox helpers (unlink_via_sandbox_or_fallback / recursive_unlinkat_via_sandbox_or_fallback) so the SEC-1.q TOCTOU guarantees still apply. dry_run and the absence of --delete-missing-args short-circuit the pass, matching upstream's statret guard and missing_args mode check. Wired into all three receiver transfer drivers (`run_pipelined`, `run_pipelined_incremental`, and `run_sync`) so the handler runs regardless of feature flags or fallback path. Regression coverage exercises the receiver against a real on-disk destination through both the wire-flist consume path (receive_file_list) and direct file_list construction, covering: file deletion, directory recursive removal, missing-destination no-op, dry-run skip, and the no-op when --delete-missing-args is off. upstream: generator.c:1348-1354 missing_args == 2 && file->mode == 0 upstream: flist.c:2254-2258 sender mode-0 sentinel emission
oferchen
added a commit
that referenced
this pull request
Jun 11, 2026
…sing-args The sender side already emits a mode-0 sentinel file-list entry per upstream flist.c:2254-2258 when --delete-missing-args is in effect. PR #5523 added the matching receiver consumer, but PR #5541 (merged four hours later from a branch that pre-dated #5523) inadvertently deleted both `missing_args.rs` and its wire-up in the receiver transfer paths. Mode-0 entries are neither file, directory, symlink, nor special, so the existing create/transfer passes silently skip them, leaving the named destination path untouched. The upstream testsuite test `delete-missing-args-files-from` (issue #910) surfaces this as "missing-arg file ghost.txt was not deleted on the receiver" with a clean exit code 0. Restore the dedicated handler that mirrors upstream generator.c:1348-1354 (missing_args == 2 && file->mode == 0): iterate the file list once after directory/symlink creation but before the extraneous-delete sweep, remove the named destination path when it exists, and skip any further creation for that entry. Deletions route through the existing sandbox helpers (unlink_via_sandbox_or_fallback / recursive_unlinkat_via_sandbox_or_fallback) so the SEC-1.q TOCTOU guarantees still apply. dry_run and the absence of --delete-missing-args short-circuit the pass, matching upstream's statret guard and missing_args mode check. Wired into all three receiver transfer drivers (`run_pipelined`, `run_pipelined_incremental`, and `run_sync`) so the handler runs regardless of feature flags or fallback path. Regression coverage exercises the receiver against a real on-disk destination through both the wire-flist consume path (receive_file_list) and direct file_list construction, covering: file deletion, directory recursive removal, missing-destination no-op, dry-run skip, and the no-op when --delete-missing-args is off. upstream: generator.c:1348-1354 missing_args == 2 && file->mode == 0 upstream: flist.c:2254-2258 sender mode-0 sentinel emission
oferchen
added a commit
that referenced
this pull request
Jun 11, 2026
…sing-args (#5681) The sender side already emits a mode-0 sentinel file-list entry per upstream flist.c:2254-2258 when --delete-missing-args is in effect. PR #5523 added the matching receiver consumer, but PR #5541 (merged four hours later from a branch that pre-dated #5523) inadvertently deleted both `missing_args.rs` and its wire-up in the receiver transfer paths. Mode-0 entries are neither file, directory, symlink, nor special, so the existing create/transfer passes silently skip them, leaving the named destination path untouched. The upstream testsuite test `delete-missing-args-files-from` (issue #910) surfaces this as "missing-arg file ghost.txt was not deleted on the receiver" with a clean exit code 0. Restore the dedicated handler that mirrors upstream generator.c:1348-1354 (missing_args == 2 && file->mode == 0): iterate the file list once after directory/symlink creation but before the extraneous-delete sweep, remove the named destination path when it exists, and skip any further creation for that entry. Deletions route through the existing sandbox helpers (unlink_via_sandbox_or_fallback / recursive_unlinkat_via_sandbox_or_fallback) so the SEC-1.q TOCTOU guarantees still apply. dry_run and the absence of --delete-missing-args short-circuit the pass, matching upstream's statret guard and missing_args mode check. Wired into all three receiver transfer drivers (`run_pipelined`, `run_pipelined_incremental`, and `run_sync`) so the handler runs regardless of feature flags or fallback path. Regression coverage exercises the receiver against a real on-disk destination through both the wire-flist consume path (receive_file_list) and direct file_list construction, covering: file deletion, directory recursive removal, missing-destination no-op, dry-run skip, and the no-op when --delete-missing-args is off. upstream: generator.c:1348-1354 missing_args == 2 && file->mode == 0 upstream: flist.c:2254-2258 sender mode-0 sentinel emission
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…RV-6.b) (#5541) The incremental-flist receive driver skipped delete_extraneous_files entirely, so DeleteStats stayed zero on every default-feature build and NDX_DEL_STATS never carried real counters during goodbye. Mirrors the existing delete-pass wiring in run_pipelined: when flags.delete is set, sweep the destination after symlink creation and before building the candidate transfer list, then surface the per-type counters via TransferStats.delete_stats and delete_limit_exceeded. Adds a regression test that configures the receiver the same way the incremental driver does and asserts the swept counters propagate to TransferStats. upstream: generator.c:do_delete_pass()
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
… path (#5561) PR #5541 removed receiver/directory/missing_args.rs and its callers in pipelined.rs and sync.rs, but the call site in pipelined_incremental.rs was left behind. Master no longer compiles: E0599 "no method named process_missing_args_sentinels found for &mut ReceiverContext" at crates/transfer/src/receiver/transfer/pipelined_incremental.rs:94. Drop the orphan call to restore master compilation. The mode-0 sentinel handling stays removed in all three receiver drivers, matching the intent of the original cleanup.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
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
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).
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…sing-args (#5681) The sender side already emits a mode-0 sentinel file-list entry per upstream flist.c:2254-2258 when --delete-missing-args is in effect. PR #5523 added the matching receiver consumer, but PR #5541 (merged four hours later from a branch that pre-dated #5523) inadvertently deleted both `missing_args.rs` and its wire-up in the receiver transfer paths. Mode-0 entries are neither file, directory, symlink, nor special, so the existing create/transfer passes silently skip them, leaving the named destination path untouched. The upstream testsuite test `delete-missing-args-files-from` (issue #910) surfaces this as "missing-arg file ghost.txt was not deleted on the receiver" with a clean exit code 0. Restore the dedicated handler that mirrors upstream generator.c:1348-1354 (missing_args == 2 && file->mode == 0): iterate the file list once after directory/symlink creation but before the extraneous-delete sweep, remove the named destination path when it exists, and skip any further creation for that entry. Deletions route through the existing sandbox helpers (unlink_via_sandbox_or_fallback / recursive_unlinkat_via_sandbox_or_fallback) so the SEC-1.q TOCTOU guarantees still apply. dry_run and the absence of --delete-missing-args short-circuit the pass, matching upstream's statret guard and missing_args mode check. Wired into all three receiver transfer drivers (`run_pipelined`, `run_pipelined_incremental`, and `run_sync`) so the handler runs regardless of feature flags or fallback path. Regression coverage exercises the receiver against a real on-disk destination through both the wire-flist consume path (receive_file_list) and direct file_list construction, covering: file deletion, directory recursive removal, missing-destination no-op, dry-run skip, and the no-op when --delete-missing-args is off. upstream: generator.c:1348-1354 missing_args == 2 && file->mode == 0 upstream: flist.c:2254-2258 sender mode-0 sentinel emission
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.
Summary
run_pipelined_incremental, default-on) skippeddelete_extraneous_filesentirely.DeleteStatsnever populated, soNDX_DEL_STATScould not carry real counters during goodbye in the default code path.run_pipelined: whenflags.deleteis set, the destination is swept after symlink creation and before building the candidate transfer list. Per-type counters now propagate toTransferStats.delete_statsanddelete_limit_exceeded, accumulating globally like upstream.Upstream Reference
generator.c:do_delete_pass()- full tree walk deletion sweepgenerator.c:2376-2381- earlywrite_del_stats()pathgenerator.c:2420-2425- latewrite_del_stats()pathmain.c:225-238-write_del_stats()wire formatTest plan
incremental_driver_populates_delete_statsregression test intests/file_list/incremental_directories.rs(gated onincremental-flist) that:run_pipelined_incrementalwould (delete flag, destination args, populated flist).TransferStats.delete_stats.files == 2,total() >= 2, the extraneous files are gone, and the kept file survives.Coordination
The gate (
flags.delete) mirrors the existing call site inpipelined.rsverbatim, so URV-6.a can sweep both drivers in a single follow-up. Wire emission ofNDX_DEL_STATSfrom the receiver's goodbye depends on #5536; once that lands, both drivers will emit the message via the samepending_del_statsstash.