[quality] getCurrentLabels' bare-string label arm (labeling.ts:148) is unit-only; no bundle test serves a non-object label
I maintainer di solito rispondono entro 2 giorni
Una pull request collegata è già stata integrata.
- #433 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-actions, typescript
- Ambito
- testing
Direzione di ricerca
The bare-string branch is return e at src/utils/labeling.ts:148 inside getCurrentLabels (lines 144-149), and the existing unit coverage is in __tests__/utils/labeling.test.ts. Start by reading the bundle harness the e2e suite uses, then add __tests__/bundle/stringLabelArm.test.ts serving GET /issues/1 with a mixed labels array to /remove-kind cleanup. Done means the e2e coverage report shows line 148 hit and the test passes. Pull request #433 is already open against this, so check it first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Finding
getCurrentLabels (src/utils/labeling.ts:144-149) normalises the labels array of GET /repos/{owner}/{repo}/issues/{n}, whose schema is OneOf<[string, { name?: string, … }]>[] (@octokit/openapi-types issue.labels). It has three arms: an object with a name, an object without one (e.name || ''), and a bare string (return e, line 148). Every command that reads an issue's labels (/hold, /remove, /lgtm, prefixed /remove-kind, ownersLabel, requireMatchingLabel, trigger, onPrLgtm) goes through it.
The bundle suite only ever serves { name } objects, so the string arm has never run through dist/index.js:
- Unit:
npx vitest run --coverageonmain@ d0b1d87 (132 files / 2073 tests) → 100 % lines,labeling.ts100 % branch — reached only by__tests__/utils/labeling.test.tscalling the function directly. - End-to-end:
npm run test:coverage:e2eonmain@ d0b1d87 (63 files / 436 tests) →labeling.ts95.74 % lines, 88.88 % branch, line 148 0 hits. Re-run with the column-accurate remap from #425 applied on a scratch branch: line 148 still 0, so it is a true zero rather than the tsc-flattening artefact #424 describes (the otherlabeling.tsresidual, line 92, isresetLabelCache, a test-only helper and not a gap).
Combined at line granularity: unit-covered, e2e-uncovered → medium.
Recommendation
- one bundle test (
__tests__/bundle/stringLabelArm.test.ts) that servesGET /issues/1withlabels: ['kind/cleanup', { id: 2 }, { name: 'needs-kind' }]to/remove-kind cleanupand asserts the string label is matched and deleted and the nameless object folds to''(kind: found labels for issue kind/cleanup,,needs-kindin the debug log). Locally this takeslabeling.tsto 100 % branch in the e2e report (437 / 437 pass).
Disjoint from the open hold-gated PRs: #423 (config.ts:305), #425 (coverage map columns), #427 (bundle harness imports), #429 (handleIssueComment.ts:117), #431 (sweep.ts:179). No src/ change.
Priority
- Impact: medium
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: d0b1d87
— 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
-
[quality] Pin the three behavioural Stryker survivors in blunderbuss, requireMatchingLabel and approveReviewForse 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#590 · 3 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
-
Add: ON Phim Viet SDApertacheck:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
Subagent progress token count ignores usage.iterations and swings on multi-iteration responsesApertaarea:agents area:cost bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
anthropics/claude-code#105375 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
galaxyproject/loom#616 ·
I maintainer di solito rispondono entro 1 giorno
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
redhat-developer/rhdh-plugin-export-overlays#4580 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno