Repository navigation
fix(filters): apply implicit FILTRULE_SENDER_SIDE under --delete-excluded - #5899
Merged
Merged
Conversation
oferchen
force-pushed
the
fix/uts-dd-exclude-4-implicit-sender-side
branch
from
June 17, 2026 19:29
64cbd65 to
90863ea
Compare
…uded
Upstream rsync's exclude.c::add_rule (lines 1330-1332) sets an implicit
FILTRULE_SENDER_SIDE flag on every include/exclude rule that lacks an
explicit side modifier when --delete-excluded is active:
if (delete_excluded
&& !(rule->rflags & (FILTRULES_SIDES|FILTRULE_MERGE_FILE|FILTRULE_PERDIR_MERGE)))
rule->rflags |= FILTRULE_SENDER_SIDE;
The flag drives get_rule_prefix() (line 1566-1568) to emit an `s` modifier
on the wire and send_rules() (line 1605) to elide the rule from the
receiver's view because it has already been applied locally on the sender.
oc-rsync's CLI filter spec was forwarding bare include/exclude rules as
both-sided to both the engine and the wire serializer, diverging from
upstream's wire bytes for `--delete-excluded --exclude *.tmp` style
inputs.
Apply the implicit flag on FilterRuleSpec before it is compiled into the
engine FilterProgram and before it is serialized to wire format. The
mutation is gated on FilterRuleKind::Include | Exclude only (matching
upstream's FILTRULES_SIDES|FILTRULE_MERGE_FILE|FILTRULE_PERDIR_MERGE
mask) and only fires when both side bits are still at their default
"applies to both" state.
UTS-DD-exclude.4
oferchen
force-pushed
the
fix/uts-dd-exclude-4-implicit-sender-side
branch
from
June 17, 2026 19:31
90863ea to
023978d
Compare
1 of 2 tasks
oferchen
added a commit
that referenced
this pull request
Jun 17, 2026
Two unrelated breaks landed on master after #5899 and #5902 and now block every PR: 1. `core::client::remote::ssh_transfer` still called `flags::build_wire_format_rules` with one argument after #5899 added a `delete_excluded: bool` parameter (`embedded_ssh_transfer.rs` was updated; the two call sites in `ssh_transfer.rs` were missed). Pass `config.delete_excluded()` to match the wire-format contract. 2. `engine::local_copy::context_impl::transfer` used `Vec::extend(other.drain(..))` instead of `Vec::append(&mut other)` after #5902, which trips `clippy::extend-with-drain` under `-D warnings`. Switch to `append`. These are minimal mechanical fixes; no behaviour change.
oferchen
added a commit
that referenced
this pull request
Jun 17, 2026
Two follow-ups to the daemon listener defaults change: 1. `run_single_listener_loop` slept 500ms (`SIGNAL_CHECK_INTERVAL`) between `accept(2)` polls on the non-blocking listener. This was masked previously because the dual-stack default sent traffic through `run_dual_stack_loop`, which uses a 50ms WouldBlock sleep and a 100ms channel `recv_timeout`. Defaulting to IPv4-only single- listener surfaced the latency: the cold-start bench saw 496ms per client vs 115ms upstream (4.3x ratio, regression threshold 1.5x). Lower the single-listener WouldBlock sleep to 50ms so first- connection latency is bounded by the same interval as the dual- stack path. `SIGNAL_CHECK_INTERVAL` is still honoured for the signal-flag inspection at the top of the loop body via `check_signals_and_maintain`. 2. `async_ssh_transport.rs` had two more call sites of `flags::build_wire_format_rules` left un-updated when #5899 added the `delete_excluded: bool` parameter. Pass `config.delete_excluded()` to match the other call sites. No wire/behaviour change; both fixes are mechanical.
This was referenced Jun 17, 2026
oferchen
added a commit
that referenced
this pull request
Jun 17, 2026
* fix(engine,core): unblock master CI after #5899 + #5902 regressions PR #5902 introduced a `clippy::extend-with-drain` lint violation in the nested dir-merge wiring at transfer.rs:187. PR #5899 widened `build_wire_format_rules` to take a `delete_excluded: bool` parameter but missed the SSH push/pull call sites in ssh_transfer.rs (E0061). Both fail the master fmt+clippy and Build cells, blocking every open PR. - engine/.../transfer.rs: replace `extend(.drain(..))` with `append(&mut)`. - core/.../ssh_transfer.rs: pass `config.delete_excluded()` at both call sites. * fix(core): wire delete_excluded through async_ssh_transport build_*_server_config * fix(tests): clippy assertions-on-constants + manual-contains lints - transfer test: wrap compile-time invariants in `const _: () = assert!(...)` - cli verbose test: use `lines.contains(&"only.txt")` over iter().any() * fix(tests): convert OsString args to String for find_flag_string helper
oferchen
added a commit
that referenced
this pull request
Jun 17, 2026
Two follow-ups to the daemon listener defaults change: 1. `run_single_listener_loop` slept 500ms (`SIGNAL_CHECK_INTERVAL`) between `accept(2)` polls on the non-blocking listener. This was masked previously because the dual-stack default sent traffic through `run_dual_stack_loop`, which uses a 50ms WouldBlock sleep and a 100ms channel `recv_timeout`. Defaulting to IPv4-only single- listener surfaced the latency: the cold-start bench saw 496ms per client vs 115ms upstream (4.3x ratio, regression threshold 1.5x). Lower the single-listener WouldBlock sleep to 50ms so first- connection latency is bounded by the same interval as the dual- stack path. `SIGNAL_CHECK_INTERVAL` is still honoured for the signal-flag inspection at the top of the loop body via `check_signals_and_maintain`. 2. `async_ssh_transport.rs` had two more call sites of `flags::build_wire_format_rules` left un-updated when #5899 added the `delete_excluded: bool` parameter. Pass `config.delete_excluded()` to match the other call sites. No wire/behaviour change; both fixes are mechanical.
oferchen
added a commit
that referenced
this pull request
Jun 17, 2026
Two changes that combine to make `testsuite/itemize.test` consistent with upstream rsync's `-i` and `-vv` outputs for the already-linked hardlink branch: 1. `local_copy::process_links` (block 2a, `is_already_hardlinked`): pass `None` for the snapshot's `symlink_target` slot so the `%L` placeholder renders to the empty string. Upstream's `hlink.c:218-222` calls `itemize(..., ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS, 0, "")` with an empty xname; `log.c:643-654` then skips the ` => %s` suffix, producing the `hf$allspace foo/extra` row at line 122 of `testsuite/itemize.test`. The previously-passed leader path produced a spurious `=> foo/config1` trailer on otherwise-uptodate hardlink rows under `-i`. The newly-linked branch (block 2b) is unchanged: it still threads the leader path so the `=> foo/config1` xname suffix renders for the `-iplrH` line-78 golden. 2. Repair `ssh_transfer::run_pull_transfer` / `run_push_transfer`: pass `config.delete_excluded()` as the second argument to `flags::build_wire_format_rules`. The signature was extended in #5899 (FILTRULE_SENDER_SIDE under `--delete-excluded`) but these two SSH call sites were not updated, leaving master with `error[E0061]: this function takes 2 arguments but 1 argument was supplied` and blocking `upstream-testsuite` (and all other CI cells) at the build step. Regression coverage: - `itemize_hardlink_already_linked_omits_arrow_suffix` runs `-plrtH` to set up the destination alias and then `-iplrtH` to verify the second-pass row carries no `=> leader.bin` trailer.
oferchen
added a commit
that referenced
this pull request
Jun 18, 2026
Two follow-ups to the daemon listener defaults change: 1. `run_single_listener_loop` slept 500ms (`SIGNAL_CHECK_INTERVAL`) between `accept(2)` polls on the non-blocking listener. This was masked previously because the dual-stack default sent traffic through `run_dual_stack_loop`, which uses a 50ms WouldBlock sleep and a 100ms channel `recv_timeout`. Defaulting to IPv4-only single- listener surfaced the latency: the cold-start bench saw 496ms per client vs 115ms upstream (4.3x ratio, regression threshold 1.5x). Lower the single-listener WouldBlock sleep to 50ms so first- connection latency is bounded by the same interval as the dual- stack path. `SIGNAL_CHECK_INTERVAL` is still honoured for the signal-flag inspection at the top of the loop body via `check_signals_and_maintain`. 2. `async_ssh_transport.rs` had two more call sites of `flags::build_wire_format_rules` left un-updated when #5899 added the `delete_excluded: bool` parameter. Pass `config.delete_excluded()` to match the other call sites. No wire/behaviour change; both fixes are mechanical.
oferchen
added a commit
that referenced
this pull request
Jun 18, 2026
Two changes that combine to make `testsuite/itemize.test` consistent with upstream rsync's `-i` and `-vv` outputs for the already-linked hardlink branch: 1. `local_copy::process_links` (block 2a, `is_already_hardlinked`): pass `None` for the snapshot's `symlink_target` slot so the `%L` placeholder renders to the empty string. Upstream's `hlink.c:218-222` calls `itemize(..., ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS, 0, "")` with an empty xname; `log.c:643-654` then skips the ` => %s` suffix, producing the `hf$allspace foo/extra` row at line 122 of `testsuite/itemize.test`. The previously-passed leader path produced a spurious `=> foo/config1` trailer on otherwise-uptodate hardlink rows under `-i`. The newly-linked branch (block 2b) is unchanged: it still threads the leader path so the `=> foo/config1` xname suffix renders for the `-iplrH` line-78 golden. 2. Repair `ssh_transfer::run_pull_transfer` / `run_push_transfer`: pass `config.delete_excluded()` as the second argument to `flags::build_wire_format_rules`. The signature was extended in #5899 (FILTRULE_SENDER_SIDE under `--delete-excluded`) but these two SSH call sites were not updated, leaving master with `error[E0061]: this function takes 2 arguments but 1 argument was supplied` and blocking `upstream-testsuite` (and all other CI cells) at the build step. Regression coverage: - `itemize_hardlink_already_linked_omits_arrow_suffix` runs `-plrtH` to set up the destination alias and then `-iplrtH` to verify the second-pass row carries no `=> leader.bin` trailer.
oferchen
added a commit
that referenced
this pull request
Jun 18, 2026
Two follow-ups to the daemon listener defaults change: 1. `run_single_listener_loop` slept 500ms (`SIGNAL_CHECK_INTERVAL`) between `accept(2)` polls on the non-blocking listener. This was masked previously because the dual-stack default sent traffic through `run_dual_stack_loop`, which uses a 50ms WouldBlock sleep and a 100ms channel `recv_timeout`. Defaulting to IPv4-only single- listener surfaced the latency: the cold-start bench saw 496ms per client vs 115ms upstream (4.3x ratio, regression threshold 1.5x). Lower the single-listener WouldBlock sleep to 50ms so first- connection latency is bounded by the same interval as the dual- stack path. `SIGNAL_CHECK_INTERVAL` is still honoured for the signal-flag inspection at the top of the loop body via `check_signals_and_maintain`. 2. `async_ssh_transport.rs` had two more call sites of `flags::build_wire_format_rules` left un-updated when #5899 added the `delete_excluded: bool` parameter. Pass `config.delete_excluded()` to match the other call sites. No wire/behaviour change; both fixes are mechanical.
oferchen
added a commit
that referenced
this pull request
Jun 18, 2026
* fix(daemon): default listener to IPv4-only matching upstream
The default daemon listener used to bind IPv6+IPv4 (dual-stack) and
treat any per-family accept failure as fatal. On GitHub Actions Linux
runners the IPv6 stack is configured but unreachable: `bind(2)` to
`[::]:873` succeeds, but `accept(2)` then returns a non-routable
address family and the daemon exits 10 ("error in socket I/O") even
though the IPv4 listener was healthy. This matched the upstream
testsuite "daemon (exit 10)" CI-only failure pattern documented under
UTS-DD-daemon-exit10.
Mirror upstream `socket.c::open_socket_in` (rsync-3.4.4:402-499)
semantics by:
- Defaulting to IPv4-only when no `--ipv4`/`--ipv6` flag and no
explicit `--bind` address is given. Matches upstream's
`default_af_hint = 0` behaviour when the IPv6 stack is configured
but unreachable.
- Accepting `--ipv4 --ipv6` together as the explicit dual-stack
opt-in (previously rejected as a CLI conflict). Sets a new
`dual_stack` flag on `RuntimeOptions` so the accept loop binds one
socket per family.
- Tolerating per-family `accept(2)` failures in `run_dual_stack_loop`:
the surviving family keeps serving connections, the failed family
logs a warning. Only a fatal accept on the last surviving family
escalates to daemon exit 10.
- Adding `OC_RSYNC_DAEMON_ADDRESS_FAMILY=ipv4|ipv6|both` as a runtime
override so CI/test fixtures can force a family without rebuilding
the CLI.
The bind-address conflict path is preserved: `--bind 1.2.3.4 --ipv6`
still errors with "cannot use --ipv6 with an IPv4 bind address".
Per-family bind warnings already existed (`warn_per_family_bind_failure`);
this commit adds the companion `warn_per_family_accept_failure` so
runtime accept regressions are auditable too.
upstream: target/interop/upstream-src/rsync-3.4.4/socket.c
- open_socket_in:402-499 - family-iteration bind loop
- start_accept_loop:537+ - per-family `select(2)` survives single
descriptor failure
Tests:
- runtime_options/tests.rs: --ipv4 --ipv6 enables dual_stack;
default has dual_stack=false.
- server_runtime/tests.rs: parse_address_family_env accepts ipv4/ipv6/
both variants; rejects unknown values; warn_per_family_accept_failure
labels IPv4/IPv6.
- crates/daemon/tests/listener_address_family.rs: live daemon end-to-end
with default, --ipv6, --ipv4 --ipv6, and OC_RSYNC_DAEMON_ADDRESS_FAMILY
variants.
Refs: UTS-DD-daemon-exit10.1, UTS-DD-daemon-exit10.2
* fix: lower single-listener accept poll to 50ms; fix async-ssh build
Two follow-ups to the daemon listener defaults change:
1. `run_single_listener_loop` slept 500ms (`SIGNAL_CHECK_INTERVAL`)
between `accept(2)` polls on the non-blocking listener. This was
masked previously because the dual-stack default sent traffic
through `run_dual_stack_loop`, which uses a 50ms WouldBlock sleep
and a 100ms channel `recv_timeout`. Defaulting to IPv4-only single-
listener surfaced the latency: the cold-start bench saw 496ms per
client vs 115ms upstream (4.3x ratio, regression threshold 1.5x).
Lower the single-listener WouldBlock sleep to 50ms so first-
connection latency is bounded by the same interval as the dual-
stack path. `SIGNAL_CHECK_INTERVAL` is still honoured for the
signal-flag inspection at the top of the loop body via
`check_signals_and_maintain`.
2. `async_ssh_transport.rs` had two more call sites of
`flags::build_wire_format_rules` left un-updated when #5899 added
the `delete_excluded: bool` parameter. Pass `config.delete_excluded()`
to match the other call sites.
No wire/behaviour change; both fixes are mechanical.
* fix(clippy): drop unused constant; use io::Error::other
oferchen
added a commit
that referenced
this pull request
Jun 18, 2026
Two changes that combine to make `testsuite/itemize.test` consistent with upstream rsync's `-i` and `-vv` outputs for the already-linked hardlink branch: 1. `local_copy::process_links` (block 2a, `is_already_hardlinked`): pass `None` for the snapshot's `symlink_target` slot so the `%L` placeholder renders to the empty string. Upstream's `hlink.c:218-222` calls `itemize(..., ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS, 0, "")` with an empty xname; `log.c:643-654` then skips the ` => %s` suffix, producing the `hf$allspace foo/extra` row at line 122 of `testsuite/itemize.test`. The previously-passed leader path produced a spurious `=> foo/config1` trailer on otherwise-uptodate hardlink rows under `-i`. The newly-linked branch (block 2b) is unchanged: it still threads the leader path so the `=> foo/config1` xname suffix renders for the `-iplrH` line-78 golden. 2. Repair `ssh_transfer::run_pull_transfer` / `run_push_transfer`: pass `config.delete_excluded()` as the second argument to `flags::build_wire_format_rules`. The signature was extended in #5899 (FILTRULE_SENDER_SIDE under `--delete-excluded`) but these two SSH call sites were not updated, leaving master with `error[E0061]: this function takes 2 arguments but 1 argument was supplied` and blocking `upstream-testsuite` (and all other CI cells) at the build step. Regression coverage: - `itemize_hardlink_already_linked_omits_arrow_suffix` runs `-plrtH` to set up the destination alias and then `-iplrtH` to verify the second-pass row carries no `=> leader.bin` trailer.
oferchen
added a commit
that referenced
this pull request
Jun 18, 2026
#5909) Two changes that combine to make `testsuite/itemize.test` consistent with upstream rsync's `-i` and `-vv` outputs for the already-linked hardlink branch: 1. `local_copy::process_links` (block 2a, `is_already_hardlinked`): pass `None` for the snapshot's `symlink_target` slot so the `%L` placeholder renders to the empty string. Upstream's `hlink.c:218-222` calls `itemize(..., ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS, 0, "")` with an empty xname; `log.c:643-654` then skips the ` => %s` suffix, producing the `hf$allspace foo/extra` row at line 122 of `testsuite/itemize.test`. The previously-passed leader path produced a spurious `=> foo/config1` trailer on otherwise-uptodate hardlink rows under `-i`. The newly-linked branch (block 2b) is unchanged: it still threads the leader path so the `=> foo/config1` xname suffix renders for the `-iplrH` line-78 golden. 2. Repair `ssh_transfer::run_pull_transfer` / `run_push_transfer`: pass `config.delete_excluded()` as the second argument to `flags::build_wire_format_rules`. The signature was extended in #5899 (FILTRULE_SENDER_SIDE under `--delete-excluded`) but these two SSH call sites were not updated, leaving master with `error[E0061]: this function takes 2 arguments but 1 argument was supplied` and blocking `upstream-testsuite` (and all other CI cells) at the build step. Regression coverage: - `itemize_hardlink_already_linked_omits_arrow_suffix` runs `-plrtH` to set up the destination alias and then `-iplrtH` to verify the second-pass row carries no `=> leader.bin` trailer.
2 of 4 tasks
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…uded (#5899) Upstream rsync's exclude.c::add_rule (lines 1330-1332) sets an implicit FILTRULE_SENDER_SIDE flag on every include/exclude rule that lacks an explicit side modifier when --delete-excluded is active: if (delete_excluded && !(rule->rflags & (FILTRULES_SIDES|FILTRULE_MERGE_FILE|FILTRULE_PERDIR_MERGE))) rule->rflags |= FILTRULE_SENDER_SIDE; The flag drives get_rule_prefix() (line 1566-1568) to emit an `s` modifier on the wire and send_rules() (line 1605) to elide the rule from the receiver's view because it has already been applied locally on the sender. oc-rsync's CLI filter spec was forwarding bare include/exclude rules as both-sided to both the engine and the wire serializer, diverging from upstream's wire bytes for `--delete-excluded --exclude *.tmp` style inputs. Apply the implicit flag on FilterRuleSpec before it is compiled into the engine FilterProgram and before it is serialized to wire format. The mutation is gated on FilterRuleKind::Include | Exclude only (matching upstream's FILTRULES_SIDES|FILTRULE_MERGE_FILE|FILTRULE_PERDIR_MERGE mask) and only fires when both side bits are still at their default "applies to both" state. UTS-DD-exclude.4
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
* fix(engine,core): unblock master CI after #5899 + #5902 regressions PR #5902 introduced a `clippy::extend-with-drain` lint violation in the nested dir-merge wiring at transfer.rs:187. PR #5899 widened `build_wire_format_rules` to take a `delete_excluded: bool` parameter but missed the SSH push/pull call sites in ssh_transfer.rs (E0061). Both fail the master fmt+clippy and Build cells, blocking every open PR. - engine/.../transfer.rs: replace `extend(.drain(..))` with `append(&mut)`. - core/.../ssh_transfer.rs: pass `config.delete_excluded()` at both call sites. * fix(core): wire delete_excluded through async_ssh_transport build_*_server_config * fix(tests): clippy assertions-on-constants + manual-contains lints - transfer test: wrap compile-time invariants in `const _: () = assert!(...)` - cli verbose test: use `lines.contains(&"only.txt")` over iter().any() * fix(tests): convert OsString args to String for find_flag_string helper
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
* fix(daemon): default listener to IPv4-only matching upstream
The default daemon listener used to bind IPv6+IPv4 (dual-stack) and
treat any per-family accept failure as fatal. On GitHub Actions Linux
runners the IPv6 stack is configured but unreachable: `bind(2)` to
`[::]:873` succeeds, but `accept(2)` then returns a non-routable
address family and the daemon exits 10 ("error in socket I/O") even
though the IPv4 listener was healthy. This matched the upstream
testsuite "daemon (exit 10)" CI-only failure pattern documented under
UTS-DD-daemon-exit10.
Mirror upstream `socket.c::open_socket_in` (rsync-3.4.4:402-499)
semantics by:
- Defaulting to IPv4-only when no `--ipv4`/`--ipv6` flag and no
explicit `--bind` address is given. Matches upstream's
`default_af_hint = 0` behaviour when the IPv6 stack is configured
but unreachable.
- Accepting `--ipv4 --ipv6` together as the explicit dual-stack
opt-in (previously rejected as a CLI conflict). Sets a new
`dual_stack` flag on `RuntimeOptions` so the accept loop binds one
socket per family.
- Tolerating per-family `accept(2)` failures in `run_dual_stack_loop`:
the surviving family keeps serving connections, the failed family
logs a warning. Only a fatal accept on the last surviving family
escalates to daemon exit 10.
- Adding `OC_RSYNC_DAEMON_ADDRESS_FAMILY=ipv4|ipv6|both` as a runtime
override so CI/test fixtures can force a family without rebuilding
the CLI.
The bind-address conflict path is preserved: `--bind 1.2.3.4 --ipv6`
still errors with "cannot use --ipv6 with an IPv4 bind address".
Per-family bind warnings already existed (`warn_per_family_bind_failure`);
this commit adds the companion `warn_per_family_accept_failure` so
runtime accept regressions are auditable too.
upstream: target/interop/upstream-src/rsync-3.4.4/socket.c
- open_socket_in:402-499 - family-iteration bind loop
- start_accept_loop:537+ - per-family `select(2)` survives single
descriptor failure
Tests:
- runtime_options/tests.rs: --ipv4 --ipv6 enables dual_stack;
default has dual_stack=false.
- server_runtime/tests.rs: parse_address_family_env accepts ipv4/ipv6/
both variants; rejects unknown values; warn_per_family_accept_failure
labels IPv4/IPv6.
- crates/daemon/tests/listener_address_family.rs: live daemon end-to-end
with default, --ipv6, --ipv4 --ipv6, and OC_RSYNC_DAEMON_ADDRESS_FAMILY
variants.
Refs: UTS-DD-daemon-exit10.1, UTS-DD-daemon-exit10.2
* fix: lower single-listener accept poll to 50ms; fix async-ssh build
Two follow-ups to the daemon listener defaults change:
1. `run_single_listener_loop` slept 500ms (`SIGNAL_CHECK_INTERVAL`)
between `accept(2)` polls on the non-blocking listener. This was
masked previously because the dual-stack default sent traffic
through `run_dual_stack_loop`, which uses a 50ms WouldBlock sleep
and a 100ms channel `recv_timeout`. Defaulting to IPv4-only single-
listener surfaced the latency: the cold-start bench saw 496ms per
client vs 115ms upstream (4.3x ratio, regression threshold 1.5x).
Lower the single-listener WouldBlock sleep to 50ms so first-
connection latency is bounded by the same interval as the dual-
stack path. `SIGNAL_CHECK_INTERVAL` is still honoured for the
signal-flag inspection at the top of the loop body via
`check_signals_and_maintain`.
2. `async_ssh_transport.rs` had two more call sites of
`flags::build_wire_format_rules` left un-updated when #5899 added
the `delete_excluded: bool` parameter. Pass `config.delete_excluded()`
to match the other call sites.
No wire/behaviour change; both fixes are mechanical.
* fix(clippy): drop unused constant; use io::Error::other
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
#5909) Two changes that combine to make `testsuite/itemize.test` consistent with upstream rsync's `-i` and `-vv` outputs for the already-linked hardlink branch: 1. `local_copy::process_links` (block 2a, `is_already_hardlinked`): pass `None` for the snapshot's `symlink_target` slot so the `%L` placeholder renders to the empty string. Upstream's `hlink.c:218-222` calls `itemize(..., ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS, 0, "")` with an empty xname; `log.c:643-654` then skips the ` => %s` suffix, producing the `hf$allspace foo/extra` row at line 122 of `testsuite/itemize.test`. The previously-passed leader path produced a spurious `=> foo/config1` trailer on otherwise-uptodate hardlink rows under `-i`. The newly-linked branch (block 2b) is unchanged: it still threads the leader path so the `=> foo/config1` xname suffix renders for the `-iplrH` line-78 golden. 2. Repair `ssh_transfer::run_pull_transfer` / `run_push_transfer`: pass `config.delete_excluded()` as the second argument to `flags::build_wire_format_rules`. The signature was extended in #5899 (FILTRULE_SENDER_SIDE under `--delete-excluded`) but these two SSH call sites were not updated, leaving master with `error[E0061]: this function takes 2 arguments but 1 argument was supplied` and blocking `upstream-testsuite` (and all other CI cells) at the build step. Regression coverage: - `itemize_hardlink_already_linked_omits_arrow_suffix` runs `-plrtH` to set up the destination alias and then `-iplrtH` to verify the second-pass row carries no `=> leader.bin` trailer.
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
Upstream rsync's
exclude.c::add_rule(lines 1330-1332 in rsync-3.4.4) applies an implicitFILTRULE_SENDER_SIDEflag to every include/exclude rule that carries no explicit side modifier when--delete-excludedis active:The flag drives two downstream effects:
get_rule_prefix()(exclude.c:1566-1568) emits thesmodifier on the wire prefix.send_rules()(exclude.c:1605) marks the rule asLOCAL_RULEon the sender so it is NOT transmitted to the receiver - the sender already applied it locally.oc-rsync was forwarding bare include/exclude rules as both-sided through
compile_filter_program()(engine path) andbuild_wire_format_rules()(wire path), so a CLI like--delete-excluded --exclude '*.tmp'produced- *.tmpon the wire instead of upstream's-s *.tmp. The receiver still saw the excluded names and (only thanks to the pre-existingallows_deletion_when_excluded_removedworkaround in the local-copy decision context) deleted them - but the byte stream diverged from upstream and remote receivers running upstream rsync evaluated the rule differently.Fix
FilterRuleSpec::apply_implicit_sender_side_for_delete_excluded()mirrors upstream's mask: it fires only onInclude/Excludekinds whoseapplies_to_sender == applies_to_receiver == true(i.e. noFILTRULES_SIDESbit), clearing the receiver bit so the rule becomes sender-only.compile_filter_program()andbuild_wire_format_rules()now both take adelete_excludedparameter and apply the implicit flag before producing engine rules or wire bytes.run/mod.rs, daemon transfer orchestration, and embedded SSH transfer plumbconfig.delete_excluded()through.Tests
crates/core/src/client/config/filters.rscover the spec-side mutation: include/exclude kinds get the flag, explicit sender-only / receiver-only rules are untouched, and Protect / Risk / Clear / DirMerge are all skipped (matching upstream's mask exclusions).crates/core/src/client/remote/flags.rscover the serialization path, including a wire-byte parity check that assertsbuild_rule_prefix()emits-sfor a bare--exclude '*.tmp'under--delete-excluded(vs-without it), matching upstream rsync 3.4.4's wire output.Upstream Reference
target/interop/upstream-src/rsync-3.4.4/exclude.c:1330-1332- implicit flag application inadd_rule()/parse_filter_str()target/interop/upstream-src/rsync-3.4.4/exclude.c:1566-1568-smodifier emission inget_rule_prefix()target/interop/upstream-src/rsync-3.4.4/exclude.c:1605-1612- sender-side elision insend_rules()UTS-DD-exclude.4
Test plan
cargo fmt --all