test(bundle): drive label-sync's refused-write and description-drift arms through dist/index.js - #312
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
…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>
|
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 |
|
Please add a kind label with |
|
Tracked as shared incident #294; fix is #287. Deferring — no re-runs or pushes to this branch until that lands. 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Test Improvement
Adds
__tests__/bundle/labelSyncFailureArms.test.ts(new file; nothing else touched), driving the failure arms ofsrc/cronJobs/labelSync.tsthrough the committeddist/index.jsagainst the fake GitHub API:workflow_dispatchjobs: label-syncrun wherePOST /labelsanswers 403: onecore.errorper refused built-in, every create still attempted after the first refusal (write()catch, lines 107-109), then the singleTypeError: error handling cron job: Error: 16 label(s) could not be synced: …failure (line 94)kind/bug, has the configured description missing and no configured colour, so the only write that succeeds isPATCH /labels/kind%2Fbugwith{ description }alone (drift()line 134)Measured with
npm run test:coverage:e2eonmain@ 3fc21f2:labelSync.ts85.41 → 97.91 % lines (only line 55 remains). Unit coverage of the file is already 100 %.Cluster:
labelSyncrefused writes / description drift — disjoint from the held bundle PRs (#242 cronjobsinput, #283–#310 issue_comment commands, plugins andhandlePullReq).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