[quality] owners-label's early-return and failure arms are never driven through dist/index.js (e2e 80% lines, unit 100%)
I maintainer di solito rispondono entro 2 giorni
Una pull request collegata è già stata integrata.
- #298 di @hivecommons-hive — integrata
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- github, node.js, typescript
- Ambito
- testing-qa
Direzione di ricerca
Read src/plugins/ownersLabel.ts and the existing tests under tests/bundle, then add tests/bundle/ownersLabelArms.test.ts to exercise the listed cases through dist/index.js using fakeGithub. Run npm run test:coverage:e2e; done means those non-write and failure arms are covered in the bundle suite and their specified logs, API calls, and failure behavior are asserted.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Finding
src/plugins/ownersLabel.ts is the pull_request owners-label plugin. The unit suite covers it fully, but the end-to-end bundle suite (__tests__/bundle, the only place the shipped dist/index.js runs) only reaches its happy path — adding a declared label the pull request lacks. The arms that stop short of a write are never driven through the bundle:
| lines | arm |
|---|---|
| 61-62 | the pull request already carries every declared label (case-insensitive compare) → no repo-labels read, no write |
| 70 | GET /repos/…/labels fails → could not list the repository labels: … rethrown, run fails |
| 77-78, 81 | a declared label the repository does not have → owners-label: skipping label … (run label-sync) info line, nothing written |
| 30 | pull_request payload without pull_request → github context payload missing pull request: … |
Evidence (main @ 3fc21f2, Node v26.10.0, vitest 5.0.3, @vitest/coverage-v8 5.0.3):
- Unit:
npx vitest run --coverage(81 files / 1644 tests) →ownersLabel.ts100 % lines / 100 % branches / 100 % functions. - End-to-end:
npm run test:coverage:e2e(vitest.e2e-coverage.config.mjs,__tests__/bundle, 5 files / 142 tests) →ownersLabel.ts80 % lines / 73.33 % branches, uncovered lines30, 61-62, 70, 77-78, 81. - The two sources are analysed separately: their statement maps come from different transforms and do not line-merge (#235).
Covered by unit but not end-to-end → priority 2 (medium) under the coverage evidence rules.
Recommendation
Add __tests__/bundle/ownersLabelArms.test.ts driving dist/index.js on pull_request synchronize (so require-matching-label, blunderbuss and tide stay out of the call list) against fakeGithub:
- already-carrying case (
Area/SDKon the issue vsarea/sdkin OWNERS): asserts noGET /labels, noPOST …/labels - every declared label unknown to the repository: asserts both
skipping label …info lines and no write - mixed known/unknown: asserts only the known one is posted, in the OWNERS spelling
-
GET /labels→ 500: asserts::error::error handling pull_request event: could not list the repository labels: …and that approve's probe still runs after it - payload without
pull_request: asserts themissing pull requestfailure with no API calls
Disjoint from every open hold-gated bundle PR (#242 cron jobs input, #244 /meow, #246 fixed/prefixed labels + helpers.ts, #283 OWNERS authorization, #286 approve.github_review, #289 tide merge gate, #291 blunderbuss, #293 hold/sweep, #296 close/milestone): none drives owners-label's non-write arms, and helpers.ts is not touched.
Priority
- Impact: medium
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 3fc21f2
— 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)
- 218
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] owners.ts: 13 behavioural mutants survive the suite, incl. a shared group cache key that gives every team the first team's membersForse già presa @hivecommons-hive l’ha presa 1 giorno fa. Apertaagent/quality needs-kind stage/040-covered-by-pr testing
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
cncf/prow-github-actions#574 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[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 3 giorni fa. 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 · 3 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 3 giorni 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 4 giorni 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 4 giorni 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
Tutte le issue di cncf/prow-github-actions
Issue simili
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
0️⃣ phase/new
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
microsoft/playwright#43640 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100