Skip to content

feat: wire --debug=send producer emissions to match upstream rsync 3.4.1#4062

Merged
oferchen merged 1 commit into
masterfrom
feat/debug-send-flag-emissions-2192
May 14, 2026
Merged

feat: wire --debug=send producer emissions to match upstream rsync 3.4.1#4062
oferchen merged 1 commit into
masterfrom
feat/debug-send-flag-emissions-2192

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

The audit (D13 in docs/audits/debug-flags-verbosity-matrix.md)
flagged that the SEND subsystem existed in the debug flag table but
was never invoked from any emission site, so users passing
--debug=send got no output.

Upstream rsync 3.4.1 emits five SEND-gated diagnostics from
sender.c send_files under DEBUG_GTE(SEND, 1):

  • send_files starting (sender.c:217-218)
  • send_files phase=%d (sender.c:254-255)
  • send_files(%d, %s%s%s) (sender.c:277-278)
  • sender finished %s%s%s (sender.c:445-446)
  • send files finished (sender.c:457-458)

oc-rsync's generator role is the sender; this PR wires the
equivalent debug_log!(Send, 1, ...) calls at the corresponding
points of run_transfer_loop in crates/transfer/src/generator/transfer.rs.
The path/slash/fname triplet collapses to the relative file name
because the in-band file list does not track F_PATHNAME per source
root, so the upstream prefix is empty.

Six unit tests assert byte-for-byte wording for each of the five
upstream messages plus a suppression check confirming emissions are
gated on debug.send. The audit doc rolls SEND from missing to
impl and marks D13 RESOLVED.

Refs #2192.

Test plan

  • cargo nextest run -p transfer --all-features -E 'test(send_debug_emission_tests)'
  • CI fmt + clippy
  • CI nextest stable
  • CI Windows / macOS / Linux musl matrices

The audit (D13 in debug-flags-verbosity-matrix.md) flagged that the
SEND subsystem existed in the debug flag table but was never invoked
from any emission site, so `--debug=send` produced no output.

Upstream rsync 3.4.1 emits five SEND-gated diagnostics from
`sender.c send_files` under `DEBUG_GTE(SEND, 1)`:

- `send_files starting` (sender.c:217-218)
- `send_files phase=%d` (sender.c:254-255)
- `send_files(%d, %s%s%s)` (sender.c:277-278)
- `sender finished %s%s%s` (sender.c:445-446)
- `send files finished` (sender.c:457-458)

oc-rsync's generator role is the sender; this change wires the
equivalent `debug_log!(Send, 1, ...)` calls at the corresponding
points of `run_transfer_loop`. The `path/slash/fname` triplet
collapses to the relative file name because the in-band file list
does not track `F_PATHNAME` per source root, so the upstream
prefix is empty.

Six unit tests assert byte-for-byte wording for each of the five
upstream messages plus a suppression check confirming emissions
are gated by `debug.send`. The audit doc rolls SEND from missing
to impl and marks D13 RESOLVED.

Refs #2192.
@github-actions github-actions Bot added the enhancement New feature or request label May 14, 2026
@oferchen oferchen merged commit 5a0444a into master May 14, 2026
44 of 45 checks passed
@oferchen oferchen deleted the feat/debug-send-flag-emissions-2192 branch May 14, 2026 14:57
oferchen added a commit that referenced this pull request May 18, 2026
…4.1 (#4062)

The audit (D13 in debug-flags-verbosity-matrix.md) flagged that the
SEND subsystem existed in the debug flag table but was never invoked
from any emission site, so `--debug=send` produced no output.

Upstream rsync 3.4.1 emits five SEND-gated diagnostics from
`sender.c send_files` under `DEBUG_GTE(SEND, 1)`:

- `send_files starting` (sender.c:217-218)
- `send_files phase=%d` (sender.c:254-255)
- `send_files(%d, %s%s%s)` (sender.c:277-278)
- `sender finished %s%s%s` (sender.c:445-446)
- `send files finished` (sender.c:457-458)

oc-rsync's generator role is the sender; this change wires the
equivalent `debug_log!(Send, 1, ...)` calls at the corresponding
points of `run_transfer_loop`. The `path/slash/fname` triplet
collapses to the relative file name because the in-band file list
does not track `F_PATHNAME` per source root, so the upstream
prefix is empty.

Six unit tests assert byte-for-byte wording for each of the five
upstream messages plus a suppression check confirming emissions
are gated by `debug.send`. The audit doc rolls SEND from missing
to impl and marks D13 RESOLVED.

Refs #2192.
oferchen added a commit that referenced this pull request May 18, 2026
…4.1 (#4062)

The audit (D13 in debug-flags-verbosity-matrix.md) flagged that the
SEND subsystem existed in the debug flag table but was never invoked
from any emission site, so `--debug=send` produced no output.

Upstream rsync 3.4.1 emits five SEND-gated diagnostics from
`sender.c send_files` under `DEBUG_GTE(SEND, 1)`:

- `send_files starting` (sender.c:217-218)
- `send_files phase=%d` (sender.c:254-255)
- `send_files(%d, %s%s%s)` (sender.c:277-278)
- `sender finished %s%s%s` (sender.c:445-446)
- `send files finished` (sender.c:457-458)

oc-rsync's generator role is the sender; this change wires the
equivalent `debug_log!(Send, 1, ...)` calls at the corresponding
points of `run_transfer_loop`. The `path/slash/fname` triplet
collapses to the relative file name because the in-band file list
does not track `F_PATHNAME` per source root, so the upstream
prefix is empty.

Six unit tests assert byte-for-byte wording for each of the five
upstream messages plus a suppression check confirming emissions
are gated by `debug.send`. The audit doc rolls SEND from missing
to impl and marks D13 RESOLVED.

Refs #2192.
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