test(bundle): drive /assign's refused writes and empty authorized set through dist/index.js - #302
Open
hivecommons-hive[bot] wants to merge 1 commit into
Open
hivecommons-hive[bot] wants to merge 1 commit into
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
… through dist/index.js Adds __tests__/bundle/assignArms.test.ts covering assign.ts lines 42, 66 and 79 (could not self assign / no authorized users found / could not add assignees) against the fake GitHub. Lines 29 and 61 are not reachable over HTTP and stay out of scope. Closes #301 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 keep the |
Contributor
|
Please add a kind label with |
This was referenced Oct 4, 2026
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
Files:
__tests__/bundle/assignArms.test.ts(new, bundle e2e). Cluster:src/issueComment/assign.tsfailure arms, driven throughdist/index.jsagainst the fake GitHub. Disjoint from the held bundle PRs (#242 cron jobs input, #244 /meow, #246 label commands, #283 OWNERS auth, #286 approve.github_review, #289 merge gate labels, #291 blunderbuss, #293 hold/sweep, #296 /close + /milestone, #298 owners-label, #300 fixed labels) — none drives/assign.Three
issue_commentruns withprow-commands: /assign:/assignby a collaborator whosePOST /issues/1/assigneesreturns 500 → exit 1,could not self assign(assign.ts:42); asserts the three authorization reads then the single write with{ assignees: ['Codertocat'] }/assign @stranger @drifterwhere every membership / collaborator / comment read says no → exit 1,no authorized users found(assign.ts:66); asserts noPOSTat all and exactly the six reads (order-free, the users are authorized concurrently)/assign @octocatwhere octocat is an org member but the write returns 500 → exit 1,could not add assignees(assign.ts:79)Out of scope, not reachable through the bundle over HTTP:
assign.ts:29(payload without an issue number) and:61(the auth helpers each catch their own API errors and returnfalse, sogetOrgCollabCommentUserscannot throw).Measured with
npm run test:coverage:e2eonmain@ 3fc21f2:assign.ts81.48 % → 92.59 % e2e lines. Unit suite unchanged (100 / 99.81 / 100 / 100).npx eslintclean on the new file.Related Issue
Closes #301
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88