Repository navigation
Align --server execution and rsync-path forwarding - #2200
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| match command.exec() { | ||
| Ok(_) => unreachable!("exec only returns on error"), | ||
| Err(error) => { |
There was a problem hiding this comment.
Fix exec handling on Unix server path
CommandExt::exec returns an io::Error, not a Result, so the new match command.exec() with Ok(_)/Err(_) patterns will not compile when the non-test Unix block is enabled. On normal Unix builds (e.g., cargo build for release) this block is active and triggers a type mismatch, blocking the binary build; tests miss it because cfg(test) excludes the block.
Useful? React with 👍 / 👎.
…4142) * feat(transfer): instrument prepare_pending_acl cost (INC_RECURSE I5) Adds INC_RECURSE diagnostic counter I5 (#2200): two process-global AtomicU64 counters that track every prepare_pending_acl invocation on the generator file-list path and the cumulative wall time spent inside the helper across all generator transfers. The counters fire from a single record_prepare_acl helper bumped from prepare_pending_acl itself, which wraps the existing body in an Instant::now() pair. The early-return path (entry.is_symlink() or !flags.acls) is still counted so per-segment call rate stays comparable to entry count, but contributes a near-zero ns delta. Totals are sampled in GeneratorContext::run via prepare_acl_totals() in the same finalize block used by PR #4103 (I1 first-byte latency), PR #4120 (I4 NDX partition_point) and PR #4121 (I3 flush rate), and emitted via: - debug_log!(Genr, 1, "generator prepare_pending_acl totals: \ calls=N elapsed_ns=M") - tracing::debug! event on rsync::generator::prepare_acl when the optional tracing feature is enabled Two unit tests in crates/transfer/src/generator/tests.rs cover the new counters: - prepare_acl_call_counter_increments asserts the call counter and the cumulative elapsed_ns counter grow by at least N and sum-of-durations after N synthetic record_prepare_acl invocations. The assertion uses >= because the counter is shared across the process and other tests may run concurrently. - prepare_acl_totals_observable_without_prep asserts the totals snapshot is a pure read - constructing a generator does not bump the counter on its own, so two adjacent reads with no intervening prep call must return identical values. No new CLI flag, no wire-format change, no change to the public prepare_pending_acl signature. Closes #2200 * fix(transfer): rewrap rustdoc list items for prepare_pending_acl counters
Audit the sender-side INC_RECURSE capability gate, document the current disable mechanism, summarise the perf instrumentation that landed under tasks #2196-#2200, cross-reference the SSH and daemon push perf verification from #2209, and lay out the re-enable criteria for the eventual flip of inc_recursive_send from false to true. Recommendation: defer the flip until a 1M-file Mode C push profile run publishes I1-I5 totals alongside hyperfine wall-clock, and the gating criteria from docs/investigations/inc-recurse-sender-regression.md section 5 are met on two consecutive nightly runs. Includes a five-step plan for the eventual flip PR; the flip itself is out of scope here.
…4142) * feat(transfer): instrument prepare_pending_acl cost (INC_RECURSE I5) Adds INC_RECURSE diagnostic counter I5 (#2200): two process-global AtomicU64 counters that track every prepare_pending_acl invocation on the generator file-list path and the cumulative wall time spent inside the helper across all generator transfers. The counters fire from a single record_prepare_acl helper bumped from prepare_pending_acl itself, which wraps the existing body in an Instant::now() pair. The early-return path (entry.is_symlink() or !flags.acls) is still counted so per-segment call rate stays comparable to entry count, but contributes a near-zero ns delta. Totals are sampled in GeneratorContext::run via prepare_acl_totals() in the same finalize block used by PR #4103 (I1 first-byte latency), PR #4120 (I4 NDX partition_point) and PR #4121 (I3 flush rate), and emitted via: - debug_log!(Genr, 1, "generator prepare_pending_acl totals: \ calls=N elapsed_ns=M") - tracing::debug! event on rsync::generator::prepare_acl when the optional tracing feature is enabled Two unit tests in crates/transfer/src/generator/tests.rs cover the new counters: - prepare_acl_call_counter_increments asserts the call counter and the cumulative elapsed_ns counter grow by at least N and sum-of-durations after N synthetic record_prepare_acl invocations. The assertion uses >= because the counter is shared across the process and other tests may run concurrently. - prepare_acl_totals_observable_without_prep asserts the totals snapshot is a pure read - constructing a generator does not bump the counter on its own, so two adjacent reads with no intervening prep call must return identical values. No new CLI flag, no wire-format change, no change to the public prepare_pending_acl signature. Closes #2200 * fix(transfer): rewrap rustdoc list items for prepare_pending_acl counters
Audit the sender-side INC_RECURSE capability gate, document the current disable mechanism, summarise the perf instrumentation that landed under tasks #2196-#2200, cross-reference the SSH and daemon push perf verification from #2209, and lay out the re-enable criteria for the eventual flip of inc_recursive_send from false to true. Recommendation: defer the flip until a 1M-file Mode C push profile run publishes I1-I5 totals alongside hyperfine wall-clock, and the gating criteria from docs/investigations/inc-recurse-sender-regression.md section 5 are met on two consecutive nightly runs. Includes a five-step plan for the eventual flip PR; the flip itself is out of scope here.
…4142) * feat(transfer): instrument prepare_pending_acl cost (INC_RECURSE I5) Adds INC_RECURSE diagnostic counter I5 (#2200): two process-global AtomicU64 counters that track every prepare_pending_acl invocation on the generator file-list path and the cumulative wall time spent inside the helper across all generator transfers. The counters fire from a single record_prepare_acl helper bumped from prepare_pending_acl itself, which wraps the existing body in an Instant::now() pair. The early-return path (entry.is_symlink() or !flags.acls) is still counted so per-segment call rate stays comparable to entry count, but contributes a near-zero ns delta. Totals are sampled in GeneratorContext::run via prepare_acl_totals() in the same finalize block used by PR #4103 (I1 first-byte latency), PR #4120 (I4 NDX partition_point) and PR #4121 (I3 flush rate), and emitted via: - debug_log!(Genr, 1, "generator prepare_pending_acl totals: \ calls=N elapsed_ns=M") - tracing::debug! event on rsync::generator::prepare_acl when the optional tracing feature is enabled Two unit tests in crates/transfer/src/generator/tests.rs cover the new counters: - prepare_acl_call_counter_increments asserts the call counter and the cumulative elapsed_ns counter grow by at least N and sum-of-durations after N synthetic record_prepare_acl invocations. The assertion uses >= because the counter is shared across the process and other tests may run concurrently. - prepare_acl_totals_observable_without_prep asserts the totals snapshot is a pure read - constructing a generator does not bump the counter on its own, so two adjacent reads with no intervening prep call must return identical values. No new CLI flag, no wire-format change, no change to the public prepare_pending_acl signature. Closes #2200 * fix(transfer): rewrap rustdoc list items for prepare_pending_acl counters
Audit the sender-side INC_RECURSE capability gate, document the current disable mechanism, summarise the perf instrumentation that landed under tasks #2196-#2200, cross-reference the SSH and daemon push perf verification from #2209, and lay out the re-enable criteria for the eventual flip of inc_recursive_send from false to true. Recommendation: defer the flip until a 1M-file Mode C push profile run publishes I1-I5 totals alongside hyperfine wall-clock, and the gating criteria from docs/investigations/inc-recurse-sender-regression.md section 5 are met on two consecutive nightly runs. Includes a five-step plan for the eventual flip PR; the flip itself is out of scope here.
…4142) * feat(transfer): instrument prepare_pending_acl cost (INC_RECURSE I5) Adds INC_RECURSE diagnostic counter I5 (#2200): two process-global AtomicU64 counters that track every prepare_pending_acl invocation on the generator file-list path and the cumulative wall time spent inside the helper across all generator transfers. The counters fire from a single record_prepare_acl helper bumped from prepare_pending_acl itself, which wraps the existing body in an Instant::now() pair. The early-return path (entry.is_symlink() or !flags.acls) is still counted so per-segment call rate stays comparable to entry count, but contributes a near-zero ns delta. Totals are sampled in GeneratorContext::run via prepare_acl_totals() in the same finalize block used by PR #4103 (I1 first-byte latency), PR #4120 (I4 NDX partition_point) and PR #4121 (I3 flush rate), and emitted via: - debug_log!(Genr, 1, "generator prepare_pending_acl totals: \ calls=N elapsed_ns=M") - tracing::debug! event on rsync::generator::prepare_acl when the optional tracing feature is enabled Two unit tests in crates/transfer/src/generator/tests.rs cover the new counters: - prepare_acl_call_counter_increments asserts the call counter and the cumulative elapsed_ns counter grow by at least N and sum-of-durations after N synthetic record_prepare_acl invocations. The assertion uses >= because the counter is shared across the process and other tests may run concurrently. - prepare_acl_totals_observable_without_prep asserts the totals snapshot is a pure read - constructing a generator does not bump the counter on its own, so two adjacent reads with no intervening prep call must return identical values. No new CLI flag, no wire-format change, no change to the public prepare_pending_acl signature. Closes #2200 * fix(transfer): rewrap rustdoc list items for prepare_pending_acl counters
Audit the sender-side INC_RECURSE capability gate, document the current disable mechanism, summarise the perf instrumentation that landed under tasks #2196-#2200, cross-reference the SSH and daemon push perf verification from #2209, and lay out the re-enable criteria for the eventual flip of inc_recursive_send from false to true. Recommendation: defer the flip until a 1M-file Mode C push profile run publishes I1-I5 totals alongside hyperfine wall-clock, and the gating criteria from docs/investigations/inc-recurse-sender-regression.md section 5 are met on two consecutive nightly runs. Includes a five-step plan for the eventual flip PR; the flip itself is out of scope here.
…4142) * feat(transfer): instrument prepare_pending_acl cost (INC_RECURSE I5) Adds INC_RECURSE diagnostic counter I5 (#2200): two process-global AtomicU64 counters that track every prepare_pending_acl invocation on the generator file-list path and the cumulative wall time spent inside the helper across all generator transfers. The counters fire from a single record_prepare_acl helper bumped from prepare_pending_acl itself, which wraps the existing body in an Instant::now() pair. The early-return path (entry.is_symlink() or !flags.acls) is still counted so per-segment call rate stays comparable to entry count, but contributes a near-zero ns delta. Totals are sampled in GeneratorContext::run via prepare_acl_totals() in the same finalize block used by PR #4103 (I1 first-byte latency), PR #4120 (I4 NDX partition_point) and PR #4121 (I3 flush rate), and emitted via: - debug_log!(Genr, 1, "generator prepare_pending_acl totals: \ calls=N elapsed_ns=M") - tracing::debug! event on rsync::generator::prepare_acl when the optional tracing feature is enabled Two unit tests in crates/transfer/src/generator/tests.rs cover the new counters: - prepare_acl_call_counter_increments asserts the call counter and the cumulative elapsed_ns counter grow by at least N and sum-of-durations after N synthetic record_prepare_acl invocations. The assertion uses >= because the counter is shared across the process and other tests may run concurrently. - prepare_acl_totals_observable_without_prep asserts the totals snapshot is a pure read - constructing a generator does not bump the counter on its own, so two adjacent reads with no intervening prep call must return identical values. No new CLI flag, no wire-format change, no change to the public prepare_pending_acl signature. Closes #2200 * fix(transfer): rewrap rustdoc list items for prepare_pending_acl counters
Summary
Testing
[Codex Task](