test(adapters/app): pin receiveWebhook's refusal texts and header guard, dedupe's capacity boundary and settings' unset-input omission (webhook.ts:35-56, dedupe.ts:15, settings.ts:37) #612
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 435 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.364
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #612"
general
weight: 0.35
jeefy
Test Improvement
One new file,
__tests__/adapters/app/webhookGuards.test.ts(11 cases), for the GitHub App adapter #608 added. Nothing undersrc/,dist/, config or docs is touched.Why. The adapter landed at 100 % unit lines, but a Stryker pass over
src/adapters/app/{dedupe,scope,settings,webhook}.tsatmain@282b8e0(npx stryker runwith a config that only widensmutate;perTest,vitest.mutation.config.mjs) scored 81.08 % — 21 of 111 mutants survived. Four of them change behaviour:webhook.ts:35—!id || !eventName→&&: a delivery carrying only one of the two headers went on to signature verification instead of being refused. The existing case removes both headers, where||and&&agree.webhook.ts:48— the JSON-parsecatchbody removed: the 400body is not jsonis lost and the request falls through toappPlatform, which happens to throw a different 400.dedupe.ts:15—ids.size > capacity→>=: the store forgets an id at exactlycapacity. The existing case fills past capacity, where both comparisons evict.settings.ts:37—value !== undefinedguard →true: unset inputs become explicitundefinedkeys;toEqual({})cannot see them,toStrictEqualcan.The other 17 are response bodies and log lines nobody read (
missing delivery headers,bad signature,body is not json,pong,already handled,accepted; thewarning/infosink lines for a bad signature and a duplicate). The new file reads each of them once, checks that the header and signature refusals neither read the body (Request.bodyUsed) nor touch the delivery store, and that a malformed body leaves its delivery id unconsumed so a corrected redelivery is still handled.Re-run: 95.50 %,
dedupe.ts/scope.ts/settings.tsat 100 %. The five that remain are two equivalent mutants (new Response(…, {})defaults to 200) and the three onwebhook.ts:65-66, which #611 claims — left alone.Files / cluster claimed —
__tests__/adapters/app/webhookGuards.test.ts;src/adapters/app/dedupe.ts:15,settings.ts:37,webhook.ts:35-56,79. Disjoint from every held PR: #609 (src/platform/index.ts), #611 (src/server/*,webhook.ts:65, its ownwebhookNonErrorThrow.test.ts), #591/#593/#595/#597/#598/#599/#601/#603/#605 (plugins, dispatcher, labels, config, harness, typecheck, coverage hints, runtime). The bad-signature log line this file asserts in-process is the same text #611'sdist-serverbundle test looks for on stdout — different level, different file, and the unit assertion is what makes the Stryker mutant on line 40 die.No issue is filed for this: the repository's mutation-gate proposal (#594) is still awaiting a decision, and this is another instance of the class it covers.
Testing
npx vitest run __tests__/adapters/app— 4 files, 42 passednpx eslint __tests__/adapters/app/webhookGuards.test.ts— cleannpx stryker runover the four adapter files: 81.08 % → 95.50 %; each of the four behavioural mutants above is killed by the case named for itnpm run test:coverageat the base commit — 2525 passed, 99.88 % lines; the only branch misses are the four documented V8 await phantoms (close.ts:37,reopen.ts:34,approve.ts:502,auth.ts:224, negativeBRDAcounts) and the arms #609/#611 claim---
Filed by quality agent (hold-gated mode). Human review required.*
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88