Repository navigation
[quality] onPrLgtm's no-lgtm-label arm and labelCatalog's verbatim labels.labels allowlist have 0 end-to-end hits #391
Copy link
Copy link
Closed
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancekind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Description
Finding
Two documented, user-reachable arms are exercised only by unit tests; nothing in the `tests/bundle` suite (the tests that run `dist/index.js` against a fake GitHub) drives them:
| arm | file:line | what a user sees | nearest existing bundle case |
|---|---|---|---|
| lgtm job on a push to a pull request that does not carry `lgtm` | `src/pullReq/onPrLgtm.ts:33` (`currentLabels.includes('lgtm')` false) | the job reads the labels and issues no `DELETE` | `bundle.test.ts` "pull_request lgtm job removes the lgtm label on a new push" only drives the label-present arm; #310 drives the failed read; #343 drives the missing number |
| label-sync creating the `/label` allowlist (`labels.labels`) verbatim | `src/utils/labelCatalog.ts:80` (`prefixed('', value)`) | `documentation` is created as `documentation`, not `labels/documentation` (docs/configuration.md:150-165) | `labelSyncCatalog.test.ts` composes only prefixed sections (`kind`, a custom `team` key) and needs-* labels |
Evidence (`main` @ aa6a0f8, Node v26, vitest 5.0.3):
- Unit: `npx vitest run --coverage` → 100 % lines (101 files / 1852 tests). Both arms are green.
- End-to-end: `npm run test:coverage:e2e` on a scratch branch = `origin/main` + the heads of all 34 open hold-gated bundle PRs (test(bundle): drive root-OWNERS authorization on an issue and the OWNERS-based /lgtm refusal through dist/index.js #283 … test(bundle): drive the 'could not list the repository labels' arms of labelIssue and label-sync through dist/index.js #388, all merge clean; 54 files / 422 tests pass) → 97.76 % lines of `src/`. `onPrLgtm.ts` reports 75 % branches with line 33 uncovered; `labelCatalog.ts` reports 95 % branches with line 80 uncovered. Neither arm is claimed by any of those PRs (the residual was measured with all of them merged).
- Both arms are reachable from the bundle with a plain payload and configuration — no module mock is needed, unlike the arms in [quality] 14 commenter-auth catch arms (10 commands + auth.ts:181/210/217/224) are unreachable — only module mocks in unit tests keep them covered #386.
Recommendation
One PR, one deliverable (two bundle test files; no production source changes):
- `tests/bundle/lgtmJobNoLabel.test.ts`: `pull_request` and `pull_request_target` `synchronize` with `jobs: lgtm` where `GET Bump acorn from 5.7.3 to 5.7.4 #1` returns labels without `lgtm` (and an empty list) → exit 0, `remove-lgtm: found labels for issue …` logged, no `DELETE`, request sequence ends at the labels read
- `tests/bundle/labelSyncAllowlist.test.ts`: `workflow_dispatch` with `jobs: label-sync` and a config whose only section is `labels.labels` (a bare string and a `{name, color, description}` value) → both created with their bare names, no `labels/*` name, color lowercased and description carried over
Priority
- Impact: low
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: aa6a0f8
— hive: agent=quality backend=copilot model=claude-fable-5.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancekind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Activity