fix(desktop): stop overriding an operator's global RUST_LOG level - #7287
Open
artemtrofymenko wants to merge 2 commits into
Open
fix(desktop): stop overriding an operator's global RUST_LOG level#7287artemtrofymenko wants to merge 2 commits into
artemtrofymenko wants to merge 2 commits into
Conversation
child_rust_log_filter appends `buzz_acp=info` to any filter that does not already mention `buzz_acp`. A bare level is such a filter, and a target directive outranks the global one, so the append reverses the operator's intent in both directions: `RUST_LOG=off` still logs this crate at info, and `RUST_LOG=trace` is narrowed back to info for the one crate they were trying to debug. Forward a filter that sets a global level unchanged. Named and numeric spellings both count — `EnvFilter` accepts `0`..`5` as levels, and `0` is the case that matters most, since widening "log nothing" is the opposite of the request. Target-only filters still gain the harness default, an explicit `buzz_acp` filter is still passed through, and unset still defaults, so the change is confined to the case that was wrong. Reported independently by @cristiansotogarciaxatech on block#6035 while reviewing the log-target defect; this is the part of that discussion which survives block#3309 landing, since it lives in the desktop rather than in the crate's targets. Signed-off-by: Artem Trofymenko <99894081+artemtrofymenko@users.noreply.github.com>
Signed-off-by: Artem Trofymenko <readycsvapp@gmail.com> Signed-off-by: Artem Trofymenko <99894081+artemtrofymenko@users.noreply.github.com>
🔐 Codex Security Review
|
Chessing234
approved these changes
Sep 5, 2026
Chessing234
left a comment
Contributor
There was a problem hiding this comment.
preserving a bare global level (and not appending buzz_acp=info over it) is the right operator-facing behavior. tests cover off/trace/mixed.
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.
What
child_rust_log_filterappendsbuzz_acp=infoto anyRUST_LOGthat does not already mentionbuzz_acp. A bare level is such a filter, and inEnvFiltera target directive outranks the global one, so the append reverses the operator's intent in both directions:offoff,buzz_acp=infotracetrace,buzz_acp=infoA filter that sets a global level is now forwarded unchanged. Named and numeric spellings both count —
EnvFilteraccepts0..5, and0is the case that matters most, since widening "log nothing" is the opposite of the request.Everything else is untouched: a target-only filter still gains the harness default, an explicit
buzz_acpfilter is still passed through verbatim, and unset still defaults tobuzz_acp=info.Why separately
This was found by @cristiansotogarciaxatech while reviewing the log-target defect on #6035 — the credit is theirs. It is worth its own PR because it lives in the desktop's child-env construction rather than in the crate's targets, so it survives #3309 landing and is not fixed by it. I have stood down #6035 in favour of #3309 and this carries over the one part of it that #3309 does not address.
Testing
Four tests in the existing
mod testscover the global-level cases (named, numeric, whitespace, mixed with targets) and the three behaviours that must not change.Ran this repository's CI on a fork, since first-time-contributor workflows sit at
action_required: 29 jobs green, includingRust Lint,Desktop Core,Security,Windows Rust (msvc)and the macOS build. One job fails —Unit Tests, onbuzz-agent::fake_llm cancelled_turn_with_usage_emits_notification_before_response. That same test, by name, fails on upstreammaintoday (run 33740073893) in a crate this change does not touch.