test(bundle): drive the issue-side OWNERS fallback and the membership probes' 500 arms through dist/index.js #331
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 333 lines diff across 4 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.348
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #331"
general
weight: 0.35
jeefy
Test Improvement
Adds
__tests__/bundle/rootOwnersFallback.test.ts, a bundle (end-to-end) suite that drivessrc/utils/auth.ts's issue-sideassertAuthorizedByOwnersOrMembershiparm throughdist/index.jsagainst the fake GitHub. On an issue (not a pull request) the plugin reads the rootOWNERSfile viaretrieveOwnersFile→assertRootOwnerand falls back to org membership / collaborator status when it is absent; no existing bundle test reached that arm (the only/lgtmon an issue is refused as the author before authorization runs).Five tests,
/lgtmby a non-author on issue #1 unless noted:| route | expected |
|---|---|
| root
OWNERS404, org-membership read 500, collaborator 204 |::warning::encountered unexpected error: status=500, message=boom,lgtmapplied, then the post-command config reads || root
OWNERS404, org and collaborator both 404 | refusedCodertocat is not a org member or collaborator, exit 1, no label write || root
OWNERS500 | refusederror checking for an OWNERS file at the root of the repository: HttpError: boom, no membership read || root
OWNERSis a directory (contents API lists it withoutcontent) | refusedinvalid OWNERS file returned from GitHub API, no membership read ||
/unassign @octocatby a non-member whose issue-comments read 500s |::warning::encountered unexpected error checking issue comments: status=500, message=boom, noDELETE …/assignees|Each test also asserts the exact request sequence (
contents/OWNERS→orgs/…/members→collaborators/…→ write/comment → config reads viaexpectCommandThenConfig).Measured with
npm run test:coverage:e2eonmain@ 3fc21f2:auth.tsend-to-end 63.1 % → 81.55 % lines (62.85 → 80.95 % stmts, 53.12 → 71.87 % branches, 78.57 → 92.85 % funcs).auth.ts:257, 61, 64, 135-139, 349-350, 353, 358-359go from 0 hits to covered. All files: 77.9 → 78.7 % lines, 6 files / 147 tests.Disjoint from the held PRs: #283 (
ownersAuth.test.ts) covers the root-OWNERS-present arms (auth.ts:277-288, 362-364) and the PR-sideno OWNERS file coversarm (321-322); #306 coverscheckCollaborator's 500 arm (98, 101). Those lines are not asserted here. Files touched:__tests__/bundle/rootOwnersFallback.test.tsonly (new);src/,dist/,vitest.config.mjsand.github/unchanged.Verified locally:
npx vitest run __tests__/bundle/rootOwnersFallback.test.ts(5 passed),npx eslint __tests__/bundle/rootOwnersFallback.test.tsclean.Related Issue
Closes #330
---
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1