← Back to Pull requests

redline: the fix brief keeps the line ends a review was posted with #287

Merged
askalf merged 3 files (31 lines) on Dec 02, 2026 12:10 UTC
View on GitHub
askalf askalf commented on Dec 02, 2026 12:06 UTC
Author

#286 made the fix brief carry a review's text as posted. It still read that text from a copy with CRLF turned into LF, so a request sent with CRLF line ends (an example a reviewer wants matched exactly) reached the fixer changed. Its comment also said the round trip compares "every character", which it does not.

What changes

  • parseReviewBody keeps the body as it came (raw). Fields are still read from the LF copy, but the whole-body finding and text (the review as posted in the brief) are cut from raw. The closing head marker comes off by position, with one blank line before it, LF or CRLF.

  • The comment says what the round trip compares: the body line for line up to its closing head marker, with line ends read as LF and trailing spaces and tabs on a line and whitespace after the marker set aside. The text the fixer gets keeps the line ends and trailing spaces.
  • Checks

    On Linux, Node 22: fix.test.mjs 571 pass, review.test.mjs 789, local.test.mjs 209, post.test.mjs 157, build.test.mjs 316, 0 fail each. New cases: a CRLF request with no marker kept exactly; with a marker, only the marker and its CRLF blank line taken off, the trailing spaces before it kept; a CRLF Redline body read into fields and reaching the brief with its line ends; a body of spaces and a CRLF: no finding, and its text is the input as it came. The LF cases from #286's fix (an ending with no footer, and the footer taken off with only its separator) still pass.

    Mutation pass, 3 mutants: the text cut from the LF copy, the separator matched as LF only, and the text trimmed at its end. All 3 fail a named check.

    Diff: 31 lines (+23 / -8) across 3 files Reviewer: sprayberry-redline Review duration: 4m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.63)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 31 lines diff across 3 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.35 · 1 substantive comment(s)
    0.35
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    62%
    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.207
    Rapid Merge rapid_merge
    0.100
    Real PR Conversation Timeline
    1 comments
    "Review active on #287"
    general weight: 0.35
    Assignees
    askalf askalf
    Labels
    risk: low confidence: 62.7% 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: 62.7% · Lower = rushed or shallow review
    62.7%
    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.7% · Safe to merge
    13.7%
    Repository