[#1664] Use originating function name as log origin instead of Debug dump #1859
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.43) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 355 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.351
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1859"
general
weight: 0.35
Nawazz-ish
Notes for Reviewer
Follow up to the discussion in #1664, covering the "shorter origin" part only. PID and executable name are not in here, for the reasons in the issue comment.
29 call sites built their log origin with
format!("{self:?}"), which dumps the whole builder. For a service builder warning that comes to 6493 characters, and the identifying parts sit far enough in that truncating in the logger doesn't help.service_namestarts at char 280, the name itself at 352.This replaces them with the name of the originating function, which is what the other 133 origin sites in the tree already do (
let origin = "Config::global_config()";and so on). Before:After:
Two things worth mentioning:
Most of these sites used
format!("{self:?}")becauseselfgets moved or mutably borrowed further down, so aDebugsnapshot was the easy way to keep something to log. A&'static strsidesteps that, and drops an allocation from each of these paths, which is a small step towards #1450.Removing the
format!calls left 17use alloc::format;imports unused, so those are gone too. I checked each file has no remainingformat!usage rather than relying on the warning alone, in case any were feature gated.No behaviour change beyond the log text.
cargo fmt,cargo clippy --workspace --all-targetsandcargo test --workspaceare clean on aarch64 macOS. The one clippy warning iniceoryx2-bb-posixis present on main too.Naming is the part I would most like input on. I used
Type::method(), module qualified where the type name alone would be ambiguous, e.g.posix_shared_memory::Connector::open_sender(). Happy to change the scheme, it is a single line per site.Pre-Review Checklist for the PR Author
[x] Add sensible notes for the reviewer
[x] PR title is short, expressive and meaningful
[ ] Consider switching the PR to a draft (
Convert to draft)[x] Relevant issues are linked in the References section
[x] Branch follows the naming format (
iox2-1664-replace-debug-dump-origins)[x] Commits messages are according to commit message guidelines
[x] Commit messages have the issue ID (
[#1664])[ ] Tests follow best practice for testing guidelines - no new tests, log output only, see notes
References
Relates to #1664