watch/prs: skip pull requests the fast pass cannot have missed #1575
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.47) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 547 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.377
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 item
"Review active on #1575"
general
weight: 0.35
barney-s
sdowell
The fast pass evaluated every assigned pull request every cycle, and an evaluation costs the better part of a dozen GitHub requests. On the kcc deployment most of those cycles reached the same verdict as the one before, because nothing about the pull request had changed.
needsEvaluation compares the listing's updated_at against the one the last complete evaluation recorded, and skips the pull request when it has not moved. evaluate clears any previously recorded evaluation up front and calls recordEvaluation only once it finishes cleanly, so every early return - a stop label, the merge queue, a history or check fetch failure, a sandbox probe or enqueue failure, a conflict rebase, an inactivity pause - leaves the pull request unrecorded and it is looked at again next cycle. Conversely, a pull request that already has an active task in the queue records that fact and returns before fetching history or checks, since no second task can be queued and the next fast pass can skip it until the task finishes. recordEvaluation re-reads state rather than taking a copy, because the handlers that ran in between write their own progress to the same record.
The gate has two blind spots where state transitions without moving updated_at, and both are covered rather than tolerated:
A check run completing, or GitHub finishing its background mergeability calculation (Mergeable == nil), does not touch the pull request's updated_at. A pull request whose last evaluation saw pending or failing CI or an unknown Mergeable state is therefore never skipped, and evaluateChecks propagates listing errors so a failed check read is never mistaken for a green build.
A task finishing is what makes a pull request ready for a human, and it can finish without pushing anything. The gate re-evaluates whenever HasActivePRTask disagrees with the last evaluation.
The sweep never consults the gate. That asymmetry is deliberate: it is the bounded safety valve for anything neither clause anticipates, which is what makes the gate safe to be aggressive about. For the same reason the record is not recovered from the queue on startup, so a fresh process earns one full evaluation per pull request.