Repository navigation
test(hold): pin cancelHold's case fold on the issue's labels and on hold.label (Hold, DO-NOT-MERGE/HOLD) - #541
Conversation
…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>
|
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 Hive will keep the |
|
Please add a kind label with |
mrbobbytables
left a comment
There was a problem hiding this comment.
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.
Test Improvement
src/labels/hold.tscancelHoldreleases the hold labels by lower-casing both the configuredhold.label/ legacyholdnames and the issue's labels. Neither side of that fold was asserted: every cancel fixture in__tests__/label/hold.test.tscarriesdo-not-merge/holdandholdin lower case, and bothhold.labelfixtures are lower case too. A 14-mutant single-operator probe ofhold.tsagainst 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 asHoldorDO-NOT-MERGE/HOLDstuck on the pull request after/hold cancel, whilemeetsMergeGate(pinned forHoldin__tests__/utils/mergeGate.test.ts) keeps blocking the merge.Two cases added to the
cancelblock of__tests__/label/hold.test.ts:/hold cancelon an issue carryingHoldandDO-NOT-MERGE/HOLD→ observesDELETE …/labels/HoldandDELETE …/labels/DO-NOT-MERGE%2FHOLD(removed under their own names), nosetFailed— kills the line-71 mutanthold.label: Do-Not-Merge/Holdwith the issue carryingdo-not-merge/hold→ observesDELETE …/labels/do-not-merge%2Fholdand no DELETE for the configured spelling — kills the line-70 mutantTest-only. Files:
__tests__/label/hold.test.ts(describe('hold') › describe('cancel')). Nosrc/ordist/change. Disjoint from every open held PR (#510–#540): none touches__tests__/label/hold.test.tsorsrc/labels/hold.ts(#512 islabel/remove.test.ts, #539 islabel/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: cleanhold.tswith the new file: both.toLowerCase()mutants KILLED; the only survivor is the equivalent swap of the two names inside theSetnpm run test:coverageonmain@ 88241f4: 163 files / 2206 tests, 100 / 99.75 / 100 / 100;npm run test:coverage:e2e: 99.96 / 98.79 / 100 / 99.95 —hold.tsat 100 % in both, so this is a mutation-robustness pin, not a coverage gapRelated Issue
Refs #523 —
hive-open-issueconsolidated 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