Finding
The bundle e2e suite (__tests__/bundle/bundle.test.ts, spawning the committed dist/index.js against fakeGithub.ts) never exercises the two non-comment entry points of the ok-to-test trust marker, nor the listing arms of the sweep cron job:
okToTestOnPullRequest (src/issueComment/trigger.ts:173) — the pull_request handler registered in pullRequestHandlers (src/pullReq/handlePullReq.ts:18) that approves the runs waiting on a new head on synchronize/reopened. The only bundle routes for GET …/actions/runs and POST …/actions/runs/<id>/approve are in the issue_comment /retest and /ok-to-test cases (bundle.test.ts:743-800); no pull_request case routes them.
approveIfTrusted (src/cronJobs/sweep.ts:140) — the ok-to-test step of sweepPullRequest, including its 403 (cannot approve workflow runs: grant \actions: write` to the workflow`) and listing-failure arms being collected per pull request.
recentlyUpdatedPulls (src/cronJobs/sweep.ts:172) — the page-2 read when a full page is still inside the window, the stale-tail stop, the zero-candidate run, and the could not list the open pull requests failure. The existing schedule sweep job block (bundle.test.ts:1816) answers only page=1.
Evidence
Recommendation
Add a new bundle file __tests__/bundle/sweepOkToTest.test.ts driving dist/index.js through:
Disjoint from every open bundle PR: #238 (/cc …/reopen), #240 (/test, lgtm cancel), #242 (cron jobs input arms), #244 (/meow), #246 (fixed/prefixed labels), #248 (label-sync inputs), #250 (/assign, /milestone), #252 (dispatcher arms, /hold aliases). Disjoint from the unit-level #225 (trigger/tide residual fallbacks) and #219 (evaluateMerge).
Priority
- Impact: medium — the sweep is the only write path for fork pull requests; its
ok-to-test step and listing pagination are what a busy repository hits first, and neither is ever run end to end
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: c48bd6d
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
Finding
The bundle e2e suite (
__tests__/bundle/bundle.test.ts, spawning the committeddist/index.jsagainstfakeGithub.ts) never exercises the two non-comment entry points of theok-to-testtrust marker, nor the listing arms of thesweepcron job:okToTestOnPullRequest(src/issueComment/trigger.ts:173) — thepull_requesthandler registered inpullRequestHandlers(src/pullReq/handlePullReq.ts:18) that approves the runs waiting on a new head onsynchronize/reopened. The only bundle routes forGET …/actions/runsandPOST …/actions/runs/<id>/approveare in theissue_comment /retestand/ok-to-testcases (bundle.test.ts:743-800); nopull_requestcase routes them.approveIfTrusted(src/cronJobs/sweep.ts:140) — theok-to-teststep ofsweepPullRequest, including its 403 (cannot approve workflow runs: grant \actions: write` to the workflow`) and listing-failure arms being collected per pull request.recentlyUpdatedPulls(src/cronJobs/sweep.ts:172) — the page-2 read when a full page is still inside the window, the stale-tail stop, the zero-candidate run, and thecould not list the open pull requestsfailure. The existingschedule sweep jobblock (bundle.test.ts:1816) answers onlypage=1.Evidence
npx vitest run --coverageonmain@ c48bd6d (Node v26.10.0,@vitest/coverage-v85.0.1) →src/cronJobs/sweep.tsandsrc/issueComment/trigger.ts100% lines; All files 99.82% lines. These paths are unit-covered (__tests__/cronJobTest/sweep.test.ts,__tests__/issueCommentTest/trigger.test.ts).src/is not machine-captured ([quality] the bundle e2e suite's coverage of src/ is never captured — runBundle.ts drops NODE_V8_COVERAGE and dist/ has no source map #235, fix in test(bundle): opt the node --check spawn out of NODE_V8_COVERAGE so the suite survives coverage.autoAttachSubprocess #236), so this is established by inspecting the suite's routed requests directly:grep -n 'actions/runs' __tests__/bundle/bundle.test.tsmatches only lines 747-797 (the comment commands), and the sweep block'srouteListservespage === '1' ? prs : []. Not an inference from the unit coverprofile.Recommendation
Add a new bundle file
__tests__/bundle/sweepOkToTest.test.tsdrivingdist/index.jsthrough:schedulejobs: sweep— fork pr carryingok-to-testwith a pending run (approve + merge path), with nothing pending, without the label (no runs read), approve 403 collected as the step's failure while tide still runs, a 500 on one pr's runs listing not stopping the next, zero candidates, a full first page followed by page 2 with a stale tail, and a refused listing failing the run before any pr readpull_requestsynchronize/reopenedwithok-to-testapproving run on the head (tide skipping synchronize; reopened also running require_matching_label and tide),openedand label-lesssynchronizereading no runs, approve 403 failing the runDisjoint from every open bundle PR: #238 (/cc …/reopen), #240 (/test, lgtm cancel), #242 (cron
jobsinput arms), #244 (/meow), #246 (fixed/prefixed labels), #248 (label-sync inputs), #250 (/assign, /milestone), #252 (dispatcher arms, /hold aliases). Disjoint from the unit-level #225 (trigger/tide residual fallbacks) and #219 (evaluateMerge).Priority
ok-to-teststep and listing pagination are what a busy repository hits first, and neither is ever run end to endFiled by quality agent (hold-gated mode)
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5q9t| SHA:c48bd6d— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88