Repository navigation
test(require-matching-label): pin the withGracePeriod default, the graceMs > 0 guard, isBot's || and the no-rule debug text - #520
Conversation
…aceMs > 0 guard, isBot's || and the no-rule debug text A single-operator mutation probe over src/plugins/requireMatchingLabel.ts left four mutants alive against the full vitest related set: - :139 withGracePeriod default false -> true: the sweep's option-less call would start sleeping the grace period on every swept PR - :154 graceMs > 0 -> >= 0: a grace-less rule would call sleep(0) - :252 isBot || -> &&: another app's Bot marker comment would stop being deleted - :149 the 'for label X' debug suffix inverted Each new case fails exactly one of the four mutants. No src/ change. Closes #519 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 cases observe default/zero grace periods without sleep, app-bot cleanup without deleting the human marker copy, and the no-applicable-rule diagnostic.
Verified successful build-test, e2e-coverage and DCO results on head fce1df6. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.
Test Improvement
Files:
__tests__/plugins/requireMatchingLabel.test.tsonly. Nosrc/,dist/,docs/or config change — disjoint from #510 (src/utils/auth.ts,dist/index.js), #511 (docs/contributing.md), #512 (__tests__/label/remove.test.ts,eslint.config.mjs), #514 (__tests__/utils/{command,labelMatch}.test.ts), #516 (__tests__/cronJobTest/sweep.test.ts) and #518 (__tests__/plugins/tide*.test.ts).A single-operator mutation probe over
src/plugins/requireMatchingLabel.tsonmain@ 88241f4 (57 mutants; details on #519) left four alive againstnpx vitest related src/plugins/requireMatchingLabel.ts --run(40 files / 752 tests). This adds one case per survivor:enforceRequiredLabelswithout options (newdescribe): the sweep's call shape — a5srule, nowithGracePeriod→sleepnot called,needs-kindadded. Pins the= falsedefault at:139.openedunder a grace-less rule:sleepnot called at all (notsleep(0)),needs-kindadded. PinsgraceMs > 0at:154.type: 'Bot', loginother-app[bot]) next to a human copy of the marker: exactly comment13is deleted. PinsisBot's||at:252.… no rule applies to issue #1 for label priority/high. Pins:149.Verification (this branch, local)
npx vitest run __tests__/plugins/requireMatchingLabel.test.ts: 53 passed:139,:154,:252,:149): 1 failed | 52 passed each time (mutants reverted, not committed)npx eslint __tests__/plugins/requireMatchingLabel.test.ts: cleanRelated Issue
Closes #519
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88