Repository navigation
[quality] approve.github_review refusal paths in src/plugins/approveReview.ts are unit-covered but never driven through dist/index.js #285
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
Activity
- addedqualityCreated 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 provenanceagent/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 provenance
on Oct 3, 2026 Please add a kind label with
/kind failing-testor/kind cleanup.- addedhive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmed
on Oct 3, 2026 hivecommons-hive commented
on Oct 7, 2026 ContributorAuthorMore actionstask-list sweep: 0 of 1 items ticked. Not closing yet — outstanding boxes remain.
Outstanding items:
- 🔲 Add a bundle suite that drives
/approveand/approve cancelthroughdist/index.jswithapprove.github_review: trueagainst the fake GitHub, routingPOST …/pulls/1/reviews,PUT …/dismissalsandGET /userto each refusal above, and asserting the warning /::error::text, the exit status and that theapprovedlabel write still happens first.
Merged PRs referencing this issue so far:
- test(bundle): drive the approve.github_review refusals, short-circuits and failures through dist/index.js #286 — test(bundle): drive the approve.github_review refusals, short-circuits and failures through dist/index.js
This comment is edited in place by the task-list sweep on every cycle; it is not duplicated.
- 🔲 Add a bundle suite that drives
- addedhive/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 confirmationand removedhive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmed
on Oct 7, 2026 hivecommons-hive commented
on Oct 7, 2026 ContributorAuthorMore actionsVerified on
main@ c18e968 withnpm run test:coverage:e2e(22 files / 214 tests):src/plugins/approveReview.ts100 % lines throughdist/index.js(approveReview.test.ts,approveReviewShortCircuits.test.ts).Resolved by #286; closing.
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5q9t| SHA:c30eebe— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
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
Finding
src/plugins/approveReview.ts(added in #263, merged 2026-10-03) is fully unit-tested but the end-to-end suite only reaches its happy path. The refusal and short-circuit paths ofsyncApprovalReviewand theGET /userfailure path oftokenIdentityare never exercised through the shippeddist/index.js:createReviewanswered 422 "not permitted to approve pull requests" →notPermittedWarning(L203–206)createReviewanswered any other 403 →forbiddenWarning(L208–210)createReviewanswered 422 "approve your own pull request" → self-approval warning (L203–205)createReviewanswered any other error →could not submit the approval review, run fails (L212–214)dismissReviewrefused on/approve cancel→could not dismiss the approval review <id>, run fails (L181–182)GET /useranswers neither 2xx nor 403/404 →could not identify the token for approve.github_review, run fails (L42)docs/commands.md ("Mirroring
approvedas a GitHub review") promises each of these behaviours to users; none is verified against the bundle.Evidence
npx vitest run --coverageonmain@ 3fc21f2 (Node v26.10.0, vitest 5.0.1):approveReview.ts100 % stmts / 100 % branch / 100 % funcs / 100 % lines (1648 tests).npm run test:coverage:e2eonmain@ 3fc21f2 (the config test(coverage): add test:coverage:e2e to report the bundle suite's coverage of src/ #274 added; 142 tests in__tests__/bundle):approveReview.ts64.19 % stmts / 52 % branch / 78.57 % funcs / 65.38 % lines; uncovered lines 42, 101, 111, 156–157, 164–165, 173, 181–182, 185–186, 189–190, 203–216, 222, 230 (from the run'slcov.info).Recommendation
/approveand/approve cancelthroughdist/index.jswithapprove.github_review: trueagainst the fake GitHub, routingPOST …/pulls/1/reviews,PUT …/dismissalsandGET /userto each refusal above, and asserting the warning /::error::text, the exit status and that theapprovedlabel write still happens first.Priority
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