Skip to content

feat(transfer): enable INC_RECURSE sender by default (#1862) - #3557

Merged
oferchen merged 5 commits into
masterfrom
feat/inc-recurse-default-1862
May 2, 2026
Merged

oferchen merged 5 commits into
masterfrom
feat/inc-recurse-default-1862

Conversation

@oferchen

@oferchen oferchen commented May 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Flip the INC_RECURSE ('i') capability bit in the -e. string to on by default for both directions, mirroring upstream rsync 3.4.1's allow_inc_recurse = 1 initialization in compat.c.
  • Both SSH (RemoteInvocationBuilder) and daemon (build_full_daemon_args) call sites now use the same gate config.inc_recursive_send(), removing the prior role-based asymmetry where push transfers omitted 'i'.
  • Wire the existing --inc-recursive / --no-inc-recursive CLI flag (previously parsed but ignored) through ConfigInputs.inc_recursive_send: Option<bool> so unset preserves the upstream default in ClientConfigBuilder::build().
  • Remove the non-upstream --inc-recursive-send opt-in flag and its associated parser/test code; the standard upstream-equivalent --no-inc-recursive is now the sole gate.

Upstream references

  • compat.c:720 set_allow_inc_recurse() - capability gate.
  • options.c:3003-3050 maybe_add_e_option() - capability string construction.

Closes #1862.

Test plan

  • CI: fmt + clippy
  • CI: nextest (stable) - verifies updated capability-string assertions in crates/core/src/client/remote/invocation/tests.rs and crates/core/src/client/remote/daemon_transfer/orchestration/tests.rs
  • CI: Windows / macOS / Linux musl matrices
  • CI: Interop validation against upstream 3.0.9 / 3.1.3 / 3.4.1 (push and pull)

Mirror upstream rsync 3.4.1's `allow_inc_recurse = 1` initialization in
`compat.c`: oc-rsync now advertises the INC_RECURSE ('i') capability bit
in the `-e.` string for both transfer directions by default. Pass
`--no-inc-recursive` to clear the flag and suppress the bit, matching
`set_allow_inc_recurse()` (compat.c:720).

Previously the bit was opt-in for sender-side transfers via the
non-upstream `--inc-recursive-send` flag, which caused wire-format
divergence on every push (no 'i' in the capability string) and forced
peers to clear `allow_inc_recurse` on the server side. The opt-in flag
is removed; `--inc-recursive` / `--no-inc-recursive` (already supported)
now drive the gate in line with upstream popt option semantics
(options.c).

Both SSH (`RemoteInvocationBuilder`) and daemon
(`build_full_daemon_args`) capability-string call sites use the same
gate, removing the role-based asymmetry. The CLI tri-state
`--inc-recursive` / `--no-inc-recursive` is wired through
`ConfigInputs.inc_recursive_send: Option<bool>` so unset preserves the
upstream default in `ClientConfigBuilder::build()`.

upstream: compat.c:720 set_allow_inc_recurse() - capability gate.
upstream: options.c:3003-3050 maybe_add_e_option() - capability string.
@github-actions github-actions Bot added the enhancement New feature or request label May 2, 2026
oferchen added 2 commits May 2, 2026 10:58
Reflow the inc_recursive_send doc comment so the backtick-quoted
`--no-inc-recursive` reference no longer starts a continuation line,
which clippy::doc_lazy_continuation misread as a blockquote.
@oferchen
oferchen force-pushed the feat/inc-recurse-default-1862 branch from 233b848 to cc824ac Compare May 2, 2026 08:17
oferchen added 2 commits May 2, 2026 12:17
The capability info string emitted by the receiver direction now
includes 'i' (INC_RECURSE sender capability) when inc_recursive_send
defaults to true. Update test_remote_invocation_with_multiple_paths
to expect "-e.iLsfxCIvu" instead of "-e.LsfxCIvu".
@oferchen
oferchen merged commit 39d4772 into master May 2, 2026
37 checks passed
@oferchen
oferchen deleted the feat/inc-recurse-default-1862 branch May 2, 2026 13:01
oferchen added a commit that referenced this pull request May 5, 2026
* feat(transfer): enable INC_RECURSE sender by default (#1862)

Mirror upstream rsync 3.4.1's `allow_inc_recurse = 1` initialization in
`compat.c`: oc-rsync now advertises the INC_RECURSE ('i') capability bit
in the `-e.` string for both transfer directions by default. Pass
`--no-inc-recursive` to clear the flag and suppress the bit, matching
`set_allow_inc_recurse()` (compat.c:720).

Previously the bit was opt-in for sender-side transfers via the
non-upstream `--inc-recursive-send` flag, which caused wire-format
divergence on every push (no 'i' in the capability string) and forced
peers to clear `allow_inc_recurse` on the server side. The opt-in flag
is removed; `--inc-recursive` / `--no-inc-recursive` (already supported)
now drive the gate in line with upstream popt option semantics
(options.c).

Both SSH (`RemoteInvocationBuilder`) and daemon
(`build_full_daemon_args`) capability-string call sites use the same
gate, removing the role-based asymmetry. The CLI tri-state
`--inc-recursive` / `--no-inc-recursive` is wired through
`ConfigInputs.inc_recursive_send: Option<bool>` so unset preserves the
upstream default in `ClientConfigBuilder::build()`.

upstream: compat.c:720 set_allow_inc_recurse() - capability gate.
upstream: options.c:3003-3050 maybe_add_e_option() - capability string.

* fix(core): doc_lazy_continuation in performance.rs

Reflow the inc_recursive_send doc comment so the backtick-quoted
`--no-inc-recursive` reference no longer starts a continuation line,
which clippy::doc_lazy_continuation misread as a blockquote.

* fix(core): reword inc-recursive doc to avoid markdown blockquote

* test(ssh): update capability assertion for INC_RECURSE sender (#1862)

The capability info string emitted by the receiver direction now
includes 'i' (INC_RECURSE sender capability) when inc_recursive_send
defaults to true. Update test_remote_invocation_with_multiple_paths
to expect "-e.iLsfxCIvu" instead of "-e.LsfxCIvu".
oferchen added a commit that referenced this pull request May 6, 2026
…h regression (#3744)

* fix(core): default inc_recursive_send to false to fix push regression (#1862)

PR #3557 (commit 39d4772) flipped the sender-side INC_RECURSE default
to true, advertising the `'i'` capability bit on push transfers. This
caused severe performance regressions in v0.6.1 - push paths went 95-201x
slower over both SSH and daemon transports.

The sender-side INC_RECURSE state machine has not been validated against
upstream rsync interop, and enabling it by default exercises a code path
that is not yet performance-tuned. Restore the v0.6.0 default of `false`
so push performance returns to baseline. Pull transfers are unaffected -
they continue to negotiate INC_RECURSE normally because the flag governs
what we advertise, and the sender on a pull is the remote.

Users who want to exercise the sender-side state machine for interop
validation can opt in with `--inc-recursive` (the existing CLI flag is
preserved). The longer-term fix is to profile the sender-side state
machine, identify the bottleneck, and re-enable by default once it
matches upstream wire performance.

Tests:
- inc_recursive_send_default_is_true -> _is_false
- default_inc_recursive_send_is_true -> _is_false
- ssh_sender_advertises_inc_recurse_capability_by_default ->
  ssh_sender_omits_inc_recurse_capability_by_default
- ssh_receiver_advertises_inc_recurse_capability_by_default ->
  ssh_receiver_omits_inc_recurse_capability_by_default
- build_full_args_pull_advertises_inc_recurse_capability_by_default ->
  build_full_args_pull_omits_inc_recurse_capability_by_default
- builds_receiver_invocation_with_sender_flag and
  builds_sender_invocation_no_sender_flag updated to expect
  build_capability_string(false)

upstream: compat.c:161-179 allow_inc_recurse - the gate semantics.
upstream: options.c:3003-3050 maybe_add_e_option - capability string.

* fix(core,tests): update post-revert default tests to expect no 'i' bit

* fix(tests): align push-direction inc_recurse test with new default

* fix(tests): explicitly enable inc_recursive_send in all-flags test
oferchen added a commit that referenced this pull request May 18, 2026
…h regression (#3744)

* fix(core): default inc_recursive_send to false to fix push regression (#1862)

PR #3557 (commit 39d4772) flipped the sender-side INC_RECURSE default
to true, advertising the `'i'` capability bit on push transfers. This
caused severe performance regressions in v0.6.1 - push paths went 95-201x
slower over both SSH and daemon transports.

The sender-side INC_RECURSE state machine has not been validated against
upstream rsync interop, and enabling it by default exercises a code path
that is not yet performance-tuned. Restore the v0.6.0 default of `false`
so push performance returns to baseline. Pull transfers are unaffected -
they continue to negotiate INC_RECURSE normally because the flag governs
what we advertise, and the sender on a pull is the remote.

Users who want to exercise the sender-side state machine for interop
validation can opt in with `--inc-recursive` (the existing CLI flag is
preserved). The longer-term fix is to profile the sender-side state
machine, identify the bottleneck, and re-enable by default once it
matches upstream wire performance.

Tests:
- inc_recursive_send_default_is_true -> _is_false
- default_inc_recursive_send_is_true -> _is_false
- ssh_sender_advertises_inc_recurse_capability_by_default ->
  ssh_sender_omits_inc_recurse_capability_by_default
- ssh_receiver_advertises_inc_recurse_capability_by_default ->
  ssh_receiver_omits_inc_recurse_capability_by_default
- build_full_args_pull_advertises_inc_recurse_capability_by_default ->
  build_full_args_pull_omits_inc_recurse_capability_by_default
- builds_receiver_invocation_with_sender_flag and
  builds_sender_invocation_no_sender_flag updated to expect
  build_capability_string(false)

upstream: compat.c:161-179 allow_inc_recurse - the gate semantics.
upstream: options.c:3003-3050 maybe_add_e_option - capability string.

* fix(core,tests): update post-revert default tests to expect no 'i' bit

* fix(tests): align push-direction inc_recurse test with new default

* fix(tests): explicitly enable inc_recursive_send in all-flags test
oferchen added a commit that referenced this pull request May 24, 2026
…-inc-recurse (V61D-2)

Adds an integration test that reproduces the v0.6.1 failure mode the
V61D-1 audit identified: with the `sender-inc-recurse` feature on, a
client-as-sender push to an upstream rsync daemon historically ran
95-201x slower than the equivalent upstream-sender baseline because
PR #3557 flipped `inc_recursive_send=true` by default and routed every
push through the un-tuned sender-side INC_RECURSE state machine
(mitigated by PR #3744).

The test pushes a ~1 MiB tree from oc-rsync (sender, feature ON) to a
spawned upstream `rsync --daemon` (receiver) and asserts wall-clock
stays within 5x of an upstream-sender baseline against the same daemon.
Skips cleanly when the upstream rsync binary is not installed at
`target/interop/upstream-install/3.4.1/bin/rsync`.

Linux-only via the same `cfg(all(unix, not(target_os = "macos")))` gate
the ISI.c/d/e sibling tests use. Adds a marker `sender-inc-recurse`
feature to the transfer crate so the test cfg gate resolves; the
workspace-level feature now forwards to it.

Refs: docs/audit/v061-daemon-push-regression.md
oferchen added a commit that referenced this pull request May 24, 2026
…-inc-recurse (V61D-2)

Adds an integration test that reproduces the v0.6.1 failure mode the
V61D-1 audit identified: with the `sender-inc-recurse` feature on, a
client-as-sender push to an upstream rsync daemon historically ran
95-201x slower than the equivalent upstream-sender baseline because
PR #3557 flipped `inc_recursive_send=true` by default and routed every
push through the un-tuned sender-side INC_RECURSE state machine
(mitigated by PR #3744).

The test pushes a ~1 MiB tree from oc-rsync (sender, feature ON) to a
spawned upstream `rsync --daemon` (receiver) and asserts wall-clock
stays within 5x of an upstream-sender baseline against the same daemon.
Skips cleanly when the upstream rsync binary is not installed at
`target/interop/upstream-install/3.4.1/bin/rsync`.

Linux-only via the same `cfg(all(unix, not(target_os = "macos")))` gate
the ISI.c/d/e sibling tests use. Adds a marker `sender-inc-recurse`
feature to the transfer crate so the test cfg gate resolves; the
workspace-level feature now forwards to it.

Refs: docs/audit/v061-daemon-push-regression.md
oferchen added a commit that referenced this pull request May 24, 2026
…-inc-recurse (V61D-2)

Adds an integration test that reproduces the v0.6.1 failure mode the
V61D-1 audit identified: with the `sender-inc-recurse` feature on, a
client-as-sender push to an upstream rsync daemon historically ran
95-201x slower than the equivalent upstream-sender baseline because
PR #3557 flipped `inc_recursive_send=true` by default and routed every
push through the un-tuned sender-side INC_RECURSE state machine
(mitigated by PR #3744).

The test pushes a ~1 MiB tree from oc-rsync (sender, feature ON) to a
spawned upstream `rsync --daemon` (receiver) and asserts wall-clock
stays within 5x of an upstream-sender baseline against the same daemon.
Skips cleanly when the upstream rsync binary is not installed at
`target/interop/upstream-install/3.4.1/bin/rsync`.

Linux-only via the same `cfg(all(unix, not(target_os = "macos")))` gate
the ISI.c/d/e sibling tests use. Adds a marker `sender-inc-recurse`
feature to the transfer crate so the test cfg gate resolves; the
workspace-level feature now forwards to it.

Refs: docs/audit/v061-daemon-push-regression.md
oferchen added a commit that referenced this pull request May 24, 2026
…-inc-recurse (V61D-2)

Adds an integration test that reproduces the v0.6.1 failure mode the
V61D-1 audit identified: with the `sender-inc-recurse` feature on, a
client-as-sender push to an upstream rsync daemon historically ran
95-201x slower than the equivalent upstream-sender baseline because
PR #3557 flipped `inc_recursive_send=true` by default and routed every
push through the un-tuned sender-side INC_RECURSE state machine
(mitigated by PR #3744).

The test pushes a ~1 MiB tree from oc-rsync (sender, feature ON) to a
spawned upstream `rsync --daemon` (receiver) and asserts wall-clock
stays within 5x of an upstream-sender baseline against the same daemon.
Skips cleanly when the upstream rsync binary is not installed at
`target/interop/upstream-install/3.4.1/bin/rsync`.

Linux-only via the same `cfg(all(unix, not(target_os = "macos")))` gate
the ISI.c/d/e sibling tests use. Adds a marker `sender-inc-recurse`
feature to the transfer crate so the test cfg gate resolves; the
workspace-level feature now forwards to it.

Refs: docs/audit/v061-daemon-push-regression.md
oferchen added a commit that referenced this pull request May 24, 2026
…-inc-recurse (V61D-2)

Adds an integration test that reproduces the v0.6.1 failure mode the
V61D-1 audit identified: with the `sender-inc-recurse` feature on, a
client-as-sender push to an upstream rsync daemon historically ran
95-201x slower than the equivalent upstream-sender baseline because
PR #3557 flipped `inc_recursive_send=true` by default and routed every
push through the un-tuned sender-side INC_RECURSE state machine
(mitigated by PR #3744).

The test pushes a ~1 MiB tree from oc-rsync (sender, feature ON) to a
spawned upstream `rsync --daemon` (receiver) and asserts wall-clock
stays within 5x of an upstream-sender baseline against the same daemon.
Skips cleanly when the upstream rsync binary is not installed at
`target/interop/upstream-install/3.4.1/bin/rsync`.

Linux-only via the same `cfg(all(unix, not(target_os = "macos")))` gate
the ISI.c/d/e sibling tests use. Adds a marker `sender-inc-recurse`
feature to the transfer crate so the test cfg gate resolves; the
workspace-level feature now forwards to it.

Refs: docs/audit/v061-daemon-push-regression.md
oferchen added a commit that referenced this pull request May 24, 2026
…-inc-recurse (V61D-2)

Adds an integration test that reproduces the v0.6.1 failure mode the
V61D-1 audit identified: with the `sender-inc-recurse` feature on, a
client-as-sender push to an upstream rsync daemon historically ran
95-201x slower than the equivalent upstream-sender baseline because
PR #3557 flipped `inc_recursive_send=true` by default and routed every
push through the un-tuned sender-side INC_RECURSE state machine
(mitigated by PR #3744).

The test pushes a ~1 MiB tree from oc-rsync (sender, feature ON) to a
spawned upstream `rsync --daemon` (receiver) and asserts wall-clock
stays within 5x of an upstream-sender baseline against the same daemon.
Skips cleanly when the upstream rsync binary is not installed at
`target/interop/upstream-install/3.4.1/bin/rsync`.

Linux-only via the same `cfg(all(unix, not(target_os = "macos")))` gate
the ISI.c/d/e sibling tests use. Adds a marker `sender-inc-recurse`
feature to the transfer crate so the test cfg gate resolves; the
workspace-level feature now forwards to it.

Refs: docs/audit/v061-daemon-push-regression.md
oferchen added a commit that referenced this pull request May 24, 2026
…-inc-recurse (V61D-2) (#4888)

* test(transfer): v0.6.1 daemon-push perf regression repro under sender-inc-recurse (V61D-2)

Adds an integration test that reproduces the v0.6.1 failure mode the
V61D-1 audit identified: with the `sender-inc-recurse` feature on, a
client-as-sender push to an upstream rsync daemon historically ran
95-201x slower than the equivalent upstream-sender baseline because
PR #3557 flipped `inc_recursive_send=true` by default and routed every
push through the un-tuned sender-side INC_RECURSE state machine
(mitigated by PR #3744).

The test pushes a ~1 MiB tree from oc-rsync (sender, feature ON) to a
spawned upstream `rsync --daemon` (receiver) and asserts wall-clock
stays within 5x of an upstream-sender baseline against the same daemon.
Skips cleanly when the upstream rsync binary is not installed at
`target/interop/upstream-install/3.4.1/bin/rsync`.

Linux-only via the same `cfg(all(unix, not(target_os = "macos")))` gate
the ISI.c/d/e sibling tests use. Adds a marker `sender-inc-recurse`
feature to the transfer crate so the test cfg gate resolves; the
workspace-level feature now forwards to it.

Refs: docs/audit/v061-daemon-push-regression.md

* ci(transfer): retrigger CI on V61D-2 after master fmt fixup #4891

* fix(tests): inline format args in v61d_2 regression test

Resolve clippy uninlined_format_args at the daemon-timeout and
slowdown-ratio assertion sites.
oferchen added a commit that referenced this pull request Aug 24, 2026
…h regression (#3744)

* fix(core): default inc_recursive_send to false to fix push regression (#1862)

PR #3557 (commit 39d4772) flipped the sender-side INC_RECURSE default
to true, advertising the `'i'` capability bit on push transfers. This
caused severe performance regressions in v0.6.1 - push paths went 95-201x
slower over both SSH and daemon transports.

The sender-side INC_RECURSE state machine has not been validated against
upstream rsync interop, and enabling it by default exercises a code path
that is not yet performance-tuned. Restore the v0.6.0 default of `false`
so push performance returns to baseline. Pull transfers are unaffected -
they continue to negotiate INC_RECURSE normally because the flag governs
what we advertise, and the sender on a pull is the remote.

Users who want to exercise the sender-side state machine for interop
validation can opt in with `--inc-recursive` (the existing CLI flag is
preserved). The longer-term fix is to profile the sender-side state
machine, identify the bottleneck, and re-enable by default once it
matches upstream wire performance.

Tests:
- inc_recursive_send_default_is_true -> _is_false
- default_inc_recursive_send_is_true -> _is_false
- ssh_sender_advertises_inc_recurse_capability_by_default ->
  ssh_sender_omits_inc_recurse_capability_by_default
- ssh_receiver_advertises_inc_recurse_capability_by_default ->
  ssh_receiver_omits_inc_recurse_capability_by_default
- build_full_args_pull_advertises_inc_recurse_capability_by_default ->
  build_full_args_pull_omits_inc_recurse_capability_by_default
- builds_receiver_invocation_with_sender_flag and
  builds_sender_invocation_no_sender_flag updated to expect
  build_capability_string(false)

upstream: compat.c:161-179 allow_inc_recurse - the gate semantics.
upstream: options.c:3003-3050 maybe_add_e_option - capability string.

* fix(core,tests): update post-revert default tests to expect no 'i' bit

* fix(tests): align push-direction inc_recurse test with new default

* fix(tests): explicitly enable inc_recursive_send in all-flags test
oferchen added a commit that referenced this pull request Aug 24, 2026
…-inc-recurse (V61D-2) (#4888)

* test(transfer): v0.6.1 daemon-push perf regression repro under sender-inc-recurse (V61D-2)

Adds an integration test that reproduces the v0.6.1 failure mode the
V61D-1 audit identified: with the `sender-inc-recurse` feature on, a
client-as-sender push to an upstream rsync daemon historically ran
95-201x slower than the equivalent upstream-sender baseline because
PR #3557 flipped `inc_recursive_send=true` by default and routed every
push through the un-tuned sender-side INC_RECURSE state machine
(mitigated by PR #3744).

The test pushes a ~1 MiB tree from oc-rsync (sender, feature ON) to a
spawned upstream `rsync --daemon` (receiver) and asserts wall-clock
stays within 5x of an upstream-sender baseline against the same daemon.
Skips cleanly when the upstream rsync binary is not installed at
`target/interop/upstream-install/3.4.1/bin/rsync`.

Linux-only via the same `cfg(all(unix, not(target_os = "macos")))` gate
the ISI.c/d/e sibling tests use. Adds a marker `sender-inc-recurse`
feature to the transfer crate so the test cfg gate resolves; the
workspace-level feature now forwards to it.

Refs: docs/audit/v061-daemon-push-regression.md

* ci(transfer): retrigger CI on V61D-2 after master fmt fixup #4891

* fix(tests): inline format args in v61d_2 regression test

Resolve clippy uninlined_format_args at the daemon-timeout and
slowdown-ratio assertion sites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant