Repository navigation
test(bundle): drive plain /close, its write failure and the /milestone refusals through dist/index.js - #296
Conversation
…e refusals through dist/index.js bundle.test.ts only reaches /close via the non-collaborator no-op and /close not-planned, and /milestone via a matching title and clear. Add __tests__/bundle/closeMilestone.test.ts for the arms the bundle never exercised: the author's plain /close (no collaborator read, no state_reason), a failing issue update, an unknown milestone title, a missing argument and a non-collaborator commenter. Closes #295 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 |
|
/kind cleanup 🐝 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.
- Drop
closeMilestone.test.ts:34–43. close.ts:56 is also reached by:45. Move its{ state: 'closed' }body check (:42) into the:45case.
…e case Signed-off-by: quality <quality@hive.kubestellar.io>
|
Addressed: dropped the author 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 |
|
Addressed in fcecd4a: dropped the author-closes case and moved its 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/closeMilestone.test.tsonly (new; nosrc/,dist/, helper or config change). Cluster: the end-to-end arms ofsrc/issueComment/close.tsandsrc/issueComment/milestone.ts— 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).Five tests, same shape as
collaborationCommands.test.ts(start()a fake GitHub,comment()/helpersFor()/repo/tokenfrom./helpers, exact request lists):/closeby the issue author: no collaborator read, onePATCH /issues/1with{ state: 'closed' }and nostate_reason(close.ts33 → 56-60, never reached fromdist/before)/closewhosePATCHreturns 500: run fails,errorsnamescould not close issue(line 64)/milestone v9againstv1.0,Sprint 2: fails withmilestone "v9" not found. Available milestones: v1.0, Sprint 2; noPATCH(lines 71-73)/milestonewith no argument: fails withplease provide a milestone to addafter only the collaborator read (line 52)/milestone v1.0by a non-collaborator: fails withcommenter is not authorized to set a milestonebefore any milestones read (line 44)Verified on
main@ 3fc21f2:npx vitest run __tests__/bundle/closeMilestone.test.ts5/5 against the committeddist/index.js;npx eslintclean;npm run test:coverage:e2enow leaves only the HTTP-unreachable lines in both files (close.ts24/39,milestone.ts28/40 — missing issue number and a rejectingcheckCollaborator, which swallows non-404s).Related Issue
Closes #295
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88