Skip to content

test(hold): pin cancelHold's case fold on the issue's labels and on hold.label (Hold, DO-NOT-MERGE/HOLD) - #541

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-hold-cancel-case-fold
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-hold-cancel-case-fold

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

src/labels/hold.ts cancelHold releases the hold labels by lower-casing both the configured hold.label / legacy hold names and the issue's labels. Neither side of that fold was asserted: every cancel fixture in __tests__/label/hold.test.ts carries do-not-merge/hold and hold in lower case, and both hold.label fixtures are lower case too. A 14-mutant single-operator probe of hold.ts against its six direct suites left exactly two non-equivalent survivors — dropping .toLowerCase() on line 70 (the wanted set) or line 71 (the issue's labels). Either one leaves a label created as Hold or DO-NOT-MERGE/HOLD stuck on the pull request after /hold cancel, while meetsMergeGate (pinned for Hold in __tests__/utils/mergeGate.test.ts) keeps blocking the merge.

Two cases added to the cancel block of __tests__/label/hold.test.ts:

  • /hold cancel on an issue carrying Hold and DO-NOT-MERGE/HOLD → observes DELETE …/labels/Hold and DELETE …/labels/DO-NOT-MERGE%2FHOLD (removed under their own names), no setFailed — kills the line-71 mutant
  • hold.label: Do-Not-Merge/Hold with the issue carrying do-not-merge/hold → observes DELETE …/labels/do-not-merge%2Fhold and no DELETE for the configured spelling — kills the line-70 mutant

Test-only. Files: __tests__/label/hold.test.ts (describe('hold') › describe('cancel')). No src/ or dist/ change. Disjoint from every open held PR (#510–#540): none touches __tests__/label/hold.test.ts or src/labels/hold.ts (#512 is label/remove.test.ts, #539 is label/label.test.ts + label/lifecycle.test.ts).

Verification (this branch, local)

  • npx vitest run __tests__/label/hold.test.ts: 21 tests pass (19 before)
  • npx eslint __tests__/label/hold.test.ts: clean
  • probe re-run on hold.ts with the new file: both .toLowerCase() mutants KILLED; the only survivor is the equivalent swap of the two names inside the Set
  • npm run test:coverage on main @ 88241f4: 163 files / 2206 tests, 100 / 99.75 / 100 / 100; npm run test:coverage:e2e: 99.96 / 98.79 / 100 / 99.95 — hold.ts at 100 % in both, so this is a mutation-robustness pin, not a coverage gap

Related Issue

Refs #523 — hive-open-issue consolidated the hold.ts finding onto that tracker (its comment carries the full table); the tracker's own trigger.ts items and the other folded findings remain open and are owned by other PRs (#524, #528, #537).


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

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

…old.label

/hold cancel releases the hold labels by comparing both the configured and
the legacy name and the issue's labels in lower case. Neither side of that
fold was asserted: every cancel fixture carried do-not-merge/hold and hold
in lower case, and both hold.label fixtures were lower case too, so
dropping either .toLowerCase() in cancelHold passed the suite while leaving
a label created as Hold or DO-NOT-MERGE/HOLD stuck on the pull request —
exactly the spelling meetsMergeGate is already pinned to block on.

Two cases in the cancel block: an issue carrying Hold and DO-NOT-MERGE/HOLD
has both removed under their own names, and hold.label: Do-Not-Merge/Hold
releases the repository's do-not-merge/hold without a DELETE for the
configured spelling.

Refs #523

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 20, 2026 18:19
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 20, 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. Agent PRs are held at ACMM L3–L5; an outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

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

Copy link
Copy Markdown
Contributor

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

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.

0 participants