Repository navigation
test(bundle): drive syncApprovalReview's not-open and nothing-to-dismiss short-circuits and withdrawalReason's no-files and lgtm-skip arms through dist/index.js - #363
Conversation
…iss short-circuits and withdrawalReason's no-files and lgtm-skip arms through dist/index.js Adds __tests__/bundle/approveReviewShortCircuits.test.ts: five pull_request_review runs through the committed dist/index.js with approve.github_review on, on a pull request that is not approved, reaching the arms of src/plugins/approveReview.ts the bundle suite never did: a closed pull request's review left alone (L156-157), no own approval review to dismiss (L164-165), the 'changes no files' dismissal message (L101), and /lgtm cancel ignored by default but named under approve.lgtm_acts_as_approve (L111). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 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 |
|
Evidence from run 37630955179 (head 482d7e1): all 81 test files / 1644 tests pass; the job exits 1 on the single vitest Unhandled Error Deferring to #294; the durable fix is #287 (held, needs a human to lift the hold). No retrigger will be pushed here. 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/kind cleanup |
|
/lgtm |
Test Improvement
Adds
__tests__/bundle/approveReviewShortCircuits.test.ts(new file only;helpers.ts,bundle.test.ts,fakeGithub.ts, source anddist/untouched). Fivepull_request_reviewruns through the committeddist/index.jsagainst the fake GitHub withapprove.github_review: true, on a pull request that is not approved — the arms ofsrc/plugins/approveReview.tsthe bundle suite never reached:closed, carries the bot's marked APPROVE reviewapprovedremoved,::debug::approve: #1 is not open; its approval review is left alone, noPUT …/dismissals(L156-157)DISMISSEDmarked one, a user's copy of the markerapprovedremoved,::debug::approve: #1 carries no approval review to dismiss, no dismissal (L164-165)GET /pulls/1/filesis emptyPUT …/reviews/71/dismissalswithapproved removed: the pull request changes no files(L101)/approvethen/approve cancel, carol/lgtm cancel, default config… withdrawn by bob (/approve cancel)— carol skipped (L111, skip arm)approve.lgtm_acts_as_approve: true… withdrawn by bob (/approve cancel), carol (/lgtm cancel)(L111, counted arm)Cluster:
src/plugins/approveReview.tssyncApprovalReviewL156-157, L164-165 andwithdrawalReasonL101, L111. Disjoint from the held bundle PRs: #286 (approveReview.test.ts) covers the review refusals/failures, draft and already-on-head arms; #333 (approveEvaluationArms.test.ts) coversapprove.ts's evaluation arms; #355 the membership-modeissueComment/approve.tsfailures. Measured with all 43 open held bundle heads merged ontomain, exactly these six lines remained uncovered in this file.Evidence (
main@ 3fc21f2, Node v26.10.0, vitest 5.0.3)plugins/approveReview.tslinesnpx vitest run --coverage)mainonly (npm run test:coverage:e2e)main+ this PRmain+ all 43 held bundle headsmain+ all 43 held bundle heads + this PRsrc/96.55 → 96.8 %)npx eslint __tests__/bundle/approveReviewShortCircuits.test.tsclean; 5 tests, ~1.3 s. Local runs;test.ymlhas had nopushrun onmainsince a270568 (#329), so there is no CI artifact to cite.Related Issue
Closes #362
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88