test(bundle): drive /approve's membership-mode review failures and no-review cancel through dist/index.js #355
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 319 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.345
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #355"
general
weight: 0.35
jeefy
Test Improvement
Adds
__tests__/bundle/approveMembershipArms.test.ts(new file only;helpers.ts,bundle.test.ts,fakeGithub.ts, source anddist/untouched). Fiveissue_commentruns through the committeddist/index.jsagainst the fake GitHub, on a pull request whose repository has no OWNERS files so/approvefalls back to org membership and a bot GitHub review — the failure arms ofsrc/issueComment/approve.tsthe bundle suite never reached:| run | GitHub's answer | expected |
|---|---|---|
|
/approveby an org member |POST …/pulls/1/reviews500 | exit 1,could not create review(L82); body{event:'APPROVE', comments:[]}||
/approve cancel|GET …/pulls/1/reviews500 | exit 1,could not remove latest review: Error: could not list reviews for PR 1(L67, L160) ||
/approve cancel| listing with no botAPPROVEDreview (user review, botDISMISSED, botCOMMENTED) | exit 1,no latest review found to cancel(L173), no dismissal ||
/approve cancel|PUT …/reviews/12/dismissals500 | exit 1,could not dismiss review(L185); dismissal message names the commenter ||
/approveby a stranger (members 404, collaborator 404) |POST …/issues/1/comments500 | exit 1 with three::error::lines in order: the refusal,Could not comment with an auth error: Error: could not add comment: HttpError: boom(L131), and the dispatcher's wrap of the refusal |Each test asserts the exact request sequence via
expectCommandThenConfig: the OWNERS/membership reads, the command's own calls, then the post-command sweep (config reads,GET pulls/1, base-branch OWNERS probe, merge-queue query), which still runs after the failure.Cluster:
src/issueComment/approve.tsL67, 82, 131, 160, 173, 185. Disjoint from the held bundle PRs — #343 claims L44 (missing issue number) and #333 claims L96 (require_self_approval); #286 drivesapprove.github_review, which is the OWNERS-mode mirror, not this path.Evidence (
main@ 3fc21f2, Node v26.10.0, vitest 5.0.3)| suite |
issueComment/approve.tslines | branches ||---|---|---|
| unit (
npx vitest run --coverage) | 51/51 | — || e2e before (
npm run test:coverage:e2e) | 43/51 | 19/26 || e2e with this PR | 49/51 | 20/26 |
Remaining e2e-missed: L44 (#343) and L96 (#333). Whole-bundle e2e: 77.90 % → 78.24 % lines.
npx eslintclean; 5/5 pass in ~1.3 s.Related Issue
Closes #354
---
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88