Skip to content

test(bundle): drive label-sync's refused-write and description-drift arms through dist/index.js - #312

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-label-sync-failure-arms
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-label-sync-failure-arms

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds __tests__/bundle/labelSyncFailureArms.test.ts (new file; nothing else touched), driving the failure arms of src/cronJobs/labelSync.ts through the committed dist/index.js against the fake GitHub API:

  • a workflow_dispatch jobs: label-sync run where POST /labels answers 403: one core.error per refused built-in, every create still attempted after the first refusal (write() catch, lines 107-109), then the single TypeError: error handling cron job: Error: 16 label(s) could not be synced: … failure (line 94)
  • the one existing label, kind/bug, has the configured description missing and no configured colour, so the only write that succeeds is PATCH /labels/kind%2Fbug with { description } alone (drift() line 134)

Measured with npm run test:coverage:e2e on main @ 3fc21f2: labelSync.ts 85.41 → 97.91 % lines (only line 55 remains). Unit coverage of the file is already 100 %.

Cluster: labelSync refused writes / description drift — disjoint from the held bundle PRs (#242 cron jobs input, #283–#310 issue_comment commands, plugins and handlePullReq).

Related Issue

Closes #311


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

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

…arms through dist/index.js

Adds __tests__/bundle/labelSyncFailureArms.test.ts: a workflow_dispatch
label-sync run where every create answers 403 and the one existing label
drifts only in its description. Covers src/cronJobs/labelSync.ts lines
94, 107-109 and 134 end-to-end (npm run test:coverage:e2e:
labelSync.ts 85.41 -> 97.91 % lines).

Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 4, 2026 21:00
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 4, 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 4, 2026

Copy link
Copy Markdown
Contributor

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

build-test is red here for a baseline cause this PR's diff does not touch: all 81 test files pass, and the job exits 1 on a single vitest Unhandled Error — assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID") originating in __tests__/issueCommentTest/meow.test.ts (runs 37234340602, 37234245909 on f5e5587). This PR only changes __tests__/bundle/labelSyncFailureArms.test.ts.

Tracked as shared incident #294; fix is #287. Deferring — no re-runs or pushes to this branch until that lands.


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

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

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] label-sync's refused-write and description-drift arms are never exercised end-to-end through dist/index.js

0 participants