← Back to Pull requests

Isolate the vehicle and server in two Android banners, and check how a name ends #556

Closed
unknown closed this pull request without merging on Nov 22, 2026 10:38 UTC
View on GitHub
unknown unknown commented on Nov 22, 2026 06:39 UTC
Author

This closes the gaps #551 left. Two banners put a value into a translated sentence without isolated(): the runs screen's start error with the vehicle ID, and the login error with the server's address. In Arabic or Persian, a vehicle ID like 599-20 could show as 20-599 there. Both now go through isolated(), as the rest of the app does.

The helper itself looked only at how a name starts, so "Metro محطة" in an English sentence came back unwrapped, and a time after it was pulled into the name. It now looks at how the name ends too, as Android's BidiFormatter does. In a left-to-right sentence, a name is left alone only when it neither starts nor ends right to left; in a right-to-left one, only when it does both. I went with that rather than wrapping any name that holds an opposite-direction letter, because it sets apart only what can disturb its neighbours, and English names in English sentences still come back unchanged.

BidiTextTest gets two cases:

  • "Metro محطة" followed by a time in an English sentence: it shows the wrong order without the change and the right one with it.

  • "محطة Metro" is set apart in an Arabic sentence, while "محطة 5" isn't.
  • Checked with testDebugUnitTest (942 pass), compileDebugAndroidTestKotlin and lintDebug, with no finding in the changed files.

    Fixes #553

    Diff: 162 lines (+121 / -41) across 2 files Reviewer: aaronbrethorst Review duration: 239m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.35 · 162 lines diff across 2 files
    0.35
    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.305
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #556"
    general weight: 0.35
    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: 34.9% (LOW) · Higher = larger blast radius
    34.9%
    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: 13.8% · Safe to merge
    13.8%