[quality] mutation survivors in src/utils: labelMatch.ts:23 suffix/overlap arm and command.ts:92 fence-close boundary are not pinned by any test
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
Direzione di ricerca
Read __tests__/utils/labelMatch.test.ts and __tests__/utils/command.test.ts, then review the two surviving cases described in the issue. Add assertions for mismatched suffixes and overlapping anchored patterns, plus indented commands after closing backtick and tilde fences. Run the two test files and confirm the new cases fail with the described mutations; the issue reports those mutations are already under open pull request #514.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Finding
Line coverage on main @ 88241f4 is 100 % (npm run test:coverage: 2206 tests, 100 % lines / 99.75 % branches), so the remaining question is whether the tests pin the behaviour they execute. A single-operator mutation probe over src/utils/{labelMatch,command,mergeGate,mergeQueue,labelCatalog,comments,labeling}.ts (134 mutants: ||/&&, ===/!==, </<=, true/false, ??/||, ! removal), each mutant first run against the module's own test file and every survivor then re-run with npx vitest related <file> --run (the full transitive set, 54–67 test files), leaves exactly two survivors that are not equivalent mutants:
-
src/utils/labelMatch.ts:23—!subject.endsWith(last) || subject.length < parts[0].length + last.lengthmutated to&&passes all 62 related files / 1213 tests. No case has a matching prefix with a mismatched suffix (*-rebasevsneeds-approve;needs-*-rebasevsneeds-rebase-now), and no case has the anchored ends overlap (do-not-merge/*/holdvsdo-not-merge/hold, which must befalse).a*b*cvsa-bfails at the suffix check, so it does not reach this arm either way.matchesLabelPatternis whatmergeGate.ts:20,25uses to decide whether atide.labels/tide.missing_labelspattern blocks a merge, so a regression here changes merge gating silently. -
src/utils/command.ts:92—afterBlockBoundary = trueon the line that closes a fence, mutated tofalse, passes all 54 related files / 1094 tests. The comment on line 104 says indented code is recognised "after a blank line, a fence or the start of the body", but only the blank-line and start-of-body cases are tested; an indented/approvedirectly after a closing ``` or ~~~ fence is currently hidden and nothing asserts it.
Survivors that are equivalent or harness artifacts and need no test: command.ts:85,99,106 (inIndentedCode is implied by afterBlockBoundary along the only path that sets it), mergeQueue.ts:64 (beforeEach resets the flag), ??→|| on fields the tests never set to '', and type-only literals. labelMatch.ts:32-33, comments.ts:67 and labeling.ts:214-217 survived their own module's file but are killed transitively by related (3, 2 and 8 failures respectively).
Recommendation
Add the missing cases to the two existing unit files; no src/ change:
__tests__/utils/labelMatch.test.ts:['*-rebase', 'needs-approve']and['needs-*-rebase', 'needs-rebase-now']in the negative table, plus an overlap casedo-not-merge/*/hold→do-not-merge/holdisfalse/do-not-merge//holdistrue.__tests__/utils/command.test.ts:hasCommand('/approve', 'text\n```\nx\n```\n /approve')and the~~~+ tab variant arefalse; the unindented control staystrue.
Verified locally: with these cases the labelMatch.ts:23 mutant fails 3 tests and the command.ts:92 mutant fails 1.
Priority
- Impact: medium (merge-gate label matching; command parsing)
- Effort: low
Decision taken by hive: fold both into one issue because one PR closes both and no src/ change is involved; the probe harness itself is not proposed for CI (the suite is ~4.5 min per run, so a mutation lane would cost hours per push).
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 88241f4
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
- Lingua principale
- TypeScript
- Stelle
- 132
- Fork
- 23
- Merge medio
- 1g 18h
- PR unite (30g)
- 191
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cncf/prow-github-actions
-
[quality] approveReview.ts: a PAT that is not the author never has its review submission asserted, and withdrawalReason's five-file bound, lgtm skip, user casing and withdrawer order are unpinnedForse già presa @hivecommons-hive l’ha presa 1 giorno fa. Apertaagent/quality needs-kind stage/040-covered-by-pr testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
cncf/prow-github-actions#526 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] trigger.ts: /test matches workflow names and paths case-insensitively, /ok-to-test honours an existing label in any case, and the non-PR arm of /test and /ok-to-test leaves the run green — none of it is assertedForse già presa @hivecommons-hive l’ha presa 1 giorno fa. Apertaagent/quality needs-kind stage/040-covered-by-pr testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
cncf/prow-github-actions#523 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] approve.ts: ten mutation survivors — any-Bot /approve, user-token bot review, require_self_approval break, approver sort, label casing, isBot notifier matchForse già presa @hivecommons-hive l’ha presa 1 giorno fa. Apertaagent/quality needs-kind stage/040-covered-by-pr testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
cncf/prow-github-actions#521 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] mutation survivors in src/plugins/requireMatchingLabel.ts: the withGracePeriod default, the graceMs > 0 guard, isBot's || and the no-rule debug text are not pinned by any testForse già presa @hivecommons-hive l’ha presa 1 giorno fa. Apertaagent/quality needs-kind stage/040-covered-by-pr testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cncf/prow-github-actions#519 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] tide.ts: six mutation survivors in the merge-queue gate, draft refusal, fork-403 workflow-file diagnosis and getPull's fork flag are unpinned by any testForse già presa @hivecommons-hive l’ha presa 1 giorno fa. Apertaagent/quality needs-kind stage/040-covered-by-pr testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
cncf/prow-github-actions#517 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di cncf/prow-github-actions
Issue simili
-
area: app type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ExpidetGames/code-reviewer#585 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
module-federation/core#5205 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
LanternOps/breeze#9392 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
engine-rs P3 review-deferral wasm
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
maniator/verticopolis#1154 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno