Repository navigation
[quality] the hold and sweep sections of prow.yaml are never parsed through dist/index.js #292
Description
Finding
npm run test:coverage:e2e (added in #274) on main @ 3fc21f2 (Node v26.10.0, vitest 5.0.3) puts the bundle suite at 77.9 % lines of src/. Two of the eight prow.yaml sections have never been parsed by the shipped bundle:
src/utils/config.tsnormalizeHold(518–528) andnormalizeSweep(591–613): 0 hits, as are theparseProwConfigarms that call them (353, 365) and theisStringList/isLabelListguards.duration.ts:26(the invalid-duration error) is likewise unreached end-to-end.- Consequently no bundle test exercises a configured
hold.labelon/holdor/hold cancel(labels/hold.tsonly runs on thedo-not-merge/holddefault), or a configuredsweep.lookbackon the sweep job's window (cronJobs/sweep.tsalways runs on the 1h default; its empty-window return at line 64 is also unreached). - No bundle test anywhere drives a malformed-config refusal: every
throwinsidenormalize*is unit-only evidence.
Unit evidence: npx vitest run --coverage on the same revision (CI run 37157845384) reports 100 % lines for all of the above, so this is a unit-covered / not-e2e-covered gap — priority 2 under the lane's coverage rules. The two figures are reported separately on purpose (see #235: the vite and tsc+webpack statement maps do not line-merge).
Disjoint from the open bundle PRs: #289 covers tide.missing_labels/labelMatch, #291 covers blunderbuss, #283 OWNERS authorization, #286 approve.github_review, #246 /remove-help, lifecycle defaults and the no-config failure (labels/fixed.ts), #244 /meow.
Recommendation
One new bundle suite, __tests__/bundle/holdSweepSettings.test.ts, routing a .github/prow.yaml and asserting through dist/index.js:
-
hold.label: needs-hold—/holdposts{ labels: ['needs-hold'] };/hold canceldeletes the configured label and the legacyholdand leavesdo-not-merge/holdin place -
holdrefusals:hold: [](must be a mapping),label: ""andlabel: 7(non-empty string), each failing before any label read/write -
sweep.lookback: 30m— the loggedsinceis 30 min before the child's clock;48his capped at 24h; the empty window makes only the page read -
sweeprefusals:sweep: 5,lookback: 30(not a string),lookback: soon(reachesduration.ts:26),lookback: 0m
Measured locally with that suite: 2460 → 2500 of 3182 e2e statements (77.31 % → 78.57 %); normalizeHold, normalizeSweep and duration.ts fully reached by the bundle.
Priority
- Impact: medium — two documented config sections and every config refusal ship untested end-to-end
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 3fc21f2
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
Activity
github-actions commentedon Oct 4, 2026
Please add a kind label with
/kind failing-testor/kind cleanup.hivecommons-hive commentedon Oct 9, 2026
task-list sweep: 0 of 4 items ticked. Not closing yet — outstanding boxes remain.
Outstanding items:
hold.label: needs-hold—/holdposts{ labels: ['needs-hold'] };/hold canceldeletes the configured label and the legacyholdand leavesdo-not-merge/holdin placeholdrefusals:hold: [](must be a mapping),label: ""andlabel: 7(non-empty string), each failing before any label read/writesweep.lookback: 30m— the loggedsinceis 30 min before the child's clock;48his capped at 24h; the empty window makes only the page readsweeprefusals:sweep: 5,lookback: 30(not a string),lookback: soon(reachesduration.ts:26),lookback: 0mMerged PRs referencing this issue so far:
This comment is edited in place by the task-list sweep on every cycle; it is not duplicated.