← Back to Pull requests

Render safe disclosures through native Markdown interpretation #900

Closed
unknown closed this pull request without merging on Oct 12, 2026 20:55 UTC
View on GitHub
unknown unknown commented on Oct 12, 2026 19:30 UTC
Author

Summary


Add safe conversation Markdown disclosures using the existing native Markdown stack, replacing the unshipped custom recognizer from #889. That PR and its dirty regression work remain preserved; this replacement is based on current main and retains landed #890/#891 and wake-removal behavior.

Changed


  • Recognize top-level, non-nested details with a leading phrasing summary inside native code/link/container contexts; retain native keyboard behavior, Markdown bodies and only boolean open.

  • Make complete reference-label syntax shield disclosure markers before definition resolution. Missing definitions stay literal; malformed wrappers remain visible without promoting completed nested envelopes. ADR-099 records this explicit extension precedence.

  • Share a canonical AST across finalized rendering, streaming and conversation find; preserve global references/footnotes and complete disclosure chunks while memoizing expensive code/Mermaid rendering. File/plan find stays standard Markdown.

  • Use indexed source spans and disjoint native-owned compilation rather than masking, fixed-point reparsing or repeated suffix scans. Two pinned, narrow dependency patches expose static native tokenizer/compiler seams; no runtime source rewriting or framework replacement.

  • Align streaming fence interpretation with the native finalized parser rather than the old nested-markdown-fence heuristic; retain the legacy utility for other callers. Raw HTML execution and URL-policy expansion remain excluded.
  • Qualification and limits


    Published d783eefb45fe3795958ede5313c11837c6620193. Five hosted findings are addressed: nested streaming fences, malformed attribute horizons, invalid inner candidates, hidden Mermaid find targets, and native root admission. Independent full/delta reviews approved, including a caught-and-fixed inline-adjacency issue before publication.

    Full UI at immediate predecessor d47d33c6…: 156 files, 3,173 passed, 2 skipped, production browser bundle passed; its TypeScript failure is retained, not reported green. The final state-holder typing correction passed actual-source TypeScript and 340 focused tests; exact-head hosted CI 38304868280 is green on attempt2. Attempt1 failed an unchanged inline-reaction timing assertion; the whole owning module passed locally, and one diagnosed retry passed. Both receipts remain retained. Earlier real-App Chromium synthetic journeys verify Enter/Space, hidden text/Mermaid find reveal and same-context links; they are attributed to their built source heads, not represented as final-head browser proof. Hosted exact-head review completed at 2026-10-12T20:39:16Z; exhaustive top-level and nested feedback audit found all five findings resolved and no new findings. No predecessor CI is reused as successor qualification.

    Earlier prototype failures and two independent-review red→green fixes are retained, not overwritten. Extension work bounds do not assert that all native Markdown processing is linear. Native HAST conversion still has an inherited stack limit at 4,096 nested blockquotes. No iOS/physical-device acceptance, residual-scroll fix, history implementation, merge or deployment is included. Global owns any landing decision.

    Diff: 412 lines (+309 / -103) across 5 files Reviewer: scottopell Review duration: 85m
    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 · 412 lines diff across 5 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.360
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #900"
    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: 44.9% (MEDIUM) · Higher = larger blast radius
    44.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: 17.7% · Safe to merge
    17.7%