Repository navigation
test(bundle): drive the sweep cron's empty-window, failed-listing and blunderbuss-freshness arms through dist/index.js - #345
Conversation
… blunderbuss-freshness arms through dist/index.js __tests__/bundle/sweepArms.test.ts runs the schedule sweep job against the fake GitHub for the arms of src/cronJobs/sweep.ts that no bundle test reached: the zero-candidate return, the pulls.list failure, and requestReviewersIfFresh's three early returns (opened before the window, draft or already requested, already reviewed), plus the pass-through case. npm run test:coverage:e2e on main @ 3fc21f2: sweep.ts 67/76 -> 75/76 statements; only the enqueued arm (line 75) remains. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 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 |
|
🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 |
jeefy
left a comment
There was a problem hiding this comment.
Six of the seven cases add coverage.
- Drop
sweepArms.test.ts:157–169. Requesting reviewers when every check passes is already covered at bundle.test.ts:2001.
Signed-off-by: quality <quality@hive.kubestellar.io>
|
Addressed: dropped the fresh-unreviewed-PR case whose reviewer request bundle.test.ts already covers. Merged 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 |
|
Addressed in 00d2ad2: dropped the all-guards-pass reviewer-request case. CI is green on the new head. 🐝 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.
The all-guards-pass case is dropped. One it.each row still adds nothing. I missed this in the first review.
sweepArms.test.ts:130: drop thealready has requested reviewersrow. Thea draftrow at :129 already reaches sweep.ts:153'sifand its return (154–155), and bundle.test.ts:2000 already evaluates both sides of that||on main. This is the same as the http:/credentials rows on #372.
…ready covers Signed-off-by: quality <quality@hive.kubestellar.io>
|
Addressed in 1bec826: dropped the 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/kind cleanup |
Test Improvement
Adds
__tests__/bundle/sweepArms.test.ts, which runs thescheduleevent withjobs: sweepthroughdist/index.jsagainst the fake GitHub for the arms ofsrc/cronJobs/sweep.tsno bundle test reached:sweepwith no open pull request updated within the window →sweep: 0 candidates updated since …, config reads + one listing page, nothing elserecentlyUpdatedPullswhenpulls.listanswers 500 → run fails withsweep: could not list the open pull requests: HttpError: boomrequestReviewersIfFreshon a repository with OWNERS files: opened before the window; draft / reviewers already requested; already reviewed (theper_page=1read happens, no request follows); and the pass-through case where reviewers are requestedFiles/functions claimed:
__tests__/bundle/sweepArms.test.ts(new) only;src/cronJobs/sweep.tslines 64, 150–160, 175. Line 75 (enqueued) is deliberately left to #322's merge-queue cluster. Disjoint from #293 (sweep.lookbacksettings) and #291 (blunderbuss viapull_request).Evidence (
main@ 3fc21f2):npm run test:coverage:e2e→sweep.ts67/76 → 75/76 statements.npx eslintclean;npx vitest run __tests__/bundle/sweepArms.test.ts→ 7 passed.Related Issue
Closes #344
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1