Repository navigation
test(bundle): drive the configured hold and sweep sections through dist/index.js - #293
Conversation
…st/index.js __tests__/bundle/holdSweepSettings.test.ts routes a .github/prow.yaml and runs the committed bundle against it: - hold.label: /hold applies the configured label; /hold cancel removes it and the legacy hold label and leaves do-not-merge/hold alone - hold refusals: not a mapping, empty and non-string label - sweep.lookback: the window the sweep job lists for, its 24h cap, and the empty-window return - sweep refusals: not a mapping, non-string, unparsable and zero lookback normalizeHold, normalizeSweep and duration.ts had no bundle hits before this; npm run test:coverage:e2e goes from 2460 to 2500 of 3182 statements. Signed-off-by: quality <quality@hive.kubestellar.io>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will keep the |
|
The red 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
jeefy
left a comment
There was a problem hiding this comment.
Three of the eleven cases reach exactly what another case reaches.
- Drop
holdSweepSettings.test.ts:117–121. The 24h cap is a plainMath.minwith no branch (config.ts:622), so it reaches the same lines as:108. - Drop either
:60–73or:75–89. Both only reach the code that acceptshold.label, and/holdand/unholdthemselves are covered at bundle.test.ts:902/:921. - Drop one of the
it.eachrows at:93and:94(label: ""andlabel: 7). Both hit the throw at config.ts:524.
…old-sweep-settings
Signed-off-by: quality <quality@hive.kubestellar.io>
|
Addressed all three: dropped the 24h-cap case, the 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 |
|
Addressed in f2b7b1c: dropped the 24h-cap case, the CI is green on the new head. 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/kind cleanup |
Test Improvement
Files:
__tests__/bundle/holdSweepSettings.test.tsonly (new; nosrc/, nohelpers.ts, no existing suite touched). Disjoint from the open bundle PRs: #289 (tide.missing_labels/labelMatch), #291 (blunderbuss), #283 (OWNERS authorization), #286 (approve.github_review), #246 (labels/fixed.ts), #244 (/meow).Routes a
.github/prow.yamland runs the committeddist/index.jsagainst it — the first bundle tests to parse theholdandsweepsections, and the first to drive a malformed-config refusal end-to-end:hold.label/holdposts{ labels: ['needs-hold'] }instead ofdo-not-merge/hold/hold canceldeletes the configured label (case-insensitively) and the legacyhold, and leavesdo-not-merge/holdin placehold: [],label: "",label: 7— each fails before any label read or writesweep.lookback30m: the loggedsincelies betweenstarted − 30mandfinished − 30m(the child's clock ticks somewhere inside the run); the empty window makes only the page read (sweep.ts:64)48his capped at 24hsweep: 5,lookback: 30(not a string),lookback: soon(reachesduration.ts:26),lookback: 0mEvidence (
main@ 3fc21f2, Node v26.10.0, vitest 5.0.3):npx vitest run __tests__/bundle/holdSweepSettings.test.ts→ 11 passed, 3/3 runs, 0 unhandled errorsnpm run test:coverage:e2e: 2460 → 2500 of 3182 statements (77.31 % → 78.57 %); newly reachedconfig.ts353, 365, 519–527, 592–612,duration.ts26 (now 100 %),sweep.ts64,handleIssueComment.ts188npx eslint __tests__/bundle/holdSweepSettings.test.tsandnpx tsc --noEmitcleanRelated Issue
Closes #292
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88