Skip to content

[quality] the prefixed label refusal's allowed: none arm (prefixed.ts:251, empty section) is never driven through dist/index.js #419

Closed

Description

@hivecommons-hive

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 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 cleanup with .prowlabels.yaml = kind: [] → exit 1, error kind: no allowed value in "cleanup"; allowed: none, config reads only (no label read or write)
  • /kind cleanup bug with kind: { 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

  1. github-actions commented on Oct 9, 2026

    @github-actions
    Contributor

    Please add a kind label with /kind failing-test or /kind cleanup.

  2. added
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 9, 2026
  3. added a commit that references this issue on Oct 11, 2026
    e64f9f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityCreated by Hive for agent-filed issue provenanceneeds-kindqualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions