← Back to Pull requests

redline: a hold record names the repository and the model, and the host can be held to one repository #275

Merged
askalf merged 7 files (592 lines) on Dec 01, 2026 13:29 UTC
View on GitHub
askalf askalf commented on Dec 01, 2026 13:19 UTC
Author

A record of an approving local review, which the hold takes as the leave to read a head, now names
the repository the review read the commit as and the model it was read on, and the hold takes one
only for the pull request's own repository and a model its host pins now. A host that runs the
review for someone else can hold local.mjs review to one repository with REDLINE_LOCAL_REPO.

WHY

The record (#266) was a commit's sha and a verdict. Any approving review on the host put one,
whatever repository its pack named and whatever model it was read on, and the hold took it for any
pull request whose head is that sha. Where the review runs for a job on the runner host, the pack is
the job's own work, and the job can name any repository in it. A record still buys only a read of
that head, under the full round cap, never an approval; binding it keeps that read to the
repository and the reviewer it was meant for.

WHAT CHANGES

  • review.mjs: localReadRecord(headSha, at, repo, model) writes version 2,

  • { version: 2, head_sha, repo, model, verdict: 'APPROVE', at }. approvedLocally(dir, headSha,
    log, io, bind)
    takes a record only when, besides what it checked before, its repo is
    bind.repo compared without case and its model is one of bind.models; a version-1 record,
    another repository, no repository to compare with, a model not among the pins or no pins is no
    record, and the log names which without the record's content. The hold passes the run's own
    repository and the host's routine and deep models (not the pin-only or fallback model).
  • local.mjs: recordLocalApprove(dir, { head, repo, model }, at, io) refuses a record without an

  • owner/name repository or a model. review writes the pack's repository and the model the review
    was read on. With REDLINE_LOCAL_REPO set, review refuses a malformed value before anything is
    read, and reviewLocal refuses a pack of any other repository (compared without case), or one
    that names none, before a model is called; each is exit 2 with nothing on record.
  • README (scripts/redline, the hold section): what a record binds and what it does not (the sha to

  • the tree the review read), and that a review by hand over ssh, with REDLINE_LOCAL_REPO unset, is
    the host's own and trusted as such. CHANGELOG.

    UNTRUSTED INPUT AND WHERE IT GOES

  • A pack's change.json repo, from whoever packed it: compared with REDLINE_LOCAL_REPO when set,

  • and written into the record as a string; the hold compares it with the run's own repository and
    never uses it as a path or a command.
  • A record file, from whoever can write the record directory: read as before (a regular file, not

  • a link, at most 4096 bytes, JSON); its repo and model are compared as strings, and the log
    names the run's own repository, never the record's.
  • REDLINE_LOCAL_REPO, from the host's environment: checked as owner/name.
  • NOT IN THIS CHANGE

    The host side: the runner host's review door setting REDLINE_LOCAL_REPO to each row's repository,
    and the record directory with the hold's setting. No host sets REDLINE_LOCAL_READS yet, so there
    are no version-1 records to replace.

    TESTS

  • review.test.mjs: a version-2 record of this repository and a pinned model is taken (repository

  • matched without case, any pin); the version before, a version written as text, another repository,
    no repository, a model not pinned and no model are each no record, with the log line; with no
    repository to match or no pins nothing is taken. Through runReview: a record of another
    repository, of an unpinned model or of the version before leaves the head held with no model call
    and the log line; one read on the deep pin lifts the hold, and one read on the fallback or the
    pin-only model does not. The record's JSON shape.
  • local.test.mjs: recordLocalApprove writes the repository and model and refuses each of a missing

  • repository or model, a repository that is no owner/name and a path in its place; the review in CI
    takes the written record only for its repository and pins. The review command on the host: with
    REDLINE_LOCAL_REPO naming another repository, exit 2 with no review and nothing on record; naming
    the pack's own in other case, the review runs and the record names askalf/r and the model; a
    pack that names no repository is refused, exit 2 and nothing on record; a malformed value ends it
    before anything is read.
  • On Linux: review.test.mjs 776 pass, local.test.mjs 204, fix.test.mjs 528, build.test.mjs 316.

  • 18 mutants of the binding (the version, repository and model checks, the pins the hold passes,

  • the host's repository check, what a record is written with), each failing review.test.mjs or
    local.test.mjs.

    Diff: 592 lines (+444 / -148) across 7 files Reviewer: None requested Review duration: 10m
    All Vouch review confidence checks passed
    Residual risk 0.49 = Change Risk (0.77) × (1 − Review Confidence (0.37)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.77 · 592 lines diff across 7 files
    0.77
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 70% · Reviewer familiarity: 10%
    36%
    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.382
    Shallow Review Depth shallow_review_depth
    0.344
    Wip Merged wip_merged
    0.150
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Real PR Conversation Timeline
    1 comments
    "Review active on #275"
    general weight: 0.35
    Reviewers
    None requested
    Assignees
    askalf askalf
    Labels
    risk: medium confidence: 36.8% 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: 77.0% (HIGH) · Higher = larger blast radius
    77.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: 36.8% · Lower = rushed or shallow review
    36.8%
    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: 48.7% · Moderate risk
    48.7%
    Repository