fix(acp): re-root custom log targets under buzz_acp - #3309
fix(acp): re-root custom log targets under buzz_acp#3309troyhoffman-oss wants to merge 1 commit into
buzz_acp#3309Conversation
The default filter is `buzz_acp=info` — set in `run()` and matched by the desktop's child-process filter — but 84 log sites across the message-handling path declare their own target: `pool::session`, `pool::prompt`, `acp::wire`, `canvas::fetch`, and a dozen more. `EnvFilter` matches a target by prefix from its root, and none of those roots is `buzz_acp`, so every one of them was filtered out. Turn dispatch, wire traffic, and session lifecycle have never appeared in a production journal, and `RUST_LOG=buzz_acp=debug` — the line `TESTING.md` hands operators when the default log is too quiet — turned none of them on. Each target is now prefixed with `buzz_acp::`, so the crate filter reaches them while the existing suffixes keep working as narrower selectors (`RUST_LOG=buzz_acp::acp::wire=trace`). Names are otherwise unchanged, and nothing outside these call sites referenced them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Troy Hoffman <troy.hoffman@icloud.com>
|
This is the better fix for the defect, and I am standing down the duplicate I opened without finding this first — #6035 approaches the same problem from the filter side. Two things before it lands, one supporting and one blocking. Independent confirmation. Same conclusion from a Windows fleet: every The blocker: this turns verbatim conversation content on by default. The rename carries "agent_message_chunk" => {
if let Some(text) = update["content"]["text"].as_str() {
tracing::info!(target: "buzz_acp::acp::stream", "{text}");That site logs the model's reply verbatim, and the desktop appends the child's output to a persistent plaintext file whose rotation is only checked when the file is opened. Today the target is dark, so the statement is harmless; after this PR the default filter matches it and every assistant message on every machine running an agent is written to disk. This was raised against my PR by @ravarora2 and it is what reshaped it: the families are worth restoring at warn, where they carry timeouts, ids and failures, but Also: this is If a maintainer confirms this is the one to take, I will close #6035 rather than keep two open PRs against one defect. |
|
I am the source of the measurement @artemtrofymenko quoted above. Here it is first hand and refreshed this morning, plus two things I checked in source today that change what this PR needs before it lands. Every source reference below is at The field numberOne Windows box running managed agents. 18 log files, window
99,274 target-bearing lines, and those three rows sum to exactly that. The 1,192 foreign lines are the positive control. That file accepts a target that is not 1. A straight rebase leaves five sites behindThis branch rewrites 19 distinct targets. Main now has 20. The one that postdates the branch is Rebase as it stands and 5 of 93 sites stay dark. I read that as the argument for landing this quickly. Every week it sits, main adds more targets under the old convention, because there is nothing in the tree that stops it. 2. The content blocker is real. It is also narrower than this thread says.I went through all 93 sites by level. 25 Blocking.
Needs a ruling.
Already dark, and staying that way.
So the content fix here is two sites. It is not a redesign of the level scheme. Drop One note on shapeWorth saying plainly while the two approaches are being compared. This branch is 168 changed lines and every one of them contains I am not opening a competing PR. I have said the same on #6035. |
The default filter is
buzz_acp=info— set inrun()and matched by the desktop's child-process filter inmanaged_agents/runtime.rs— but 84 log sites across the message-handling path declare their own target:pool::session,pool::prompt,acp::wire,canvas::fetch, and a dozen more.EnvFiltermatches a target by prefix from its root, and none of those roots isbuzz_acp, so every one of them is filtered out. Turn dispatch, wire traffic, and session lifecycle never appear in a production journal, andRUST_LOG=buzz_acp=debug— the lineTESTING.mdhands operators when the default log is too quiet — turns none of them on.This is the mechanism behind an observation in #2795: that fix's only trace was "a
pool::modelWARN that never reaches the per-agent log files."Each target is now prefixed with
buzz_acp::, so the crate filter reaches them while the existing suffixes keep working as narrower selectors (RUST_LOG=buzz_acp::acp::wire=trace). Names are otherwise unchanged, and nothing outside these call sites referenced them.Pure rename — 84 insertions, 84 deletions, every changed line a
target:string. No behavior change beyond the logs becoming reachable.Testing
cargo test -p buzz-acp --lib:616 passed; 0 failed.cargo fmt --checkandcargo clippy -p buzz-acp --all-targetsclean.