Repository navigation
Closed
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenanceneeds-kindtestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Description
Finding
src/issueComment/labelSync.ts (the /label-sync comment command) is 100 % covered by the unit suite but three of its arms get zero hits from the bundle (end-to-end) run that executes dist/index.js:
| Site | Arm | e2e evidence |
|---|---|---|
labelSync.ts:20-21 |
issueNumber === undefined → throw github context payload missing issue number |
DA:21,0, BRDA:20,…,0 |
labelSync.ts:32 |
result.created.length > 0 false (no Created: line) |
BRDA:32,…,1,0 |
labelSync.ts:35 |
result.updated.length > 0 false (no Updated: line) |
BRDA:35,…,1,0 |
Why they are missed:
__tests__/bundle/missingNumberGuards.test.tsdrives the missing-number guard of every slash command throughdist/index.jsexcept/label-sync(17-rowit.each, lines 32-49).- Every bundle
/label-syncscenario (bundle.test.ts:2128,labelSyncCatalog,labelSyncFailureArms,labelSyncNullDescription,labelSyncUnprefixedAllowlist) starts from a repository that is missing labels, so the comment always carries aCreated:line. The report a maintainer sees when the job has nothing to do —label-sync: created 0, updated 0, unchanged N.with neither optional line, and no write to the labels API — is never produced end to end.
Evidence (reproducible)
- Unit: artifact
coverage-96433268fccbb9c86efa1e40fbc0a11d5b07c124from test.yml run 40928440920 (main @ 9643326):lcov.inforeportssrc/issueComment/labelSync.tsat 100 % lines / branches / functions. - End-to-end: artifact
coverage-e2e-96433268fccbb9c86efa1e40fbc0a11d5b07c124from the same run (npm run test:coverage:e2e,.coverage-bundle/index.jsremapped tosrc/): the three records above are the only zero-countDA/BRDAlines for the file. Reproduced locally at 9643326 with the same command. - The two suites are reported separately by design (
docs/contributing.md,test:coverage:e2erow), so no merge was attempted; each source is stated on its own. - Not a negative-count await artifact (those are documented in
docs/contributing.mdand excluded here): the counts are0, not negative, and the arms are plainifstatements with no precedingawaitin the condition.
Recommendation
One test-only change, both parts in __tests__/bundle/:
- add
['/label-sync', '/label-sync', issueGuard]to themissingNumberGuards.test.tsmatrix - add a bundle scenario where a collaborator's
/label-syncruns against a repository the job already brought into line (seeded from a first sync'sPOST /labelsbodies, so the test holds no copy of the built-in catalog) and asserts the comment is exactlylabel-sync: created 0, updated 0, unchanged N., that noPOST/PATCH/DELETEreaches the labels API, and the stdout summarycreated 0 [], updated 0 [], unchanged N, failed 0
Both tests fail when the arms are mutated (> 0 → >= 0; guard condition made unreachable) with dist/ rebuilt via tsc && ncc build --no-cache.
Priority
- Impact: medium (unit-covered, end-to-end zero-hit; user-visible comment text)
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 9643326
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
Metadata
Metadata
Assignees
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenanceneeds-kindtestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Activity
github-actions commentedon Oct 29, 2026
Please add a kind label with
/kind feature,/kind failing-testor/kind cleanup.test(bundle): drive /label-sync's missing-number guard and already-in…