[quality] prefixed.ts: /stage and /status exclusive replacement, two-value /remove-lifecycle, mixed-case allowlist values and the first protected offender survive mutation
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github-actions, typescript
Direzione di ricerca
Inizia con __tests__/label/lifecycle.test.ts e __tests__/label/label.test.ts; leggi i casi esistenti dei comandi ed esegui i test Vitest correlati. Aggiungi i casi indicati che rilevano le mutazioni per la sostituzione esclusiva di /stage e /status, la rimozione di più etichette del ciclo di vita, i valori della allowlist con maiuscole e minuscole miste e la segnalazione della prima etichetta protetta. Il lavoro è completato quando ogni caso verifica le chiamate API richieste o il messaggio di rifiuto e i test correlati passano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Finding
src/labels/prefixed.ts is 100 % line- and branch-covered by npm run test:coverage and by npm run test:coverage:e2e on main @ 88241f4. A single-operator mutation probe over the file (59 mutants: ===/!==, &&/||, ??/||, .some/.every, .filter/.map, .find/.findLast, .toLowerCase() removal, exclusive: true→false, new Set removal, comparison bounds) still left six non-equivalent survivors against npx vitest related src/labels/prefixed.ts --run (49 files / 722 tests):
| line | mutant | behaviour nothing asserts |
|---|---|---|
| 32 | /stage registry entry exclusive: true → false |
/stage beta on an issue carrying stage/alpha must DELETE stage/alpha before POST stage/beta. Only /lifecycle (__tests__/label/lifecycle.test.ts) and /priority (__tests__/label/priority.test.ts) have a replacement case; /stage is only ever added to a label-less issue. |
| 33 | /status registry entry exclusive: true → false |
same for /status in-review over status/in-progress |
| 136 | present = currentLabels.filter(label => labels.some(…)) → .every(…) |
/remove-lifecycle stale frozen with both labels on the issue must delete both. Every /remove-<cmd> case in the suite names a single value, so some and every agree. |
| 239 | new Map(allowed.map(value => [value.toLowerCase(), value])) → [value, value] |
An allowlist value written Frozen in the yaml must match the comment /lifecycle frozen and apply lifecycle/Frozen. Every fixture allowlist is lower-case, so the key fold never decides. |
| 266 | sameLabel: a.toLowerCase() === b.toLowerCase() → a === b.toLowerCase() |
With the yaml value Frozen and lifecycle/frozen on the issue, /lifecycle frozen must not treat the existing label as stale, and /remove-lifecycle frozen must delete it. The existing casing tests (kind.test.ts, help.test.ts) vary the issue side only, so the requested side is always already lower-case. |
| 255 | labels.find(isProtectedLabel) → .findLast(…) |
/label hold lgtm must name hold, the first protected label, in the refusal. The existing refusals each carry one protected label. |
Equivalent, not actionable: line 54 protectedPrefixes.some→.every (one prefix in the array), line 102 cmd.prefix.toLowerCase() removal (registry prefixes are lower-case and dynamic ones pass labelCommandName), line 106 stale.length > 0→>= 0 (removeLabels([]) makes no call), line 221 ?? false→|| false (the operand is boolean | undefined), lines 88/124 required: true→false (getInput is stubbed).
Recommendation
Add to __tests__/label/lifecycle.test.ts:
- an
it.eachwith/stage betaoverstage/alphaand/status in-reviewoverstatus/in-progress, asserting['DELETE <stale>', 'POST <label>'] /remove-lifecycle stale frozenwith both on the issue → twoDELETEs- a
with a mixed-case yaml valueblock (lifecycle:\n - Frozen\n):/lifecycle frozen→POST lifecycle/Frozen; the same withlifecycle/frozenalready present →POSTonly, noDELETE;/remove-lifecycle frozen→DELETE lifecycle%2Ffrozen
Add to __tests__/label/label.test.ts › protected labels: /label hold lgtm refused with label: hold is managed by its own command.
Test-only; no src/ or dist/ change. Disjoint from the open held PRs #510–#537: none touches __tests__/label/lifecycle.test.ts, __tests__/label/label.test.ts or src/labels/prefixed.ts (#512 edits __tests__/label/remove.test.ts only).
Evidence
- unit:
npm run test:coverage→ 100 / 99.75 / 100 / 100 (main @ 88241f4, local run, 163 files / 2206 tests);prefixed.ts100 % lines, no zero-hit branch - e2e:
npm run test:coverage:e2e→ 99.96 / 98.79 / 100 / 99.95 (same revision, local run);prefixed.ts100 % lines, no zero-hit branch (the two reports come from different transforms and are analysed separately) - probe: each mutant applied in turn to
src/labels/prefixed.ts,npx vitest related src/labels/prefixed.ts --run→ 722 passed for all six; with the recommended cases each mutant fails at least one test
Priority
- Impact: medium —
exclusiveis what makes/stageand/statussingle-valued; a regression there stacksstage/alphaandstage/betaon the same issue with the suite green - 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 17h
- PR unite (30g)
- 219
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] Unit msw servers reject unhandled requests but no test fails when the code under test swallows the rejection (158 tests run through fallbacks)Forse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/quality needs-kind stage/040-covered-by-pr testing
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
cncf/prow-github-actions#570 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] bundle fake answers unrouted requests with a plain 404; the harness should assert on unexpected traffic outside application fallbacksForse già presa @hivecommons-hive l’ha presa 1 giorno fa. Apertaagent/quality needs-kind stage/040-covered-by-pr testing
Difficoltà 3/5 Mezza giornata Idoneità per principianti 48/100
cncf/prow-github-actions#568 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] sweep.ts delayed-reviewers OWNERS guard (line 80 false arm) is covered by neither the unit nor the bundle suiteForse 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 25/100
cncf/prow-github-actions#560 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Follow-up: strengthen test contracts, CI enforcement, release delivery, and quality triageForse già presa @hivecommons-hive l’ha presa 1 giorno fa. Apertakind/cleanup quality stage/040-covered-by-pr tests
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
cncf/prow-github-actions#554 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] Re-evaluate the e2e branch coverage floor after pending coverage work landsForse già presa @hivecommons-hive l’ha presa 2 giorni fa. Apertahive/claimed-by-quality kind/cleanup stage/040-covered-by-pr
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
cncf/prow-github-actions#551 · 4 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 66/100
db-ux-design-system/core-web#8613 ·
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:new
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
callstackincubator/simlock#934 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
gchq/LD-Explorer#286 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
foxglove/mcap#1907 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno