test(bundle): drive the authorization policy arms of auth.ts (members/collaborators/root-OWNERS admits, trusted refusal, config-load failures, empty login) through dist/index.js #378
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.65) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.65 · 329 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.347
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.065
Real PR Conversation Timeline
1 comments
"Review active on #378"
general
weight: 0.35
jeefy
Test Improvement
Adds
__tests__/bundle/authorizationPolicyArms.test.ts: sevenissue_commentruns throughdist/index.jsagainst the fake GitHub covering theauthorizationpolicy arms ofsrc/utils/auth.tsthatauthorization.test.ts(from #367) leaves out —/triage acceptedunderlabels: membersby an org member →policyAllowsadmits on the membership read (L313), no collaborator read/triage acceptedunderlabels: collaboratorsby a collaborator → admits on the collaborator read (L316), no membership read/triage acceptedunderlabels: trustedby a root-OWNERS reviewer who is neither member, collaborator nor inusers→rootOwnersIncludesadmits from the OWNERS file (L460–462)/triage acceptedunderlabels: collaboratorsfrom a payload withoutcomment.user.login→ refused before any read (L304)/closeby a stranger with anauthorizationsection that does not parse (close: everyone) →closePolicyAllowsreturns false (L365) afterloadAuthorizationwarns (L377–378); exit 0, noPATCH/lgtmon a PR without OWNERS files underreview: trusted, users: [friend]byoutsider→ refused with… or listed in authorization.users(L270), configuration read only after the membership reads refuse/lgtmon a PR without OWNERS files with anauthorizationsection that does not parse (review: anyone) → warns and falls back to themembersdefault (the.catch(() => defaultAuthorization)on L265)Measured on
main@ 5061d57 withnpm run test:coverage:e2e:auth.ts70.14 % → 82.08 % lines; newly reachedauth.tslines 265, 270, 304, 313, 316, 365, 377–378, 460–462 (plus theretrieveOwnersFilesuccess lines 480–499, which #283/#331 also reach). Files/functions claimed:__tests__/bundle/authorizationPolicyArms.test.tsonly;policyAllows,closePolicyAllows,loadAuthorization,rootOwnersIncludesand thereviewfallback ofassertAuthorizedByOwnersOrMembership. Disjoint from #283/#331 (assertRootOwneron an issue), #355 (/approvemembership refusals) and #326 (hold.ts).Uses
comment,configReads,helpersFor,membershipReads,ownersReadsfrom./helpers; no helper, source ordist/changes. Error and warning assertions check fragments only.Verified locally:
npx eslint __tests__/bundle/authorizationPolicyArms.test.tsclean;npx vitest run __tests__/bundle/authorizationPolicyArms.test.ts→ 7 passed;npm run test:coverage:e2e→ 222 passed.Related Issue
Closes #377
---
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1