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

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-hold-cancel-case-fold
Oct 21, 2026
Merged

mrbobbytables merged 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.

@mrbobbytables mrbobbytables left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review performed under the maintainer's explicit authorization to update, review, release reviewed holds, and merge eligible PRs in this cleanup.

Both issue-label casing and configured hold-label casing are independently exercised; DELETE requests use the existing label's actual spelling.

Verified successful build-test, e2e-coverage and DCO results on head cd08852. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.

@mrbobbytables mrbobbytables added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind labels Oct 21, 2026
@mrbobbytables
mrbobbytables merged commit b344f7b into main Oct 21, 2026
17 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-hold-cancel-case-fold branch October 26, 2026 20:19
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant