fix(runs): #3920 webhook 409 scoped to the run surface + #3910 deferred test hygiene #4920
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 241 lines diff across 3 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.328
Real PR Conversation Timeline
1 comments
"Review active on #4920"
general
weight: 0.35
claude[bot]
Implements #3920 (AT0.10035, CHECKED, T1). Items 1-11.
Production touches (two, both small):
bootPromptRefusalCode(err, surface?)+ webhook passes'run'(item 1, behavior change per cor:agt:040:10, FIT COMPLIANT); scheduler hoists the code to a const (item 9, neutral). The scheduler stays surface-blind on purpose (the issue scopes item 1 to the webhook).Tests: all in
3689-apprun-agent-required.test.tsunless noted. Item 4 is cherry-picked3c600840(rollback pin, loud restore hook). Item 2: real-state pins (NOT_SET with an existing Agent, TARGET_DELETED, NOT_APPROVED) and forced run-surface pins (INSTALL_LICENSE_INACTIVE, NOT_SIGNED) at webhook and scheduler, each asserting no run and no served record. Item 1 red pin: every code raised for bind/chat inside the handler is not a 409 (12 red without the check). Item 8: note PL/pgSQLWHEN OTHERSnever matches 57014 (query_canceled), so the issue's example alone cannot kill a widened catch (my first mutant survived); the pin runs 57014 plus 22012 and 23505, and the OTHERS mutant is killed by the last two. Item 10: post-pushSET NOT NULLline pinned. Items 5, 6, 7, 11 as written. Item 7 audit: of 58 inlinetestRunAgentIduses onlyserver.contentValidation1332.test.tsasserted on an Agent it had in scope; it now passes it explicitly, the rest do not depend on which Agent the run names. Rename of the helper not taken (optional, 58 sites).Mutants killed: webhook surface check dropped (12 red);
WHEN OTHERSin block+migration (22012, 23505 red); post-push line removed (pin red); restore without SET NOT NULL (hook throws, 5 red).migration.sqlandapp-run-agent-pre-push.sqlbyte-identical. Local: pin file 33/33, bootPrompt + webhooks + jobs + contentValidation 813/813, tsc = the 2 known Prisma TS2305s, check:loc-scope and null-context OK.Closes #3920.
🤖 Generated with Claude Code