[quality] Pin the three behavioural Stryker survivors in blunderbuss, requireMatchingLabel and approveReview
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- github-actions, typescript
- Ambito
- backend-api-design, testing-qa
Direzione di ricerca
Read the three proposed test cases in the issue and the referenced plugin code: src/plugins/blunderbuss.ts, src/plugins/requireMatchingLabel.ts, and src/plugins/approveReview.ts. Start by running the focused existing plugin tests, then add the three named files under __tests__/plugins/ to cover reviewer tier preference, unlabeled rule matching, and withdrawal event ordering. Done means all three pins pass on the current code and fail when their corresponding mutations are applied.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Finding
A bounded Stryker probe (the harness from #572) over the five plugin modules no earlier probe or held PR had covered — src/plugins/requireMatchingLabel.ts, approveReview.ts, blunderbuss.ts, lgtmBinding.ts, ownersLabel.ts — at main @ 99bae97 produced 718 mutants, 78 survived (score 89.14%). Line coverage cannot see any of them: both suites report 100% lines for all five files (npm run test:coverage 2346 tests, 99.92% statements; npm run test:coverage:e2e 534 tests, 100% statements / 99.52% branches, run locally against the same revision).
Reading the 78, three change an observable effect; the rest are debug/log strings, getInput(..., { required: true }) flag folds, ?. chains on payload fields a real event always carries, or error-shape guards that @octokit/request's RequestError makes unreachable from dist/index.js (same class as #587's hints):
| mutant | what the surviving mutant changes | why no test notices |
|---|---|---|
blunderbuss.ts:184 (coverage.get(login) ?? 0) + 1 → (coverage.get(login) && 0) + 1 |
every reviewer's file count becomes NaN, pickReviewers sees a single tier, and the owner covering more of the changed files loses the documented preference |
the "weights candidates" case uses request_count: 1 with the last-picking rng: both layouts yield rita. pickReviewers is tested with a hand-built Map, so the seed in requestOwnersReviewers is never asserted |
requireMatchingLabel.ts:100 action === 'labeled' || action === 'unlabeled' → action === 'labeled' || false |
on unlabeled, changedLabel is undefined and applicableRules returns every rule, not the one the removed label matched |
every unlabeled test configures exactly one rule |
approveReview.ts:109 [...events].sort((a, b) => a.at.getTime() - b.at.getTime()) → [...events] |
withdrawalReason takes the last event per user by array position, not by time |
approvalEvents (approve.ts:105-130) appends all comments before any review, so a review that predates a later /approve comment is the production shape — but every test passes events already in chronological order |
Each was confirmed by applying the mutant by hand at its exact span and running the new pins: all three fail under the mutant and pass on main.
Recommendation
Add three new unit test files (no existing test or src/ file edited):
-
__tests__/plugins/blunderbussTierPreference.test.ts— throughblunderbuss(prEvent('opened'), first)withrequest_count: 2then3over['sdk/x.go', 'docs/y.md']: the two-file owners (alice,rita) fill the count before any one-file owner (bob) is drawn -
__tests__/plugins/requireMatchingLabelUnlabeled.test.ts— two rules configured;unlabeled kind/bugon a bare issue adds onlyneeds-kindand posts only the kind comment;labeled area/docson an issue carrying it makes no write at all -
__tests__/plugins/approveReviewWithdrawalOrder.test.ts—withdrawalReasonwith a later/approvelisted before an earlierreview-changes(retracted), the inverse (withdrawn), and a latercancellisted first
Per #554 ("A repository-wide mutation gate is not required") these are pinned individually rather than proposed as a CI gate; the probe command is reproducible as npm run test:mutation -- --mutate "src/plugins/requireMatchingLabel.ts,src/plugins/approveReview.ts,src/plugins/blunderbuss.ts,src/plugins/lgtmBinding.ts,src/plugins/ownersLabel.ts".
Priority
- Impact: medium (reviewer selection, label enforcement and approval-review reasons are all user-visible; none is a merge decision)
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 99bae97
— 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] Gate proposal: scheduled Stryker run over the whole src/ tree (five advisory shards)Apertaagent/quality needs-kind stage/045-needs-decision testing
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
cncf/prow-github-actions#594 · 3 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] Pin the ten behavioural Stryker survivors in sweep's delayed-reviewer guards, meow's image validation, the tilde-fence opener and /approve cancelForse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/quality needs-kind stage/040-covered-by-pr testing
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
cncf/prow-github-actions#592 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
🐝 Hive Advisory ReportApertahive/advisory kind/cleanup
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
cncf/prow-github-actions#170 · 3 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 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
keptinventory/kept#336 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
hemi-earn
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
vetro-protocol/vetro-monorepo#1013 ·
I maintainer di solito rispondono entro 1 giorno