feat: wire --debug=send producer emissions to match upstream rsync 3.4.1#4062
Merged
Conversation
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.
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.
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
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=sendgot no output.Upstream rsync 3.4.1 emits five SEND-gated diagnostics from
sender.c send_filesunderDEBUG_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 correspondingpoints of
run_transfer_loopincrates/transfer/src/generator/transfer.rs.The
path/slash/fnametriplet collapses to the relative file namebecause the in-band file list does not track
F_PATHNAMEper sourceroot, 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 frommissingtoimpland marks D13 RESOLVED.Refs #2192.
Test plan
cargo nextest run -p transfer --all-features -E 'test(send_debug_emission_tests)'