Repository navigation
fix: forward --stats into daemon, drain Sync flush, normalize delete path - #5520
Merged
Merged
Conversation
…path Three independent fixes shake out interop failures from upstream rsync 3.4.3's testsuite that exercise daemon-side wire format on the receiver: - daemon-delete-stats (UTS-6): the daemon never set `do_stats` from the client's `--stats` flag, so the generator skipped emitting `NDX_DEL_STATS` during the goodbye phase and the sender's stats showed "Number of deleted files: 0". Wire `--stats` into both the daemon's long-form arg parser and the server-mode flag parser. - daemon-delete-stats (UTS-6): `delete_extraneous_files()` formed the filter check and itemize path as `dir_relative.join(name)`, which at the deletion root produced `./<name>`. A daemon-side `exclude = ?` rule then matched the `.` as a single-character directory component (via the descendant matcher `?/**`), suppressing legitimate top-level deletes. Strip the implicit `.` prefix when `dir_relative == "."`. - compress-zlib-insert (UTS-18): `ZlibTokenEncoder::see_token()` called `compress(..., Z_SYNC_FLUSH)` exactly once per 0xFFFF chunk. A 64 KiB incompressible matched-block insert emits stored-block output > `compress_buf` (CHUNK_SIZE * 2), leaving residue inside the deflate state. The next literal write picks up the trapped output and desynchronises the stream, matching upstream rsync's issue #951. Loop the Sync flush, discarding output until the chunk is consumed and the compressor partially fills the buffer (signalling no more pending output). Regression tests cover the daemon-side filter behaviour, the single-char-glob deletion case, and the large incompressible insert.
oferchen
force-pushed
the
fix/uts-stream-c-daemon-wire
branch
from
June 10, 2026 02:58
90ec600 to
a6f6c30
Compare
2 tasks
oferchen
added a commit
that referenced
this pull request
Jun 10, 2026
Group PRs #5510, #5516, #5519, #5520, #5523, #5525-#5544 by shared root cause rather than by Stream bucket. Seven clusters surface; the parser- stores-string and field-vs-method shadowing clusters cover the largest share of the series, and the receiver-driver wiring-parity gap explains the NDX_DEL_STATS goodbye misses in both #5536 and #5542. Includes a defense-in-depth audit mapping each cluster onto the rust-landlock ruleset wired at crates/fast_io/src/landlock.rs. Doc-only; no code paths touched.
oferchen
added a commit
that referenced
this pull request
Jun 10, 2026
Group PRs #5510, #5516, #5519, #5520, #5523, #5525-#5544 by shared root cause rather than by Stream bucket. Seven clusters surface; the parser- stores-string and field-vs-method shadowing clusters cover the largest share of the series, and the receiver-driver wiring-parity gap explains the NDX_DEL_STATS goodbye misses in both #5536 and #5542. Includes a defense-in-depth audit mapping each cluster onto the rust-landlock ruleset wired at crates/fast_io/src/landlock.rs. Doc-only; no code paths touched.
This was referenced Jun 10, 2026
3 tasks
oferchen
added a commit
that referenced
this pull request
Jun 19, 2026
UTS-NEXTEST-EDGE.e: native nextest port of upstream's testsuite/daemon-gzip-download.test and daemon-gzip-upload.test, which exercise the -zz (zlibx) per-block codec over a daemon transfer in both directions. Asserts byte-identical round-trip, intact goodbye envelope (no UTS-9 'connection unexpectedly closed' signature past the ~615KB cutoff), and codec-engaged evidence via --stats. Adds a -z vs -zz negotiation pin so silent codec collapse trips a regression. Companion to PRs #5520, #5600, #5619 and the UTS-V3 cluster A drain; the upstream tests run under continue-on-error in CI, so this nextest port runs as a required check on every PR.
oferchen
added a commit
that referenced
this pull request
Jun 19, 2026
* test(uts): port daemon-gzip download/upload -zz to nextest UTS-NEXTEST-EDGE.e: native nextest port of upstream's testsuite/daemon-gzip-download.test and daemon-gzip-upload.test, which exercise the -zz (zlibx) per-block codec over a daemon transfer in both directions. Asserts byte-identical round-trip, intact goodbye envelope (no UTS-9 'connection unexpectedly closed' signature past the ~615KB cutoff), and codec-engaged evidence via --stats. Adds a -z vs -zz negotiation pin so silent codec collapse trips a regression. Companion to PRs #5520, #5600, #5619 and the UTS-V3 cluster A drain; the upstream tests run under continue-on-error in CI, so this nextest port runs as a required check on every PR. * test: fix doc-lazy-continuation lint in daemon-gzip-zz module doc Reword 'capability advertise + compress' to 'capability advertise and compress' so clippy doesn't parse the wrapped '+' as a markdown list marker.
1 of 4 tasks
oferchen
added a commit
that referenced
this pull request
Jun 19, 2026
Adds the cross-binary upstream-compat harness primitives specified by NXT-1 (`UpstreamVersion`, `locate_upstream_rsync`, `require_upstream_rsync`, `upstream_compat_enabled`) and ports the upstream `daemon-gzip-download.test` goodbye-flush invariant into nextest. The test pairs an upstream rsync 3.4.4 client against an oc-rsync daemon over TCP and pulls a ~1 MB `-zz`-compressed fixture sized to clear the UTS-9 ~615 KB cutoff. The invariant pinned is that the daemon-sender goodbye envelope reaches the upstream client without a premature connection drop - the regression family fixed by PRs #5520 / #5600 / #5619 / #5725. Self-skips on three conditions: `OC_RSYNC_UPSTREAM_COMPAT` env var unset (default for PR cells), upstream rsync 3.4.4 binary not present at `target/interop/upstream-install/3.4.4/bin/rsync`, or the oc-rsync binary cannot be located. Wall-time impact on the standard PR cell is a single early-return. NXT-1 calls out that the new `upstream-compat` CI cell is the wire-up step that flips the env var on. That cell does not exist yet; this PR ships the test and harness only, and a follow-up will add the matrix entry to the existing nextest workflow. Refs: docs/design/nxt-1-nextest-harness.md
oferchen
added a commit
that referenced
this pull request
Jun 19, 2026
…6002) Adds the cross-binary upstream-compat harness primitives specified by NXT-1 (`UpstreamVersion`, `locate_upstream_rsync`, `require_upstream_rsync`, `upstream_compat_enabled`) and ports the upstream `daemon-gzip-download.test` goodbye-flush invariant into nextest. The test pairs an upstream rsync 3.4.4 client against an oc-rsync daemon over TCP and pulls a ~1 MB `-zz`-compressed fixture sized to clear the UTS-9 ~615 KB cutoff. The invariant pinned is that the daemon-sender goodbye envelope reaches the upstream client without a premature connection drop - the regression family fixed by PRs #5520 / #5600 / #5619 / #5725. Self-skips on three conditions: `OC_RSYNC_UPSTREAM_COMPAT` env var unset (default for PR cells), upstream rsync 3.4.4 binary not present at `target/interop/upstream-install/3.4.4/bin/rsync`, or the oc-rsync binary cannot be located. Wall-time impact on the standard PR cell is a single early-return. NXT-1 calls out that the new `upstream-compat` CI cell is the wire-up step that flips the env var on. That cell does not exist yet; this PR ships the test and harness only, and a follow-up will add the matrix entry to the existing nextest workflow. Refs: docs/design/nxt-1-nextest-harness.md
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
Group PRs #5510, #5516, #5519, #5520, #5523, #5525-#5544 by shared root cause rather than by Stream bucket. Seven clusters surface; the parser- stores-string and field-vs-method shadowing clusters cover the largest share of the series, and the receiver-driver wiring-parity gap explains the NDX_DEL_STATS goodbye misses in both #5536 and #5542. Includes a defense-in-depth audit mapping each cluster onto the rust-landlock ruleset wired at crates/fast_io/src/landlock.rs. Doc-only; no code paths touched.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…path (#5520) * fix: forward --stats into daemon, drain Sync flush, normalize delete path Three independent fixes shake out interop failures from upstream rsync 3.4.3's testsuite that exercise daemon-side wire format on the receiver: - daemon-delete-stats (UTS-6): the daemon never set `do_stats` from the client's `--stats` flag, so the generator skipped emitting `NDX_DEL_STATS` during the goodbye phase and the sender's stats showed "Number of deleted files: 0". Wire `--stats` into both the daemon's long-form arg parser and the server-mode flag parser. - daemon-delete-stats (UTS-6): `delete_extraneous_files()` formed the filter check and itemize path as `dir_relative.join(name)`, which at the deletion root produced `./<name>`. A daemon-side `exclude = ?` rule then matched the `.` as a single-character directory component (via the descendant matcher `?/**`), suppressing legitimate top-level deletes. Strip the implicit `.` prefix when `dir_relative == "."`. - compress-zlib-insert (UTS-18): `ZlibTokenEncoder::see_token()` called `compress(..., Z_SYNC_FLUSH)` exactly once per 0xFFFF chunk. A 64 KiB incompressible matched-block insert emits stored-block output > `compress_buf` (CHUNK_SIZE * 2), leaving residue inside the deflate state. The next literal write picks up the trapped output and desynchronises the stream, matching upstream rsync's issue #951. Loop the Sync flush, discarding output until the chunk is consumed and the compressor partially fills the buffer (signalling no more pending output). Regression tests cover the daemon-side filter behaviour, the single-char-glob deletion case, and the large incompressible insert. * style: cargo fmt fix * fix: drop shadowed PathBuf import from deletion module * style: regroup hex literal digits to satisfy clippy
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
* test(uts): port daemon-gzip download/upload -zz to nextest UTS-NEXTEST-EDGE.e: native nextest port of upstream's testsuite/daemon-gzip-download.test and daemon-gzip-upload.test, which exercise the -zz (zlibx) per-block codec over a daemon transfer in both directions. Asserts byte-identical round-trip, intact goodbye envelope (no UTS-9 'connection unexpectedly closed' signature past the ~615KB cutoff), and codec-engaged evidence via --stats. Adds a -z vs -zz negotiation pin so silent codec collapse trips a regression. Companion to PRs #5520, #5600, #5619 and the UTS-V3 cluster A drain; the upstream tests run under continue-on-error in CI, so this nextest port runs as a required check on every PR. * test: fix doc-lazy-continuation lint in daemon-gzip-zz module doc Reword 'capability advertise + compress' to 'capability advertise and compress' so clippy doesn't parse the wrapped '+' as a markdown list marker.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…6002) Adds the cross-binary upstream-compat harness primitives specified by NXT-1 (`UpstreamVersion`, `locate_upstream_rsync`, `require_upstream_rsync`, `upstream_compat_enabled`) and ports the upstream `daemon-gzip-download.test` goodbye-flush invariant into nextest. The test pairs an upstream rsync 3.4.4 client against an oc-rsync daemon over TCP and pulls a ~1 MB `-zz`-compressed fixture sized to clear the UTS-9 ~615 KB cutoff. The invariant pinned is that the daemon-sender goodbye envelope reaches the upstream client without a premature connection drop - the regression family fixed by PRs #5520 / #5600 / #5619 / #5725. Self-skips on three conditions: `OC_RSYNC_UPSTREAM_COMPAT` env var unset (default for PR cells), upstream rsync 3.4.4 binary not present at `target/interop/upstream-install/3.4.4/bin/rsync`, or the oc-rsync binary cannot be located. Wall-time impact on the standard PR cell is a single early-return. NXT-1 calls out that the new `upstream-compat` CI cell is the wire-up step that flips the env var on. That cell does not exist yet; this PR ships the test and harness only, and a follow-up will add the matrix entry to the existing nextest workflow. Refs: docs/design/nxt-1-nextest-harness.md
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
Three independent fixes for upstream rsync 3.4.3 testsuite failures on the daemon-side wire format:
daemon-delete-stats(UTS-6, fix(workspace): expose embedded-ssh facade feature on root crate #3569): the daemon never propagated--statstoServerConfig.do_stats, so the generator skipped emittingNDX_DEL_STATSduring the goodbye phase and the client's "Number of deleted files" stat stayed at zero on daemon uploads. Wire--statsinto both the daemon's long-form arg parser and the server-mode flag parser.daemon-delete-stats(UTS-6):delete_extraneous_files()consulted the filter chain with"./<name>"at the deletion root. A daemon-sideexclude = ?rule then matched the.as a single-character parent component via the descendant matcher?/**, silently suppressing every legitimate top-level delete. Strip the implicit.prefix.compress-zlib-insert(UTS-18, docs(engine): comment cleanup for local_copy::deletion (#1947) #3581):ZlibTokenEncoder::see_token()calledCompress::compress(..., Z_SYNC_FLUSH)once per 0xFFFF chunk. A 64 KiB incompressible matched-block insert emits stored-block output >compress_buf, leaving residue trapped inside the deflate state that desynchronises the next literal write. Mirrors upstream rsync issue Handle unbracketed IPv6 daemon operands #951. Loop the Sync flush, discarding output, until the chunk is consumed and the buffer is partially filled.daemon-gzip-upload(UTS-10) anddaemon-gzip-download(UTS-9) already passed on master and are validated as part of the same testsuite run.Test plan
nextest (stable)passesfmt + clippypassesWindows,macOS,Linux muslpassdaemon-delete-stats,daemon-gzip-download,daemon-gzip-upload,compress-zlib-insertagainst rsync 3.4.3 and the four go greensingle_char_wildcard_exclude_does_not_block_top_level_deletionpassessingle_char_wildcard_does_not_match_multichar_namespassessee_token_large_incompressible_insert_no_overflowpasses