test(bundle): drive labelIssue's refused label write through dist/index.js - #337
Open
hivecommons-hive[bot] wants to merge 1 commit into
Open
hivecommons-hive[bot] wants to merge 1 commit into
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
…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>
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 Hive will keep the |
Contributor
|
Please add a kind label with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
Files:
__tests__/bundle/labelWriteRefused.test.ts(new, bundle e2e; nosrc/, nohelpers.ts, no existing suite touched).Cluster:
src/utils/labeling.tslabelIssueL88 — thecatchthat rewraps a refusedPOST /repos/{o}/{r}/issues/{n}/labelsascould not add labels: <cause>— driven throughdist/index.js:/kind cleanupwith.prowlabels.yamlserved,GET /labelslistingkind/cleanup,POST /issues/1/labels→ 500 → exit 1, the single errorerror handling issue comment: Error: could not add labels: HttpError: boom, exactly onePOSTwith{ labels: ['kind/cleanup'] }, request order: configuration reads, labels read, the write.Evidence (
main@ 3fc21f2, Node v26.10.0, vitest 5.0.3): unitnpx vitest run --coveragealready coverslabeling.ts100 % lines;npm run test:coverage:e2ebefore → after:labeling.ts73.07 → 75 % lines, L88 leaves the uncovered set; bundle suite 142 → 143 tests, all green;eslintclean.Disjoint from the open hold-gated PRs:
labeling.tsL29–32 is #246, L135 is #298, L174 is #300/#310/#326, L202–203 is #326, and #312'sPOST /labels403 is label-sync's repository-label create, not an issue label write. Every existing__tests__/bundlecase that reachesPOST …/issues/1/labelsroutes 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