← Back to Pull requests

Redline: bound the search, ground findings in omitted files, guard the fix lane's key and test gate #11

Merged
askalf merged 5 files (478 lines) on Oct 06, 2026 10:49 UTC
View on GitHub
askalf askalf commented on Oct 05, 2026 18:45 UTC
Author

A review of this repository found gaps in both lanes. The reviewer's regex search could hang on a file in the PR. Findings quoting a changed file the diff cap left out were dropped as ungrounded. The fix lane ran dependencies' install scripts as the account that reads the model key, could ship a credential in its commit, could reuse a stale passing test run, and could overrun its job timeout. The pin bump stopped at the first failing caller.

Change

Review (review.mjs)

  • redline_search (and fix_search) runs in a child process killed after 10 seconds.

  • A quote from a changed file the diff could not show (past the cap, or no patch from GitHub) is grounded by that file in the checkout. Lines are added one at a time, so a file of many short lines still grounds.

  • Model calls take an absolute deadline: no attempt or retry wait starts past it, and each attempt's timeout is the time left.

  • An unreadable env file or an uncaught error exits 2, never the 1 of REQUEST_CHANGES.
  • Fix (fix.mjs)

  • Install scripts. npm, pnpm, yarn 1 and bun install with --ignore-scripts. For yarn 2 and later the install first reads yarn --version, then passes --skip-builds for yarn 2 or --mode=skip-build for yarn 3 and later. A version it cannot read installs nothing. YARN_ENABLE_SCRIPTS=false is set as well, but a dependenciesMeta built: true overrides it, so it is never the only guard.

  • Credentials. The model key and the read token are checked in the diff, in each kept file's bytes, and in each staged blob read from the index. A clean filter can stage bytes the working tree lacks. Each staged blob is sized first and refused past 1 MB, and one that cannot be listed, sized or read is a refusal. fix.json and notes.md are checked too, and the job log masks both values.

  • Test freshness. Each test run records a hash of the changed files' bytes and executable bits, measured against the reviewed head. Only a run whose hash is current counts, so a change made by node <file> after a passing run is tested again.

  • Time. The budget counts from the start, install included. No command, test or model call starts past 52 minutes, and a run out of time is refused. A placeholder fix.json is written first, so a timed-out job still uploads one.

  • git add takes the kept paths literally.
  • Tools, pins and workflows

  • fix-tools.json is the fixer's TOOLS as a file, drift-checked by dump-tools.mjs and pinned in truecopy.lock next to tools.json.

  • redline-pin-bump.yml bumps each caller in its own subshell, so one repository's failure no longer ends the loop. An updated bump PR gets the new body. Tests, fixtures and the scripts README no longer trigger a bump.

  • The READMEs and workflow comments match the code: the pin bump token's Workflows permission, the self-test on every PR, and the time limits.
  • Limits

    Commands the fix lane runs, the PR's tests and the model's node <file> among them, run as the account that reads FIX_ENV_FILE. The checks above keep the key out of what leaves the runner through the commit, the bundle and the report. They do not stop code that reads the key and sends it over the network. Closing that is the host's part: a separate account for those commands, or an egress rule.

    Checked

  • node scripts/redline/review.test.mjs: 206 pass. node scripts/redline/fix.test.mjs: 291 pass. node scripts/redline/dump-tools.mjs --check matches both files, and truecopy verify (0.10.4) passes both pins.

  • Each new test fails with its fix removed.

  • The yarn behaviour was checked against real Yarn 2.4.2 and 4.5.0. The variable alone lets a built: true dependency's postinstall run on both, the per-version flag stops it, and 2.4.2 rejects --mode=skip-build.
  • https://claude.ai/code/session_01BQPGsApn6atJeJdERuf8vh

    Diff: 478 lines (+358 / -120) across 5 files Reviewer: None requested Review duration: 963m
    All Vouch review confidence checks passed
    Residual risk 0.35 = Change Risk (0.63) × (1 − Review Confidence (0.44)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 478 lines diff across 5 files
    0.63
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 10%
    44%
    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.369
    Shallow Review Depth shallow_review_depth
    0.344
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #11"
    general weight: 0.35
    Reviewers
    None requested
    Assignees
    askalf askalf
    Labels
    risk: medium confidence: 44.2% 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: 62.8% (MEDIUM) · Higher = larger blast radius
    62.8%
    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: 44.2% · Lower = rushed or shallow review
    44.2%
    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: 35% · Moderate risk
    35%
    Repository