test(server,app): execute src/server's entry point and bundle, pin #614's cron arms, and gate src/adapters/app/** + src/server/** at 100% (main.ts, node.ts:24/67/82, webhook.ts:65, cron.ts:85, vitest.config.mjs) #611
All Vouch review confidence checks passed
Residual risk 0.33 = Change Risk (0.75) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 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.388
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #611"
general
weight: 0.35
jeefy
Test Improvement
Seven test files and one test-config change; nothing under
src/,dist/or docs touched.From the original PR (main@282b8e0):
__tests__/server/main.test.ts— loadingsrc/server/main.tscallsmain()once with no arguments.__tests__/server/node.test.ts— withbuildReceiver's defaultbackground, a signedissue_commentis answered 202 while its dispatch is still pending (node.ts:24).__tests__/adapters/app/webhookNonErrorThrow.test.ts—receiveWebhookanswers 400unusable deliveryand logs the thrown value whenappPlatformthrows a non-Error (webhook.ts:65).__tests__/server/bundle.test.ts— buildssrc/server/main.tswith ncc into a temp directory outside the repository, boots it, checks therequire()list is builtins only,/healthz, a signedpingand an unsigned one.Added after #614 landed (branch rebased onto main@1ce22f0), for the finding folded into #610:
__tests__/server/main.test.ts— also:node dist-server/index.js cronrunsrunCronOnce()once and setsprocess.exitCodeto its result (main.ts:6-7).__tests__/server/cronInterval.test.ts— aPROW_CRON_INTERVALtick whose scheduled run rejects (realGET /app/installations→ 500 through octokit) is logged as{ level: 'error', event: 'schedule' }with norepo,/healthzkeeps answering and the next tick still polls (node.ts:82); withPROW_CRON_INTERVALunset, a day of fake time schedules nothing.__tests__/server/cronIntervalNonErrorRejection.test.ts— theString(error)arm of the same catch, withrunScheduledJobsmocked to reject with a plain object (octokit only ever throwsErrors, same approach aswebhookNonErrorThrow.test.ts).__tests__/server/portDefault.test.ts—env.PORT ?? 8080observed through a mocked@hono/node-serverserve, so nothing binds :8080 on the runner (the arm the first revision left unpinned).__tests__/adapters/app/cron.test.ts— one more case: a scheduled handler that throws a non-Error is reported as[object Object]and counted inreport.failed(cron.ts:85).vitest.config.mjs— per-path thresholds'src/adapters/app/'and'src/server/'at 100 % lines/branches/functions/statements, next to the global 99 floor.Added after review (rebased onto main@9643326, after #615/#616/#618):
__tests__/adapters/app/platform.test.ts— one more case:appPlatform's defaultDeferStrategy(deferInPlace,platform.ts:26-29, added by #615 with zero unit hits) waits the whole delay under fake timers and then answers'continue'. Without it the newsrc/adapters/app/gate fails on main at 98.58 % lines.vitest.config.mjs— the four pre-existing threshold keys quoted sostyle/quote-propsagrees with the glob keys (the redbuild-test).__tests__/server/cronInterval.test.ts—stdoutLinestakes the structural mock shape instead ofReturnType<typeof vi.spyOn>, whichtsc -p tsconfig.test.json(#599) rejects as an implicitany.src/server/worker.ts/worker-env.d.tsstay out of unit coverage as #615 set them: the per-path threshold is evaluated over the filescoverage.excludeleaves in, so'src/server/'passes at 100 % with the Worker excluded (verified by the whole-suite run below).Why.
vitest.e2e-coverage.config.mjs:45-47excludessrc/adapters/app/andsrc/server/from the bundle run because "unit coverage holds them to 100%". Nothing enforced that premise — the global floor is 99 and the rest ofsrc/absorbs whole uncovered arms in the App adapter — and #614 was the first time it bit:cron.ts:85, both arms ofnode.ts:82andmain.ts:6-7landed with zero hits. The thresholds make the exclusion's premise a check on every run; the tests are what lets the check pass today.Files / cluster claimed —
src/server/,src/adapters/app/webhook.ts:65,src/adapters/app/cron.ts, and thethresholdsblock ofvitest.config.mjs(#605 edits that file'ssetupFilesline, a separate hunk). Disjoint from every other held PR: #591/#593/#597 (plugins, dispatcher, labels), #595 (setup.ts, config), #596 (bundle scenario for sweep), #598 (testUtils.ts), #599 (tsconfig.test.json), #601 (coverageIgnoreHints.test.ts), #603 (runtime.test.ts), #609 (src/platform/index.ts), #612 (receiveWebhookrefusal texts), #613 (decodeContent).Testing
At 447b98c (rebased onto main@9643326):
npm run test:coverage(whole suite, with the per-path thresholds) — 222 files, 2646 passed; 100 / 99.77 / 100 / 100, exit 0, no threshold error;src/adapters/appandsrc/serverabsent from the uncovered tablenpx vitest run --coverage --coverage.include='src/server/' --coverage.include='src/adapters/app/*' __tests__/server __tests__/adapters/app— 12 files, 66 passed, "8 files fully covered"npm run typecheck— clean;npx eslint vitest.config.mjs __tests__/adapters/app/platform.test.ts __tests__/server/cronInterval.test.ts— cleandeferInPlacereturning'deferred', orawait sleep(delayMs)→void delayMs, both fail the newplatform.test.tscase; replacing thenode.ts:82sink call withvoid errorfails both interval tests;?? 8080→?? 3000failsportDefault.test.ts; removing thecronbranch frommain.tsfails the newmain.test.tscase;String(error)→""incron.ts:85fails the newcron.test.tscaseRelated Issue
Closes #610 — every box of the original finding and of the one folded onto it (cron.ts:85, node.ts:67/82, main.ts cron arm, per-path thresholds) is in this PR.
---
Filed by quality agent (hold-gated mode). Human review required.*