Repository navigation
[quality] the prefixed label refusal's allowed: none arm (prefixed.ts:251, empty section) is never driven through dist/index.js #419
Description
Finding
The refusal a prefixed label command emits when none of its arguments is in the allowlist has two spellings of the tail, and the bundle suite only ever reaches one:
// src/labels/prefixed.ts:250-252 (requestedLabels)
if (labels.length === 0) {
throw new Error(`${command.slice(1)}: no allowed value in "${args.join(' ')}"; allowed: ${allowed.join(', ') || 'none'}`)
}allowed.join(', ') || 'none' falls to 'none' only when the section exists but lists no value. That configuration is accepted: normalizeSection (src/utils/config.ts:438-441, 444-451) takes any array (kind: []) or any mapping with an array values (kind: { values: [], exclusive: true }), so a repository that has stubbed its .prowlabels.yaml sections before filling them refuses every /kind … with allowed: none.
Evidence (main @ 0328961, Node v26, vitest 5.0.3):
- Unit:
npx vitest run --coverage→prefixed.ts100 % lines / branches (__tests__/label/*.test.ts). - End-to-end:
npm run test:coverage:e2eon a scratch branch =origin/main+ the heads of all 17 open hold-gated bundle PRs (test(bundle): drive owners-label's early-return and failure arms through dist/index.js #298 … test(bundle): drive react()'s missing comment.id arm (trigger.ts:293) through dist/index.js #413; 61 files / 429 tests pass) →prefixed.ts100 % lines, 97.22 % branches, uncovered branch251. The only bundle test of this refusal,__tests__/bundle/prefixedRemoveArms.test.ts:44(/kind not-allowed), serves the fixturelabelFileContentsResp.jsonwhosekindsection listsfailing-test, cleanup, so the|| 'none'fallback never fires.
Unit and e2e evidence are not line-mergeable (#235); they are stated separately.
Recommendation
One PR, one deliverable: a bundle suite __tests__/bundle/prefixedEmptyAllowlist.test.ts that drives through dist/index.js against the fake GitHub:
-
/kind cleanupwith.prowlabels.yaml=kind: []→ exit 1, errorkind: no allowed value in "cleanup"; allowed: none, config reads only (no label read or write) -
/kind cleanup bugwithkind: { values: [], exclusive: true }→ the same refusal naming both arguments
Priority
- Impact: low
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 0328961
— 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.test(bundle): drive the prefixed label refusal's 'allowed: none' arm …