Repository navigation
[quality] sweep cron's empty-window, failed-listing and blunderbuss-freshness arms have no end-to-end coverage #344
Copy link
Copy link
Closed
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationHive verified that a merged PR references or claims this issue; pending confirmationkind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Description
Finding
src/cronJobs/sweep.ts is fully unit-covered, but the end-to-end suite (__tests__/bundle, run via npm run test:coverage:e2e) never reaches these arms on main @ 3fc21f2:
| line | arm |
|---|---|
| 64 | sweep: no open pull request updated within sweep.lookback → empty result |
| 175 | recentlyUpdatedPulls: pulls.list fails → sweep: could not list the open pull requests |
| 150–151 | requestReviewersIfFresh: pull request opened before the window |
| 154–155 | requestReviewersIfFresh: draft, or reviewers already requested |
| 159–160 | requestReviewersIfFresh: somebody already reviewed |
Evidence:
- unit:
npx vitest run --coverageonmain@ 3fc21f2 →src/cronJobs/sweep.ts100 % lines (wholesrc/2382/2382 lines). - e2e:
npm run test:coverage:e2eonmain@ 3fc21f2 →src/cronJobs/sweep.ts67/76 statements (87.83 % lines, 76.92 % branches); the uncovered statements are exactly the lines above plus 75 (enqueued). - Not claimed by any open bundle PR: test(bundle): drive the configured hold and sweep sections through dist/index.js #293 drives
sweep.lookbacksettings only; test(bundle): drive the configured blunderbuss section through dist/index.js #291 drives blunderbuss throughpull_request, not the sweep; test(bundle): drive tide's merge-queue skip and enqueue-refusal arms through dist/index.js #322 covers tide's merge-queue arms (which is where line 75 belongs, so it is left out here).
The sweep is the pull_request install mode's only write path for fork pull requests, so a regression in its listing or in blunderbuss's freshness guards (spamming review requests on every sweep) would be invisible to the shipped bundle's tests.
Recommendation
- Add
__tests__/bundle/sweepArms.test.tsdriving thescheduleevent withjobs: sweepthroughdist/index.jsfor: an empty window, a 500 frompulls.list, and, on a repository with OWNERS files, each of the three freshness guards plus the pass-through case.
Priority
- Impact: low — covered by unit tests, not by end-to-end tests
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 4ce67a0
— hive: agent=quality backend=copilot model=claude-fable-5.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationHive verified that a merged PR references or claims this issue; pending confirmationkind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Activity
hivecommons-hive commentedon Oct 6, 2026
/kind cleanup
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5q9t| SHA:4ce67a0— hive: agent=quality backend=copilot model=claude-fable-5.1