[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 asserted
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github-actions, typescript
Direzione di ricerca
Leggi __tests__/issueCommentTest/trigger.test.ts insieme a src/issueComment/trigger.ts, poi esegui i test Vitest pertinenti. Aggiungi i casi consigliati per nomi di workflow e percorsi senza distinzione tra maiuscole e minuscole, un’etichetta esistente con maiuscole e minuscole miste e comandi non relativi alle PR che mantengono verde l’esecuzione. Il lavoro è completato quando queste asserzioni rilevano le mutazioni sopravvissute elencate; l’issue richiede modifiche solo ai test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Finding
src/issueComment/trigger.ts is 100 % line- and branch-covered by npm run test:coverage and all but one branch (statusOf, line 323) by npm run test:coverage:e2e on main @ 88241f4. A single-operator mutation probe over the file (117 mutants: ===/!==, &&/||, ??/||, comparison bounds, .some/.every, .toLowerCase() removal, true/false, ++/--, continue/break, status codes) still left five non-equivalent survivors against npx vitest related src/issueComment/trigger.ts --run (43 files / 837 tests):
| line | mutant | behaviour nothing asserts |
|---|---|---|
| 272 | (run.name ?? '').toLowerCase() === arg → (run.name ?? '') === arg |
/test e2e must match a workflow whose display name is E2E even when its file (end-to-end.yml) does not. The existing /test CI case passes through the lowercase fixture path ci.yml, so the name comparison is never the deciding arm. |
| 275 | run.path.toLowerCase() → run.path |
/test lint-checks must match .github/workflows/Lint-Checks.yml. Every fixture path is already lowercase. |
| 121 | label.toLowerCase() === okToTestLabel → label === okToTestLabel |
A pull request already carrying OK-To-Test must not have the label re-added, and with nothing pending gets the "No workflow runs waiting" comment rather than a rocket. Only the exact-case label is tested. |
| 72 | /test: cmd === undefined → cmd === null |
/test on a plain issue comments "only applies to pull requests" and leaves core.setFailed uncalled. The /retest sibling test asserts both; the /test and /ok-to-test ones assert only the comment, so a thrown TypeError after the comment goes unnoticed. |
| 113 | /ok-to-test: same |
same |
Equivalent survivors, not actionable: count-- in rerunEach (only === 0 is observed), current === null in headRuns (GITHUB_WORKFLOW is always set in Actions), ??→|| on empty-string folds, and type-annotation undefined→null.
Recommendation
Add to __tests__/issueCommentTest/trigger.test.ts:
/test› anit.eachwithE2E/end-to-end.ymlunder/test e2eandLint/Lint-Checks.ymlunder/test lint-checks, asserting the re-run and that no listing comment is posted./ok-to-test› the label-already-present case with{ name: 'OK-To-Test' }./testand/ok-to-test› extend the "only applies to pull requests" tests with asetFailedspy asserted not called (and, for/test, the exactcallslist; for/ok-to-test, that the runs endpoint is not read).
Test-only; no src/ or dist/ change. Disjoint from the open held PRs #510–#522 (auth, contributing, remove, command/labelMatch, sweep, tide, requireMatchingLabel, approve).
Evidence
- unit:
npm run test:coverage→ 100 / 99.75 / 100 / 100 (main @ 88241f4, local run) - e2e:
npm run test:coverage:e2e→ 99.96 / 98.79 / 100 / 99.95 (same revision, local run; the two reports are produced by different transforms and are not merged, asvitest.e2e-coverage.config.mjsdocuments) - probe: each mutant applied in turn to
src/issueComment/trigger.ts,npx vitest related src/issueComment/trigger.ts --run→ 837 passed for all five
Priority
- Impact: medium —
/testis the user-facing re-run command; case-insensitive matching is what makes/test ciwork for a workflow namedCIin a file not namedci.yml - Effort: low
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
- 24
- 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] prefixed.ts: /stage and /status exclusive replacement, two-value /remove-lifecycle, mixed-case allowlist values and the first protected offender survive mutationForse 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 84/100
cncf/prow-github-actions#538 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[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 2 giorni 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] 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 2 giorni 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 · 2 commenti ·
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 2 giorni 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 2 giorni 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
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
zts212653/clowder-ai#1678 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
Progressive-Victory/the-website#680 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100