Skip to content

test(bundle): drive the 'could not list the repository labels' arms of labelIssue and label-sync through dist/index.js - #388

Merged
github-actions[bot] merged 1 commit into
mainfrom
quality/test-label-listing-refused
Oct 9, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
quality/test-label-listing-refused

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds __tests__/bundle/labelListingRefused.test.ts (new file; nothing else touched), the first bundle test to make the repository label-catalog read (GET /repos/Codertocat/Hello-World/labels) fail, driving through the committed dist/index.js against the fake GitHub API:

  • /kind cleanup with GET /labels → 500 exits 1 with the single annotation error handling issue comment: Error: could not list the repository labels: HttpError: boom, after the config reads and the one catalog read, with no write (src/utils/labeling.ts:135, assertLabelsExist via labelIssue)
  • jobs: label-sync on workflow_dispatch with the same route exits 1 with error handling cron job: Error: could not list the repository labels: HttpError: boom, with no POST or PATCH (src/cronJobs/labelSync.ts:55)

Measured with npm run test:coverage:e2e on main @ aa6a0f8: labelSync.ts line 55 and labeling.ts line 135 go from 0 hits to covered; on a scratch branch overlaying all 33 open hold-gated bundle PRs (#283 … #385) they were the only could not list the repository labels statements still at 0. Unit coverage of both files is already 100 %. The file passes against the committed dist/index.js (npx vitest run __tests__/bundle/labelListingRefused.test.ts); eslint and tsc --noEmit clean. No src/, dist/ or workflow changes.

Cluster: label-catalog read failure — disjoint from #312 (labelSyncFailureArms.test.ts: refused writes / description drift, which leaves line 55 uncovered by its own account) and from labelWriteRefused.test.ts (the /kind write refusal, which routes the catalog read to 200).

Related Issue

Closes #387


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

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

…f labelIssue and label-sync through dist/index.js

Adds __tests__/bundle/labelListingRefused.test.ts, routing GET /labels to
500 so assertLabelsExist (src/utils/labeling.ts:135, via labelIssue) and
labelSync (src/cronJobs/labelSync.ts:55) rethrow end-to-end, asserting the
single failure annotation and that no write follows.

Closes #387

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 8, 2026 14:28
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 8, 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.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/kind cleanup


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: aa6a0f8

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

@github-actions github-actions Bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-kind labels Oct 8, 2026
@jeefy

jeefy commented Oct 9, 2026

Copy link
Copy Markdown
Member

/kind cleanup
/lgtm
/approve
/hold cancel

@github-actions github-actions Bot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 9, 2026
@github-actions
github-actions Bot merged commit bfa303e into main Oct 9, 2026
10 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-label-listing-refused branch October 9, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] the 'could not list the repository labels' arms (labeling.ts assertLabelsExist, labelSync.ts) have no end-to-end coverage

1 participant