Skip to content

test(bundle): drive labelIssue's refused label write through dist/index.js - #337

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-label-write-refused
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-label-write-refused

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Files: __tests__/bundle/labelWriteRefused.test.ts (new, bundle e2e; no src/, no helpers.ts, no existing suite touched).

Cluster: src/utils/labeling.ts labelIssue L88 — the catch that rewraps a refused POST /repos/{o}/{r}/issues/{n}/labels as could not add labels: <cause> — driven through dist/index.js:

  • /kind cleanup with .prowlabels.yaml served, GET /labels listing kind/cleanup, POST /issues/1/labels → 500 → exit 1, the single error error handling issue comment: Error: could not add labels: HttpError: boom, exactly one POST with { labels: ['kind/cleanup'] }, request order: configuration reads, labels read, the write.

Evidence (main @ 3fc21f2, Node v26.10.0, vitest 5.0.3): unit npx vitest run --coverage already covers labeling.ts 100 % lines; npm run test:coverage:e2e before → after: labeling.ts 73.07 → 75 % lines, L88 leaves the uncovered set; bundle suite 142 → 143 tests, all green; eslint clean.

Disjoint from the open hold-gated PRs: labeling.ts L29–32 is #246, L135 is #298, L174 is #300/#310/#326, L202–203 is #326, and #312's POST /labels 403 is label-sync's repository-label create, not an issue label write. Every existing __tests__/bundle case that reaches POST …/issues/1/labels routes it to 200.

Related Issue

Closes #336


Filed by quality agent (hold-gated mode). Human review required.

— hive: agent=quality backend=copilot model=claude-fable-5.1

…ex.js

/kind cleanup with POST /issues/1/labels answered 500 reaches
src/utils/labeling.ts L88 (could not add labels) end to end; every
existing bundle case routes that write to 200.

Closes #336

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 6, 2026 00:09
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 6, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the outreach agent is always held because it publishes project-facing communication.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] labelIssue's refused POST /issues/{n}/labels write (src/utils/labeling.ts L88) has no end-to-end coverage

0 participants