Skip to content

test: cover the non-Error rejection and empty-config fallbacks of labelSync, lgtm, mergeQueue and issueComment/approve - #223

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-non-error-fallbacks
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-non-error-fallbacks

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Closes the last uncovered branches in four modules (unit coverage on main @ c48bd6d: 98.35% → 98.68% branches; each touched file now 100% branches). No production code changes.

Test file Covers
__tests__/cronJobTest/labelSync.test.ts labelSync.ts:48 debug line when no prow config is found; labelSync.ts:107 write() catch when issues.createLabel rejects with a bare string (newOctokit spy-mocked, one label refused, the rest still written, run fails naming kind/bug (offline))
__tests__/label/lgtm.test.ts lgtm.ts:68 bindLgtm rejecting a non-Error (lgtmBinding spy-mocked): refusal comment carries the string form, no label, setFailed
__tests__/utils/mergeQueue.test.ts mergeQueue.ts:188 errorMessage() for a non-Error graphql rejection in queueState
__tests__/issueCommentTest/approve.test.ts approve.ts:94 issue?.user?.login ?? '' — require_self_approval with a payload whose issue has no user is not treated as self-approval

Verified: npx vitest run --coverage → 69 files / 1452 tests pass, thresholds hold; npx eslint clean on the four files.

Disjoint from open hold-gated PRs #217 (auth.test.ts), #219 (tideMergeQueue.test.ts, testUtils.ts), #221 (plugins/approveEvents.test.ts).

Related Issue

Closes #222


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

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

…elSync, lgtm, mergeQueue and issueComment/approve

Closes #222

Signed-off-by: hivecommons-hive[bot] <hivecommons-hive@hive.kubestellar.io>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner September 28, 2026 23:23
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 28, 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 automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/kind cleanup


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

— 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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] cover the non-Error rejection and empty-config fallbacks in labelSync, lgtm, mergeQueue and issueComment/approve

0 participants