Finding
`src/plugins/approve.ts` is at 96.9% statements / 95.7% branches on `main` (187c5e3, `npm run test:coverage`, v8). The uncovered paths are the ones that decide whether an evaluation fails loudly or silently misreports approval:
| Line |
Path |
Why it matters |
| 422 |
`listComments` catch → `could not list comments: …` |
a 5xx on the comments list must fail the run, not evaluate against an empty list |
| 431 |
`listReviews` catch → `could not list reviews: …` |
same for reviews |
| 409 |
`upsertNotifier` update catch → `could not update the approval notifier: …` |
a failed edit must not leave a stale NOT APPROVED notifier silently |
| 480-481 |
`evaluateOnOwnersRepo`: `typeof base !== 'string'` → `repoHasOwners` fallback |
a payload without `pull_request.base.ref` must still probe the default branch |
| 374 |
`… |
|
| 449 |
`label?.name ?? ''` on `labeled`/`unlabeled` with no `label` object |
must skip, not throw |
| 227 |
`effectiveKind` `default: 'ignore'` |
an unknown event kind is ignored |
| 345 |
`ownersEntries` sort of files no OWNERS file covers |
ordering of the "no OWNERS file covers this file" lines |
End-to-end evidence: the bundle acceptance harness (`tests/bundle/bundle.test.ts:548-640`, runs `dist/index.js` against a fake GitHub on the same revision) exercises only the `/approve` and `/approve cancel` happy paths — no 5xx on comments/reviews/comment-edit, no payload without `base.ref`. Bundle coverage cannot be merged with the `src/` profile (ncc emits no source map to `src/`), so the two were analyzed separately; both leave these paths uncovered.
Recommendation
Add `tests/plugins/approveErrorPaths.test.ts` with msw handlers (same `serve()` shape as `approveEvents.test.ts`) covering:
Disjoint from open PRs #173, #175, #177, #179, #181, #183, #185, #187, #190 (none touch `tests/plugins/approve*` or `src/plugins/approve.ts`).
Priority
- Impact: medium — silent misreport of approval on API failure is the risk these guards exist for
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 187c5e3
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
Finding
`src/plugins/approve.ts` is at 96.9% statements / 95.7% branches on `main` (187c5e3, `npm run test:coverage`, v8). The uncovered paths are the ones that decide whether an evaluation fails loudly or silently misreports approval:
End-to-end evidence: the bundle acceptance harness (`tests/bundle/bundle.test.ts:548-640`, runs `dist/index.js` against a fake GitHub on the same revision) exercises only the `/approve` and `/approve cancel` happy paths — no 5xx on comments/reviews/comment-edit, no payload without `base.ref`. Bundle coverage cannot be merged with the `src/` profile (ncc emits no source map to `src/`), so the two were analyzed separately; both leave these paths uncovered.
Recommendation
Add `tests/plugins/approveErrorPaths.test.ts` with msw handlers (same `serve()` shape as `approveEvents.test.ts`) covering:
Disjoint from open PRs #173, #175, #177, #179, #181, #183, #185, #187, #190 (none touch `tests/plugins/approve*` or `src/plugins/approve.ts`).
Priority
Filed by quality agent (hold-gated mode)
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5q9t| SHA:187c5e3— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88