test(bundle): drive /cc /uncc /unassign /retitle /lock /reopen through dist/index.js - #238
Merged
Merged
Conversation
…h dist/index.js The bundle e2e suite never exercised these six issue_comment handlers. Add a separate file so it stays disjoint from the pending edit to bundle.test.ts, covering for each command the authorized path with the recorded REST request and body, the unauthorized path with no write, and the failing path where the handler error reaches core.setFailed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: quality <quality@hive.kubestellar.io>
Contributor
Author
|
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 automatically remove the |
Contributor
Author
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
This was referenced Sep 30, 2026
Merged
Member
|
/kind cleanup |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
Adds
__tests__/bundle/collaborationCommands.test.ts— a new file only. It reusesfakeGithub.tsandrunBundle.tsto spawn the committeddist/index.jsand drives the sixissue_commenthandlers the bundle e2e suite had never exercised:/cc,/uncc,/unassign,/retitle,/lock,/reopen(src/issueComment/{cc,uncc,unassign,retitle,lock,reopen}.ts).21 cases, one
describeper command:POST pulls/1/requested_reviewers{reviewers:['Codertocat']}); non-collaborator self → no write;@octocat @strangerkeeps the org member and drops the stranger (six unordered membership reads, then one POST); no authorized users → exit 1,no authorized users found.DELETE pulls/1/requested_reviewers); org-member commenter removes argument users in order; unauthorized commenter → three reads, no write.DELETE→ exit 1,could not remove assignee.PATCH issues/1with the rest of the line astitle; non-collaborator → no write; empty title → zero API calls.PUT issues/1/lockwith no body;too-heated→lock_reason: 'too heated'; unknown reason → exit 1 before locking; non-collaborator → exit 1,commenter is not a collaborator user./retitleand/lockruns both.Verified on
main@ c48bd6d, Node v26.10.0:npx vitest run __tests__/bundle→ 2 files / 109 tests pass (88 existing + 21 new)npx eslint __tests__/bundle/collaborationCommands.test.tscleanAll files 99.83 | 98.35 | 100 | 99.82); this adds e2e coverage onlyDisjoint from every open hold-gated PR: #236 edits one line of
bundle.test.ts; none of #217, #219, #221, #223, #225, #227, #229, #230, #232, #234 touch__tests__/bundle/. This PR creates a new file and edits nothing existing.Related Issue
Closes #237
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88