Skip to content

fix: mirror upstream server diagnostic routing and max verbosity - #8198

Merged
oferchen merged 1 commit into
masterfrom
fix/mirror-server-diagnostic-routing
Oct 14, 2026
Merged

oferchen merged 1 commit into
masterfrom
fix/mirror-server-diagnostic-routing

Conversation

@oferchen

@oferchen oferchen commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

Mirror upstream's diagnostic routing between client, server and daemon.

  • Server forwards FINFO (log.c:312-366 rwrite): the server receiver and sender drain --info/--debug events to the client as MSG_INFO once multiplexing is active (io.c:1094), and also write them to the daemon log. Lines produced before multiplexing starts are logged only. -q suppresses them (log.c:344-346). Server-sender debug output used to be dropped entirely.
  • Client sends only --info= (options.c:3126-3130 server_options): --debug is no longer forwarded.
  • Daemon applies -M--info=/-M--debug= words (options.c:1883-1891), then caps each flag at the module's max verbosity (options.c:546-572 limit_output_verbosity, clientserver.c:1223). The default of 1 means a stock daemon emits no debug output (task 2641).
  • Server parses packed q (options.c:2804-2805), which was previously ignored.
  • docs/audits/debug-flags-verbosity-matrix.md sections 6 and 7 corrected.

Tests

  • New tests/server_diagnostics_reach_client.rs, 8 end-to-end cases covering SSH push and pull at -vvv versus -vv, -q, daemon max verbosity 3 versus the default 1, -M--debug capping, daemon -q, and daemon-sender lines reaching both the client and the daemon log (log.c:312-332, log before send). On master, 4 of the 7 fail; the 3 negative controls pass. All 8 pass here.

  • Unit tests for the peer drain order, the quiet drain, the error-only drain, the per-flag limit, q parsing, and argv without --debug.

  • 8 of 8 mutations were caught, each by its own test.

  • The -v, -vv and -q client output for SSH and daemon, push and pull, is unchanged from master once rate and time fields are masked.

  • tests/upstream_compat_inc_recurse_sender_oracle.rs used to rely on the client forwarding --debug=flist2 to the upstream server, which upstream never does. Its three cells now pass -M--debug=flist2, the upstream mechanism (options.c:1888-1891). The daemon fixture already sets max verbosity = 4, above FLIST2's row 3. Against the real 3.4.4 oracle the old file fails 3 of 4 and the new one passes 4 of 4, and pointing it at a missing oracle binary fails all 4, so the passes are not a silent skip. A sweep found no other test that depends on a forwarded --debug.

Deviations from upstream

  1. At -vvv the client prints its own lines at the end, from the buffered summary renderer. Forwarded server lines print as they arrive, so they come first, while upstream interleaves the two in real time. This client buffering already existed. -v and -vv are unaffected.
  2. The daemon applies --debug=X and --info=X only in the = form.
  3. Server debug lines raised on the disk-commit thread or rayon workers are still not forwarded. That is the existing gap GAP 1555/1563, out of scope here.

@github-actions github-actions Bot added the bug Something isn't working label Oct 14, 2026
@oferchen
oferchen force-pushed the fix/mirror-server-diagnostic-routing branch from 2ce040a to 7236908 Compare October 14, 2026 15:20
A server now frames every FINFO line - all --info and --debug output -
to the client as MSG_INFO unless --quiet, and a daemon still logs it
(log.c:312-366 rwrite). The receiver drains it with the error class;
the sender drains it before each idle flush and before its final NDX_DONE.
A client receiver keeps its own FINFO for its renderer.

The client no longer forwards --debug=: server_options() builds --info=
only (options.c:3126-3130). A server gets debug levels from -v or -M.

The daemon worker applies --info=/--debug= words from the client argv
after the -v seeding, then caps every flag to the module max verbosity
rows (clientserver.c:1223, options.c:546-572). The server honours the
packed q letter (options.c:2804-2805).
@oferchen
oferchen force-pushed the fix/mirror-server-diagnostic-routing branch from 7236908 to ad32874 Compare October 14, 2026 15:54
@oferchen
oferchen merged commit 6e82936 into master Oct 14, 2026
86 checks passed
@oferchen
oferchen deleted the fix/mirror-server-diagnostic-routing branch October 14, 2026 17:31
mevanlc pushed a commit to mevanlc/rsync-rs that referenced this pull request Oct 14, 2026
…erchen#8198)

A server now frames every FINFO line - all --info and --debug output -
to the client as MSG_INFO unless --quiet, and a daemon still logs it
(log.c:312-366 rwrite). The receiver drains it with the error class;
the sender drains it before each idle flush and before its final NDX_DONE.
A client receiver keeps its own FINFO for its renderer.

The client no longer forwards --debug=: server_options() builds --info=
only (options.c:3126-3130). A server gets debug levels from -v or -M.

The daemon worker applies --info=/--debug= words from the client argv
after the -v seeding, then caps every flag to the module max verbosity
rows (clientserver.c:1223, options.c:546-572). The server honours the
packed q letter (options.c:2804-2805).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant