Repository navigation
Conversation
The receiver's goodbye handshake previously never emitted NDX_DEL_STATS, so daemon-receive (push with --delete --stats) transfers could not deliver per-type deletion counters back to the sender. Upstream's generator writes the message in both early (generator.c:2376-2381) and late (generator.c:2420-2425) paths gated on INFO_GTE(STATS, 2); the sender decodes them via read_ndx_and_attrs() (rsync.c:337-342). The receiver subsumes the generator in this codebase, so the emission is added to ReceiverContext::handle_goodbye() under matching conditions: protocol >= 31, do_stats, plus delete-mode-aware gating that mirrors the existing generator-side should_send_del_stats() logic. pipelined.rs now stashes the post-delete stats so they are available at goodbye time. Adds unit coverage for emission on early delete, suppression without --stats, late-delete behaviour, the protocol 30 guard, and the varint field order required by upstream main.c:225-238.
1 of 2 tasks
The handle_goodbye receiver phase uses W: Write + ?Sized so it can be called with trait object writers, but DeleteStats::write_to required an implicit Sized bound, breaking compilation when the receiver attempts to emit NDX_DEL_STATS during the daemon-receive goodbye exchange. Relax the bound to W: Write + ?Sized, matching the write_varint helper it delegates to.
2 tasks
oferchen
added a commit
that referenced
this pull request
Jun 10, 2026
Group PRs #5510, #5516, #5519, #5520, #5523, #5525-#5544 by shared root cause rather than by Stream bucket. Seven clusters surface; the parser- stores-string and field-vs-method shadowing clusters cover the largest share of the series, and the receiver-driver wiring-parity gap explains the NDX_DEL_STATS goodbye misses in both #5536 and #5542. Includes a defense-in-depth audit mapping each cluster onto the rust-landlock ruleset wired at crates/fast_io/src/landlock.rs. Doc-only; no code paths touched.
oferchen
added a commit
that referenced
this pull request
Jun 10, 2026
Group PRs #5510, #5516, #5519, #5520, #5523, #5525-#5544 by shared root cause rather than by Stream bucket. Seven clusters surface; the parser- stores-string and field-vs-method shadowing clusters cover the largest share of the series, and the receiver-driver wiring-parity gap explains the NDX_DEL_STATS goodbye misses in both #5536 and #5542. Includes a defense-in-depth audit mapping each cluster onto the rust-landlock ruleset wired at crates/fast_io/src/landlock.rs. Doc-only; no code paths touched.
The goodbye_del_stats unit tests hard-coded NDX_DONE as the 4-byte little-endian sequence used by the legacy NDX codec (protocol < 30). Protocols 30 and 31 use the modern codec, which encodes NDX_DONE as a single zero byte. The hard-coded fixtures therefore produced wire data that the receiver decoded as `-256` instead of `-1`, failing on every feature-combo cell that compiled the transfer crate. Route both the synthetic sender input and the assertion-side decoder through `create_ndx_codec(protocol)` so the test inputs and outputs match whichever codec the receiver actually uses, mirroring the pattern already established by `legacy_goodbye_tests`. No production code is touched.
Owner
Author
|
Superseded by #5520, which already addresses UTS-6 (#3569 daemon-delete-stats) at the correct layer. #5520 wires --stats into ServerConfig.do_stats so the existing generator-side goodbye emitter in crates/transfer/src/generator/transfer/goodbye.rs (should_send_del_stats + write_del_stats) fires for daemon-receive pushes. This PR added emission in the receiver's handle_goodbye, but the generator owns NDX_DEL_STATS emission in this codebase (the receiver-side phases.rs only consumes the sender-echoed frame). Same supersession pattern as #5535. Closing without merge. |
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
Group PRs #5510, #5516, #5519, #5520, #5523, #5525-#5544 by shared root cause rather than by Stream bucket. Seven clusters surface; the parser- stores-string and field-vs-method shadowing clusters cover the largest share of the series, and the receiver-driver wiring-parity gap explains the NDX_DEL_STATS goodbye misses in both #5536 and #5542. Includes a defense-in-depth audit mapping each cluster onto the rust-landlock ruleset wired at crates/fast_io/src/landlock.rs. Doc-only; no code paths touched.
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
NDX_DEL_STATSemission to the receiver's goodbye handshake so daemon-receive (push with--delete --stats) transfers correctly deliver per-type deletion counters back to the sender.do_stats && delete_modeconditions used bycrate::generator'sshould_send_del_stats.run_pipelinedso they are available whenhandle_goodbyewrites the final NDX frames.Upstream Reference
generator.c:2376-2381earlywrite_del_stats()pathgenerator.c:2420-2425latewrite_del_stats()pathmain.c:225-238write_del_stats()wire formatrsync.c:337-342read_ndx_and_attrs()consumesNDX_DEL_STATSTest plan
goodbye_del_stats_tests.rscovering:NDX_DEL_STATS+ 5 varints +NDX_DONE, then echoNDX_DONE.do_stats=false.--delete-delay/--delete-after) emits ondo_statsalone.main.c:225-238.