Repository navigation
fix(agent): quiet routine refresh traffic and rustls in --verbose logs - #561
Merged
Merged
Conversation
#559/#560 silenced h2 frame tracing and the three cursor/probe polls, but --verbose still fills up with the per-refresh request bursts of the desktop context panel (it polls every 1.5 s while a run is live): get_commands, list_providers, get_state, refresh_skills, get_session_entries and a dozen list_tool_calls in a row, plus list_models every 10 s. Widen the TRACE promotion from is_poller_command to is_background_command over a BACKGROUND_COMMANDS table covering those panel/catalog reloads; the test asserting every name is a real command keeps a typo from silently dead-coding a log line. rustls also joins the WARN-pinned transport targets: its 'Sending warning alert CloseNotify' DEBUG line comes from the log-compat debug! macro that tracing-subscriber bridges into tracing, so a plain target filter catches it. Envoy/other TLS handshake chatter is silenced the same way, while RUST_LOG still overrides the whole filter.
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.
Problem
After #559 (h2 frame tracing) and #560 (cursor/probe polls),
future agent --verbosestill fills up with the desktop context-panel refresh burst. The panel polls every 1.5 s while a run is live (useContextData.ts), and one refresh sends:list_tool_callsin particular arrives in bursts (one per run of the active thread), plus alist_modelssweep every 10 s. None of it is a user action.Separately, one TLS line slipped past #559's target list:
rustls logs through the
logcrate (debug!fromrustls::log), whichtracing-subscriberbridges into tracing viaLogTracer— so it carries rustls's own target and is caught by a plain target filter.Change
agent/src/grpc/mod.rs— widen the TRACE promotion fromis_poller_commandtois_background_command, backed by aBACKGROUND_COMMANDStable:get_events_since,get_session_events_since,list_streaming_sessionsget_commands,get_session_entries,get_state,get_tool_output,list_models,list_providers,list_tool_calls,refresh_skillsUser-intent commands (
prompt,abort, settings mutations, session management, …) keep logging at DEBUG.RUST_LOG=trace(orfuture_agent::grpc=trace) still surfaces every request.agent/src/cli.rs— addrustlstoNOISY_TRANSPORT_TARGETS(h2,rustls,tonic,tower), pinned to WARN. Its DEBUG output is per-record TLS detail; failures still surface at WARN/ERROR.Tests
verbose_logs_background_commands_at_trace_only(renamed from the fix(agent): keep --verbose free of poller RPC heartbeats #560 test) —list_tool_callsis absent from adebug-filtered capture whileget_agent_infois present.background_commands_are_all_known_commands(new) — every name in the table resolves throughfuture_rpc::command_policy::command_policy, so a typo cannot silently dead-code a log line;prompt/abortstay outside the set.verbose_default_filter_enables_grpc_debug_events— extended to assert rustls DEBUG is off (and h2 WARN still on) under--verbose.Verification
cargo fmt -p future-agent --check✅cargo clippy -p future-agent --all-targets -- -D warnings✅cargo test -p future-agent— 1707 passed; the 31 failures are the pre-existing Windows-only ones (sandbox::paths,rpc::prompt_helpers,sandbox::linux, …) that fail identically on unmodifiedmain.