← Back to Pull requests

fix(extension): keep media hints separate from chat context #553

Closed
unknown closed this pull request without merging on Nov 05, 2026 11:58 UTC
View on GitHub
unknown unknown commented on Nov 01, 2026 20:57 UTC
Author

Summary


With Auto off, opening the panel on an article cached its 1,200-character media preview as chat source. The first question could therefore miss the rest of the article before any summary was generated.

Store media hints separately from extracted source content. Keep media indicators and statistics available, preserve full transcripts and provenance, and clear hints with tab/window caches. Use exact URL identity throughout probing, including hash navigation, and avoid deleting newer source content when an older probe starts.

Behavior proof


Separate browser-session request/reply capture exercises production extension builds at the exact base and PR head in fresh Chromium profiles. A real HTTP server delivers the controlled article, and a local OpenAI compatibility bridge forwards incoming chat messages to the configured real CLI model and returns its actual reply. With Auto off and media priming complete, the first question sends 1,189 transcript characters on the base and 8,273 on the PR. Only the PR request includes the fresh end marker, which the model returns. Summary content stays empty throughout. The built panel UI runs in an extension tab.

The maintained Chromium regression also checks the first outgoing request before any summary. Its article HTML and provider replies are intercepted; the content script, background, panel, and request construction use the built extension. It fails on the base and passes with this change.

Validation


  • pnpm run build

  • pnpm run check: 3,892 passed, 43 optional/live skips

  • pnpm -C apps/chrome-extension test:chrome: 3 production checks, 120 passed, 8 optional/live skips

  • Nine focused media-hint regressions cover first chat in Browser/Daemon modes, source preservation, delayed responses, navigation, UI metadata, and cleanup
  • No dependency, permission, persisted cache format, or companion protocol changes.

    Maintainer validation

    Both first-chat regressions fail against the base extraction code and pass with this patch. pnpm run check: 3,886 passed, 49 optional skips. pnpm -C apps/chrome-extension test:chrome: three production checks and 121 browser tests passed, seven optional skips, including the built-extension first-chat end-marker assertion. Independent P0–P2 review is clean.

    Diff: 295 lines (+221 / -74) across 3 files Reviewer: steipete Review duration: 5221m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 295 lines diff across 3 files
    0.45
    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.340
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #553"
    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: 45.0% (MEDIUM) · Higher = larger blast radius
    45.0%
    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: 17.8% · Safe to merge
    17.8%