[quality] bundle e2e never drives plain /close or the /milestone refusals through dist/index.js
Maintainers usually reply within 2 days
A pull request for this has already been merged.
- #296 by @hivecommons-hive — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github-actions, typescript
- Domain
- testing-qa
Research direction
Start with tests/bundle/collaborationCommands.test.ts and the helpers in tests/bundle/helpers, then run npm run test:coverage:e2e. Add tests/bundle/closeMilestone.test.ts using the listed close and milestone scenarios, asserting exact requests and errors. Done means the bundle suite covers each checklist case without changing the command implementations.
Written by the indexing model from the issue text.
Description
Finding
Cluster: src/issueComment/close.ts and src/issueComment/milestone.ts, end-to-end arms only. Disjoint from every open hold-gated bundle PR (#242 cron jobs input, #244 /meow, #246 fixed/prefixed labels, #283 OWNERS, #286 approve review, #289 tide, #291 blunderbuss, #293 hold/sweep): none of their diffs touch /close, /milestone or these two files.
Unit evidence: npx vitest run --coverage on main @ 3fc21f2 (Node v26.10.0, vitest 5.0.1, @vitest/coverage-v8 5.0.1): 100 % lines (2382/2382), 99.81 % branches, 100 % functions. Both files are fully unit-covered (__tests__/issueCommentTest/close.test.ts, milestone.test.ts).
End-to-end evidence: npm run test:coverage:e2e (the source-mapped bundle run added by #274) on the same revision, __tests__/bundle only (5 files / 142 tests): src/ at 77.9 % lines / 70.82 % branches. Per file, from coverage-final.json:
| file | e2e lines | e2e branches | lines never reached from dist/ |
|---|---|---|---|
src/issueComment/close.ts |
80 % | 66.66 % | 24, 39, 56-60, 64 |
src/issueComment/milestone.ts |
73.07 % | 53.84 % | 28, 40, 44, 52, 71-73 |
What that means in behaviour:
- plain
/close(lines 56-60, theelseofnot-planned) — the command's primary form — is never run through the bundle.bundle.test.tsdrives only the non-collaborator no-op and/close not-planned. The author shortcut (isAuthor→ no collaborator read, line 33) is likewise never exercised e2e. /closewhosePATCH /issues/1fails never surfacescould not close issue(line 64)./milestone <title>that matches no milestone never produces themilestone "…" not found. Available milestones: …failure and never proves noPATCHis sent (lines 71-73)./milestonewith no argument (line 52,please provide a milestone to add) and by a non-collaborator (line 44,commenter is not authorized to set a milestone) are never refused through the bundle.
Lines 24/28 (payload without an issue number) and 39/40 (checkCollaborator rejecting) are not reachable from an issue_comment payload over HTTP — checkCollaborator swallows non-404 errors and returns false — so they are not part of this gap.
Recommendation
Add __tests__/bundle/closeMilestone.test.ts (new file, same shape as collaborationCommands.test.ts: start() a fake GitHub, comment()/helpersFor() from ./helpers, assert the exact request list) covering:
- plain
/closeby the issue author: no collaborator read, onePATCH /issues/1with{ state: 'closed' }and nostate_reason -
/closewhosePATCHreturns 500: run fails anderrorsnamescould not close issue -
/milestone v9with milestonesv1.0,Sprint 2: run fails namingmilestone "v9" not foundand the available titles; noPATCH -
/milestonewith no argument: run fails withplease provide a milestone to addafter only the collaborator read -
/milestone v1.0by a non-collaborator: run fails withcommenter is not authorized to set a milestone; no milestones read, noPATCH
Priority
- Impact: medium — covered by unit tests, not by the bundle suite (coverage-gap priority 2 under the unit-but-not-e2e rule)
- 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
- Dominant language
- TypeScript
- Stars
- 132
- Forks
- 23
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 155
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/prow-github-actions
-
[quality] checkOrgMember's missing payload.repository guard (auth.ts:43-45) is reached by no bundle testPossibly taken @hivecommons-hive claimed this today. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
cncf/prow-github-actions#446 · 1 comment ·
Maintainers usually reply within 2 days
-
[quality] handleIssueComment.ts:164/180 — the sweep's alreadyChecked skip (a comment carrying both /check-required-labels and a label command) has no end-to-end hitPossibly taken @hivecommons-hive claimed this today. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficulty 1/5 Under an hour Newbie friendliness 35/100
cncf/prow-github-actions#444 · 1 comment ·
Maintainers usually reply within 2 days
-
[quality] pullRequestOwners.load's null-field folds (pullRequestOwners.ts:92-97: user, requested_reviewers, assignees, labels) never run from dist/index.jsPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
cncf/prow-github-actions#438 · 1 comment ·
Maintainers usually reply within 2 days
-
[quality] run()'s last-resort catch (src/run.ts:40) has 0 e2e hits — no bundle test drives a handler rejection through dist/index.jsPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
cncf/prow-github-actions#436 · 1 comment ·
Maintainers usually reply within 2 days
-
[quality] labelSync drift never sees a null label description through dist/index.js (labelSync.ts:133 `current.description ?? ''` arm)Possibly taken @hivecommons-hive claimed this 1 day ago. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficulty 1/5 1-3 hours Newbie friendliness 30/100
cncf/prow-github-actions#434 · 1 comment ·
Maintainers usually reply within 2 days
All issues in cncf/prow-github-actions
Similar issues
-
Table: Space fires onActivate in single-selection mode — the reference doc and the JSDoc disagreeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sidorares/react-x11-components#764 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
backnotprop/plannotator#1840 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JoviDeCroock/pracht#432 ·
Maintainers usually reply within 1 day
-
approved check:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Hardware attribute name "app Connection Support" has inconsistent casingPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
walletbeat/walletbeat#1628 ·
Maintainers usually reply within 1 day