Conversation
|
Claude finished @insipx's task —— View job Code Review — March 26, 2026 at 11:00 UTCSummaryThis PR adds Android-specific tracing filters to enable TRACE-level logging for specific critical paths ( Code Quality ✅
Potential Issues
|
| { | ||
| use tracing_subscriber::EnvFilter; | ||
| let api_calls_filter = EnvFilter::builder().parse_lossy("xmtp_api=debug"); | ||
| let api_calls_filter = EnvFilter::builder().parse(ANDROID_TRACING_FILTER); |
There was a problem hiding this comment.
🔴 Critical src/logger.rs:33
EnvFilter::builder().parse(ANDROID_TRACING_FILTER) returns Result<EnvFilter, ParseError>, but api_calls_filter is passed directly to .with_filter() on line 42, which expects an EnvFilter. This causes a type mismatch — either a compilation error or silent misbehavior if coercion occurs. Either restore .parse_lossy() or unwrap the result (e.g., .expect("valid filter")) to match the type expected by with_filter().
- let api_calls_filter = EnvFilter::builder().parse(ANDROID_TRACING_FILTER);
+ let api_calls_filter = EnvFilter::builder().parse_lossy(ANDROID_TRACING_FILTER);🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file bindings/mobile/src/logger.rs around line 33:
`EnvFilter::builder().parse(ANDROID_TRACING_FILTER)` returns `Result<EnvFilter, ParseError>`, but `api_calls_filter` is passed directly to `.with_filter()` on line 42, which expects an `EnvFilter`. This causes a type mismatch — either a compilation error or silent misbehavior if coercion occurs. Either restore `.parse_lossy()` or unwrap the result (e.g., `.expect("valid filter")`) to match the type expected by `with_filter()`.
Evidence trail:
bindings/mobile/src/logger.rs lines 33 and 42 at REVIEWED_COMMIT: line 33 `let api_calls_filter = EnvFilter::builder().parse(ANDROID_TRACING_FILTER);` and line 42 `.with_filter(api_calls_filter)`. Git diff MERGE_BASE..REVIEWED_COMMIT shows change from `.parse_lossy()` (returns `EnvFilter`) to `.parse()` (returns `Result<EnvFilter, ParseError>`). Test at line 405-407 uses `.unwrap()` confirming `parse()` returns a Result. docs.rs tracing_subscriber/filter/env/builder.rs lines 141 (parse_lossy returns EnvFilter) vs lines 156-157 (parse returns Result).
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. You can customize Macroscope's approvability policy. Learn more. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3358 +/- ##
==========================================
+ Coverage 82.93% 83.02% +0.09%
==========================================
Files 376 376
Lines 50896 50901 +5
==========================================
+ Hits 42213 42263 +50
+ Misses 8683 8638 -45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add Android-specific tracing filter for
send_messageand MLS sync pathsxmtp_api=debugdirective with a multi-target filter defined in the newANDROID_TRACING_FILTERconstant in logger.rs, enabling TRACE forxmtp_mls::groups::send_messageandsend_message_optimistic, and DEBUG forxmtp_mls::mls_syncandxmtp_api_d14n.release_max_level_debugtorelease_max_level_traceso TRACE-level events are not elided at compile time in release builds.📊 Macroscope summarized a4d5b38. 1 file reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues