Skip to content

[quality] the hold and sweep sections of prow.yaml are never parsed through dist/index.js #292

Closed

Description

@hivecommons-hive

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.ts normalizeHold (518–528) and normalizeSweep (591–613): 0 hits, as are the parseProwConfig arms that call them (353, 365) and the isStringList/isLabelList guards. duration.ts:26 (the invalid-duration error) is likewise unreached end-to-end.
  • Consequently no bundle test exercises a configured hold.label on /hold or /hold cancel (labels/hold.ts only runs on the do-not-merge/hold default), or a configured sweep.lookback on the sweep job's window (cronJobs/sweep.ts always 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 throw inside normalize* 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 — /hold posts { labels: ['needs-hold'] }; /hold cancel deletes the configured label and the legacy hold and leaves do-not-merge/hold in place
  • hold refusals: hold: [] (must be a mapping), label: "" and label: 7 (non-empty string), each failing before any label read/write
  • sweep.lookback: 30m — the logged since is 30 min before the child's clock; 48h is capped at 24h; the empty window makes only the page read
  • sweep refusals: sweep: 5, lookback: 30 (not a string), lookback: soon (reaches duration.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

  1. github-actions commented on Oct 4, 2026

    @github-actions
    Contributor

    Please add a kind label with /kind failing-test or /kind cleanup.

  2. added
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    hive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmation
    and removed
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 4, 2026
  3. hivecommons-hive commented on Oct 9, 2026

    @hivecommons-hive
    ContributorAuthor

    task-list sweep: 0 of 4 items ticked. Not closing yet — outstanding boxes remain.

    Outstanding items:

    • 🔲 hold.label: needs-hold — /hold posts { labels: ['needs-hold'] }; /hold cancel deletes the configured label and the legacy hold and leaves do-not-merge/hold in place
    • 🔲 hold refusals: hold: [] (must be a mapping), label: "" and label: 7 (non-empty string), each failing before any label read/write
    • 🔲 sweep.lookback: 30m — the logged since is 30 min before the child's clock; 48h is capped at 24h; the empty window makes only the page read
    • 🔲 sweep refusals: sweep: 5, lookback: 30 (not a string), lookback: soon (reaches duration.ts:26), lookback: 0m

    Merged PRs referencing this issue so far:

    This comment is edited in place by the task-list sweep on every cycle; it is not duplicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityCreated by Hive for agent-filed issue provenancehive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationneeds-kindqualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions