← Back to Pull requests

Improve MessageFilter logging and refactor search element styles #253

Closed
unknown closed this pull request without merging on Mar 26, 2026 22:38 UTC
View on GitHub
unknown unknown commented on Feb 16, 2026 17:42 UTC
Author

commit d19499d804fa60449d57c036e91a5aec8eebeb9c

Improve MessageFilter logging and refactor search element styles

Refactors the ToStringStyle implementations for MessageFilter and related
search elements to significantly improve debuggability and log readability.

Key Changes:
- Refactored MetaDataSearchElementToStringStyle into a generic
SearchElementToStringStyle to eliminate code duplication.
- Added ContentSearchElementToStringStyle:
- Converts raw content codes into human-readable ContentType names
(e.g., "1(Raw)") instead of opaque integers.
- Updated MessageFilterToStringStyle:
- Replaced legacy Calendar formatting with java.time (ZonedDateTime)
and included time and timezone id.
- Added recursive indentation logic to render nested collections
in a hierarchical format.
- Applied new styles to ContentSearchElement and MetaDataSearchElement
toString() methods.
- Previously ContentSearchElement was inheriting the Object.toString
method.

This change primarily adds detail for ContentSearchElements when viewing
the MessageFilter in the server event log. The addition of the time and
timezone id fill in some missing details for the start and end times.
The additonal reformats improve readability.

commit 9ad3055ff6547994e7bd181d0dfd5a9516bf59cf

Add JUnit 4 tests for search element model and style classes

Added 100% test coverage for

ContentSearchElement
MetaDataSearchElement
MessageFilterToStringStyle
SearchElementToStringStyle
* ContentSearchElementToStringStyle

Diff: 214 lines (+160 / -54) across 2 files Reviewer: kayyagari Review duration: 55015m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 214 lines diff across 2 files
0.37
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.321
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #253"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 36.6% (MEDIUM) · Higher = larger blast radius
36.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.4% · Safe to merge
14.4%