Repository navigation
[quality] bundle e2e suite never drives /assign with argument users or /milestone set-by-name through dist/index.js #249
Copy link
Copy link
Closed
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationHive verified that a merged PR references or claims this issue; pending confirmationneeds-kindqualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Description
Finding
__tests__/bundle/bundle.test.ts is the only suite that runs the committed dist/index.js. For two issue_comment handlers it exercises exactly one arm each:
/assign(src/issueComment/assign.ts): only the bare self-assign by an org member (bundle.test.ts:462). The argument-user path —getOrgCollabCommentUsersfiltering@userarguments by org membership / collaborator / prior comment, theno authorized users foundfailure, thecould not add assigneesrethrow, the silent no-op for an unauthorized self-assign and thecould not self assignrethrow — never runs through the bundle./milestone(src/issueComment/milestone.ts): only/milestone clear(bundle.test.ts:825). Setting a milestone by name (GET …/milestones→PATCH …/issues/1 {milestone: <number>}), themilestone "x" not found. Available milestones: …/nonefailures, the bare-commandplease provide a milestone to addfailure and the non-collaborator refusal never run through the bundle.
Evidence, main @ c48bd6d:
- unit:
npx vitest run --coverage→All files 99.83 | 98.35 | 100 | 99.82;assign.tsandmilestone.tsat 100% lines — the arms are unit-covered (__tests__/issueCommentTest/{assign,milestone}.test.ts). - e2e:
grep -n "/assign\|/milestone" __tests__/bundle/*.ts→ the two cases above only. The bundle suite's coverage is not captured in the report ([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), so this is read from the test list, not from a merged profile.
Unit-covered, not e2e-covered → medium priority under the coverage-gap rules.
Recommendation
Add __tests__/bundle/assignAndMilestone.test.ts (new file, reusing fakeGithub.ts and runBundle.ts) driving both handlers through dist/index.js:
-
/assign @octocat @stranger→ six unordered authorization reads, onePOST issues/1/assignees {assignees:['octocat']} -
/assign @strangerauthorized by a prior comment;@octocat octocatde-duplicated; no authorized user → exit 1; refusedPOST(argument and self paths) → exit 1; unauthorized bare/assign→ no write -
/milestone v1.0→GET milestones,PATCH issues/1 {milestone: 3}; name with spaces;CLEARcase-insensitive; unknown name (with and without milestones) → exit 1, no write; bare/milestone→ exit 1; non-collaborator → exit 1 after one read
Priority
- Impact: medium — the shipped bundle's two assignment/milestone flows are only verified by mocked unit tests
- 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationHive verified that a merged PR references or claims this issue; pending confirmationneeds-kindqualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Activity
github-actions commentedon Sep 30, 2026
Please add a kind label with
/kind failing-testor/kind cleanup.hivecommons-hive commentedon Oct 3, 2026
task-list sweep: 0 of 3 items ticked. Not closing yet — outstanding boxes remain.
Outstanding items:
/assign @octocat @stranger→ six unordered authorization reads, onePOST issues/1/assignees {assignees:['octocat']}/assign @strangerauthorized by a prior comment;@octocat octocatde-duplicated; no authorized user → exit 1; refusedPOST(argument and self paths) → exit 1; unauthorized bare/assign→ no write/milestone v1.0→GET milestones,PATCH issues/1 {milestone: 3}; name with spaces;CLEARcase-insensitive; unknown name (with and without milestones) → exit 1, no write; bare/milestone→ exit 1; non-collaborator → exit 1 after one readMerged PRs referencing this issue so far:
This comment is edited in place by the task-list sweep on every cycle; it is not duplicated.
hivecommons-hive commentedon Oct 3, 2026
Verified on main@ec76a3b: #250 landed
/assign @octocat @stranger(bundle.test.ts L774) and/milestone <title>(L795). The remaining failure arms in the recommendation were cut on maintainer review as duplicates ofassign.test.ts,milestone.test.ts,errorPaths.test.tsandcommand.test.ts; closing as resolved at the scope the maintainer accepted.— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88