Skip to content

Align --server execution and rsync-path forwarding - #2200

Merged
oferchen merged 2 commits into
masterfrom
fix-server-and-rsync-path-implementations
Nov 21, 2025
Merged

oferchen merged 2 commits into
masterfrom
fix-server-and-rsync-path-implementations

Conversation

@oferchen

@oferchen oferchen commented Nov 21, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • use exec on Unix server entrypoints so the fallback server runs with upstream-compatible stdio handling
  • forward --rsync-path as a single argument when constructing fallback invocations
  • update remote fallback test expectations for the new rsync-path formatting

Testing

  • cargo test -p cli --tests server -- --nocapture

[Codex Task](

@oferchen
oferchen merged commit 7250e0b into master Nov 21, 2025
@oferchen
oferchen deleted the fix-server-and-rsync-path-implementations branch November 21, 2025 09:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread crates/cli/src/frontend/server.rs Outdated
Comment on lines +152 to +154
match command.exec() {
Ok(_) => unreachable!("exec only returns on error"),
Err(error) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge 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 👍 / 👎.

oferchen added a commit that referenced this pull request May 16, 2026
…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
oferchen added a commit that referenced this pull request May 17, 2026
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.
oferchen added a commit that referenced this pull request May 18, 2026
…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
oferchen added a commit that referenced this pull request May 18, 2026
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.
oferchen added a commit that referenced this pull request May 18, 2026
…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
oferchen added a commit that referenced this pull request May 18, 2026
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.
oferchen added a commit that referenced this pull request Aug 24, 2026
…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
oferchen added a commit that referenced this pull request Aug 24, 2026
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.
oferchen added a commit that referenced this pull request Aug 24, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant