Finding
src/labels/prefixed.ts and src/labels/remove.ts are unit-covered at 100 % but several of their failure arms are never driven through the shipped dist/index.js.
Measured with npm run test:coverage:e2e on main @ 3fc21f2 (Node v26.10.0, vitest 5.0.1, @vitest/coverage-v8 5.0.1; the five __tests__/bundle/*.test.ts suites, 142 tests):
| file |
e2e lines |
e2e-uncovered lines |
arm |
src/labels/prefixed.ts |
90.79 % (69/76) |
135-136 |
removePrefixedLabels: none of the requested labels on the issue → debug + return |
|
|
199, 208 |
allowlistFor: configuration has no section for a command without built-in defaults → could not get labels from yaml: … yaml malformed, expected '<key>' top level key |
|
|
228 |
requestedLabels: no argument in the allowlist → <command>: command args missing from body |
|
|
258 |
currentIssueLabels: GET /issues/{n} fails → could not get labels from issue |
|
|
146 |
requireIssueNumber — payload without an issue number; not reachable on an issue_comment event |
src/labels/remove.ts |
83.33 % (20/24) |
54 |
GET /issues/{n} fails → could not get labels from issue |
|
|
63 |
none of the named labels on the issue → remove: command args missing from body |
|
|
25, 37 |
missing issue number; checkCollaborator throwing — checkCollaborator catches every error and returns false (src/utils/auth.ts:88-102), so neither is reachable |
Unit evidence: npx vitest run --coverage on the same revision reports both files at 100 % statements/branches/functions/lines (__tests__/label/prefixed.test.ts, __tests__/label/remove.test.ts). Unit and e2e evidence are reported separately because the two runs produce different statement maps (see #235).
Disjoint from the open hold-gated bundle PRs: #246 drives /remove-help, built-in /lifecycle defaults and the no-configuration failure; #300 drives removeFixedLabels (src/labels/fixed.ts); #337 drives labelIssue's refused write (src/utils/labeling.ts:88); none drives the prefixed-command or /remove arms above.
Recommendation
Add a bundle suite __tests__/bundle/prefixedRemoveArms.test.ts that runs dist/index.js on issue_comment against fakeGithub.ts for:
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: 9952fba
— hive: agent=quality backend=copilot model=claude-fable-5.1
Finding
src/labels/prefixed.tsandsrc/labels/remove.tsare unit-covered at 100 % but several of their failure arms are never driven through the shippeddist/index.js.Measured with
npm run test:coverage:e2eonmain@ 3fc21f2 (Node v26.10.0, vitest 5.0.1, @vitest/coverage-v8 5.0.1; the five__tests__/bundle/*.test.tssuites, 142 tests):src/labels/prefixed.tsremovePrefixedLabels: none of the requested labels on the issue → debug + returnallowlistFor: configuration has no section for a command without built-in defaults →could not get labels from yaml: … yaml malformed, expected '<key>' top level keyrequestedLabels: no argument in the allowlist →<command>: command args missing from bodycurrentIssueLabels:GET /issues/{n}fails →could not get labels from issuerequireIssueNumber— payload without an issue number; not reachable on anissue_commenteventsrc/labels/remove.tsGET /issues/{n}fails →could not get labels from issueremove: command args missing from bodycheckCollaboratorthrowing —checkCollaboratorcatches every error and returnsfalse(src/utils/auth.ts:88-102), so neither is reachableUnit evidence:
npx vitest run --coverageon the same revision reports both files at 100 % statements/branches/functions/lines (__tests__/label/prefixed.test.ts,__tests__/label/remove.test.ts). Unit and e2e evidence are reported separately because the two runs produce different statement maps (see #235).Disjoint from the open hold-gated bundle PRs: #246 drives
/remove-help, built-in/lifecycledefaults and the no-configuration failure; #300 drivesremoveFixedLabels(src/labels/fixed.ts); #337 driveslabelIssue's refused write (src/utils/labeling.ts:88); none drives the prefixed-command or/removearms above.Recommendation
Add a bundle suite
__tests__/bundle/prefixedRemoveArms.test.tsthat runsdist/index.jsonissue_commentagainstfakeGithub.tsfor:/kind cleanupwith a configuration lacking akindsection → exit 1,could not get labels from yaml: Error: kind: yaml malformed, expected 'kind' top level key, no labels read/kind not-allowed→ exit 1,kind: command args missing from body, no labels read or written/remove-kind cleanupwith nokind/*label on the issue → exit 0, noDELETE/remove-kind cleanupwithGET /issues/1→ 500 → exit 1,could not get labels from issue/remove fooby a collaborator withGET /issues/1→ 500 → exit 1,could not get labels from issue/remove fooby a collaborator when the issue does not carryfoo→ exit 1,remove: command args missing from bodyPriority
Filed by quality agent (hold-gated mode)
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5q9t| SHA:9952fba— hive: agent=quality backend=copilot model=claude-fable-5.1