Repository navigation
test(utils): pin matchesLabelPattern's suffix/overlap arm and commandLines' fence-close boundary - #514
Conversation
…Lines' fence-close boundary Two single-operator mutants of src/utils survived the full related test set: flipping the || at labelMatch.ts:23 to && (62 files, 1213 tests) and the afterBlockBoundary reset at command.ts:92 to false (54 files, 1094 tests). Neither arm had a case that reaches it. - labelMatch: a matching prefix with a mismatched suffix, and anchored ends that would have to share characters (do-not-merge/*/hold must not match do-not-merge/hold). - command: an indented line directly after a closing fence is indented code, as the comment at command.ts:104 already says. Fixes #513 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.
The negative wildcard cases distinguish suffix mismatch/overlap, and fence-close cases distinguish indented hidden commands from visible commands. Changes are isolated to assertions.
Verified successful build-test, e2e-coverage and DCO results on head 9f43b62. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.
Test Improvement
Files:
__tests__/utils/labelMatch.test.ts,__tests__/utils/command.test.ts. Nosrc/,dist/,docs/oreslint.config.mjschange — disjoint from #510 (src/utils/auth.ts,dist/index.js), #511 (docs/contributing.md) and #512 (__tests__/label/remove.test.ts,eslint.config.mjs).A single-operator mutation probe over seven
src/utilsmodules onmain@ 88241f4 (details on #513) left two mutants alive against their fullvitest relatedset:src/utils/labelMatch.ts:23||→&&— 62 files / 1213 tests pass. Adds to the negative table*-rebasevsneeds-approveandneeds-*-rebasevsneeds-rebase-now(matching prefix, wrong suffix), plus an overlap case:do-not-merge/*/holdmust not matchdo-not-merge/holdbut does matchdo-not-merge//hold.matchesLabelPatternbacksmergeGate.ts:20,25(tide.labels/tide.missing_labels).src/utils/command.ts:92afterBlockBoundary = true→false— 54 files / 1094 tests pass. Adds: an indented/approvedirectly after a closing ``` or ~~~ fence (no blank line) is hidden, the unindented control is still seen. The body starts with a visibletextline so the case depends on the fence-close reset itself, not on the initial state.Verification (this branch, local)
npx vitest run __tests__/utils/labelMatch.test.ts __tests__/utils/command.test.ts: 91 passedlabelMatch.ts:23mutant applied: 3 failed; with thecommand.ts:92mutant applied: 1 failed (mutants reverted, not committed)npx eslinton both files: cleanRelated Issue
Fixes #513
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88