Repository navigation
[quality] blunderbuss never excludes an already-assigned user in the bundle suite (pullRequestOwners.ts:96 has 0 e2e hits) #402
Description
Finding
loadPullRequestOwners lowercases a pull request's assignees (src/utils/pullRequestOwners.ts:96) and blunderbuss adds them to its exclusion set so an assignee is never asked to review their own assignment (src/plugins/blunderbuss.ts:165). No bundle test ever gives the fake GitHub a pull request with a non-empty assignees array, so the mapping callback and the exclusion it feeds have 0 hits through dist/index.js.
Evidence (main @ 20d49e7, Node v26.10.0):
- Unit:
npx vitest run --coverage→ 100 % lines;__tests__/plugins/blunderbuss.test.ts:176("skips already requested reviewers and assignees") reaches it with an in-process MSW handler. - End-to-end:
npm run test:coverage:e2eon a scratch branch =origin/main+ the heads of the 12 open hold-gated bundle PRs (test(bundle): drive owners-label's early-return and failure arms through dist/index.js #298, test(bundle): drive the config input's explicit source and the loader's tier read failures through dist/index.js #314, test(bundle): drive the approve plugin's evaluation arms through dist/index.js #333, test(bundle): drive the sweep cron's empty-window, failed-listing and blunderbuss-freshness arms through dist/index.js #345, test(bundle): drive tide's verdict arms (unknown-retry exhaustion, moved head, 405/409 refusals, merged/closed/locked, check_suite guards, once-per-run) through dist/index.js #347, 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, test(bundle): drive the authorization section's schema rejections and the cross-tier users union through dist/index.js #381, test(bundle): drive loadOwnersTree's failure arms (owners.ts L164/L197/L229) through dist/index.js #383, test(bundle): drive the sweep cron's enqueued outcome (sweep.ts:75) through dist/index.js #385, test(bundle): drive parseProwConfig's empty-document arm (config.ts:373) through dist/index.js #395, test(bundle): drive meow.ts:28 (strict /meow re-check after the dispatcher's generic match) through dist/index.js #397, test(bundle): drive the pull-request OWNERS fail-closed arm (auth.ts:426, no OWNERS file covers README.md) through dist/index.js #401; 57 files / 414 tests pass) → 98.05 % lines ofsrc/.pullRequestOwners.ts:96has 0 hits (coverage-final.json:fnMapentry at line 96,f= 0). Lines 55-56 (resetPullRequestOwnersCache, test-only export) are the only other residual of that file; the reported line 74 is a source-map remap artifact — the rename ternary at:73records both arms taken bypullRequestOwnersArms.test.ts. - Consumer:
grep -n assignees src/plugins→ onlyblunderbuss.ts:165(excludedset).
Separate reporting: the unit (vite) and e2e (tsc+ncc source-map) coverage maps come from different transforms and are not combined (see vitest.e2e-coverage.config.mjs).
Recommendation
- add an
assigneescase to__tests__/bundle/blunderbussSettings.test.ts(pull_request openedwithexclude_approvers: true, one reviewer assigned under a mixed-case login → only the other is requested; both assigned →blunderbuss: no reviewer candidates for #1and no request)
Priority
- Impact: medium (covered by unit tests but not end-to-end)
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 20d49e7
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
Activity
github-actions commentedon Oct 9, 2026
Please add a kind label with
/kind failing-testor/kind cleanup.