Repository navigation
test(trigger): pin /test's case-insensitive name and path match, the OK-To-Test label already present, and the green non-PR arm of /test and /ok-to-test - #524
Conversation
…OK-To-Test label already present, and the green non-PR arm Five single-operator mutants of src/issueComment/trigger.ts survived `npx vitest related src/issueComment/trigger.ts --run` (43 files / 837 tests) on main @ 88241f4. One case per survivor: - :272 `(run.name ?? '').toLowerCase() === arg` -> no toLowerCase: `/test e2e` matches the display name `E2E` whose file is end-to-end.yml, so the name comparison is the deciding arm. - :275 `run.path.toLowerCase()` -> `run.path`: `/test lint-checks` matches .github/workflows/Lint-Checks.yml. - :121 `label.toLowerCase() === okToTestLabel` -> exact compare: a pull request already carrying `OK-To-Test` is not re-labelled and, with nothing pending, gets the no-runs comment instead of a rocket. - :72 and :113 `cmd === undefined` -> `cmd === null`: `/test` and `/ok-to-test` on a plain issue leave core.setFailed uncalled, as the /retest sibling test already asserts. Fixes #523 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.
Workflow-name and file-name casing are exercised independently. Existing mixed-case OK-To-Test is not re-added, and issue-only refusals assert no action failure or workflow listing.
Verified successful build-test, e2e-coverage and DCO results on head 74b8127. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.
Test Improvement
Files:
__tests__/issueCommentTest/trigger.test.tsonly (/test,/ok-to-testdescribes). Nosrc/,dist/,docs/or config change — disjoint from the open held PRs #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), #518 (__tests__/plugins/tide*.test.ts), #520 (__tests__/plugins/requireMatchingLabel.test.ts) and #522 (__tests__/plugins/approve*.test.ts).A 117-mutant single-operator probe over
src/issueComment/trigger.tsonmain@ 88241f4 (details on #523) left five non-equivalent survivors againstnpx vitest related src/issueComment/trigger.ts --run(43 files / 837 tests). One case per survivor:trigger.ts:272name compared withouttoLowerCase()/test›/test e2ematches the display name case-insensitively when the other does not match at all — display nameE2E, fileend-to-end.ymltrigger.ts:275path compared withouttoLowerCase()/test›/test lint-checksmatches the file basename case-insensitively… — fileLint-Checks.yml, nameLinttrigger.ts:121existing label compared exactly/ok-to-test› recognises the label already present in another case: no re-add, the no-runs comment instead of a reaction (OK-To-Test)trigger.ts:72/testcmd === null/test› on an issue … and leaves the run green — adds thesetFailedspy and the exactcallslist, as the/retestsibling already assertstrigger.ts:113/ok-to-testcmd === null/ok-to-test› same —setFailednot called and the runs endpoint not read (this describe runs the post-command sweep, so the exactcallslist is not asserted)Verification (this branch, local)
npx vitest run __tests__/issueCommentTest/trigger.test.ts: 51 passedsrc/issueComment/trigger.tsin turn::721 failed,:1131 failed,:1211 failed,:2721 failed,:2751 failed (mutants reverted, not committed)npx eslint __tests__/issueCommentTest/trigger.test.ts: cleanRelated Issue
Fixes #523
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88