[quality] parseOwners's content-shape arms (owners.ts:39/41/83: whitespace-only, non-mapping and non-string-role OWNERS files) have no bundle test through dist/index.js
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 22/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- github-actions, typescript
- Ambito
- testing
Direzione di ricerca
Start with the parseOwners branches at src/utils/owners.ts lines 38-90, then look at how existing bundle tests drive dist/index.js against fakeGithub. The new file would be __tests__/bundle/ownersParseArms.test.ts, covering whitespace-only, yaml-list and yaml-scalar OWNERS plus non-string roles. Done means the refusal and ::error:: assertions pass. PR #406 is already open against this issue, so check with the maintainers before starting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Finding
The content-shape arms of parseOwners (src/utils/owners.ts:38-90) are reached only by unit tests; no bundle test drives them through dist/index.js:
| arm | line | shape |
|---|---|---|
empty document → {} |
owners.ts:39 (contents.trim() === '' ? {} : yaml.load(contents)) |
a whitespace-only OWNERS file |
non-mapping document → {} |
owners.ts:40-43 |
an OWNERS file that is a yaml list or scalar |
must be a list of … rejection |
owners.ts:83-86 (stringList) |
approvers: alice, approvers: [alice, 42], reviewers: { bob: true }, labels: [{ name: … }] |
Evidence (main @ 20d49e7, Node v26.10.0, vitest 5.0.3):
- Unit:
npx vitest run --coverage→ 100 % lines / 99.82 % branches (124 files / 1994 tests);owners.tsfully covered by__tests__/utils/owners*.test.ts. - End-to-end:
npm run test:coverage:e2eonmain→ 94.67 % lines / 89.66 % branches ofsrc/;owners.tsbranches 124/134 with39[0],40[1],41[1],41[2]and83[0]at 0 hits. Re-measured on a scratch branch =origin/main+ the heads of all 13 open hold-gated PRs (#298 … #403; 57 files / 416 tests pass, 98.09 % lines): the same five arms stay at 0 hits, so no held PR claims them (#383 coversloadOwnersTree's L164/L197/L229 failure arms, the already-mergedownersFilters.test.tscovers thefilterskey).
Why it matters: these are the shapes a user's OWNERS file actually takes when it is being staged or mistyped, and they are the only validation the action performs on OWNERS content. What the shipped bundle does with them — refuse the commenter and say so, or fail the run naming the file and the role, before any authorization probe or write — is pinned nowhere end to end.
Related, filed separately because it needs a production change: a 0-byte OWNERS file never reaches parseOwners at all — decode (owners.ts:163) rejects a blob whose content is "" (#404).
Recommendation
One deliverable: __tests__/bundle/ownersParseArms.test.ts (new file only) driving /approve on a pull request through dist/index.js against fakeGithub with a root OWNERS file of each shape above, asserting exit status, the ::error:: lines, the refusal comment, and that no label write or membership probe happens.
- whitespace-only, yaml-list and yaml-scalar OWNERS →
alice is not an approver for any changed file, refusal comment posted, no label write, no membership probe -
approvers/reviewers/labelsnot a list of strings →error loading OWNERS files at basesha: Error: OWNERS at OWNERS: <role> must be a list of …, no comment, no label write, no membership probe - leave the 0-byte shape out, naming #404, so the test does not pin the current failure as expected
Priority
- Impact: medium
- Effort: low
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: unknown
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
- Lingua principale
- TypeScript
- Stelle
- 132
- Fork
- 23
- Merge medio
- 1g 20h
- PR unite (30g)
- 134
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
-
agent/quality hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
cncf/prow-github-actions#393 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] test.yml never runs on main after a tide merge — github.token merges don't trigger push; add workflow_dispatch + scheduleForse già presa @mrbobbytables l’ha presa 1 giorno fa. Apertaagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t kind/failing-test quality testing
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
cncf/prow-github-actions#329 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t kind/cleanup quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
cncf/prow-github-actions#213 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
cncf/prow-github-actions#404 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] blunderbuss never excludes an already-assigned user in the bundle suite (pullRequestOwners.ts:96 has 0 e2e hits)Forse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 20/100
cncf/prow-github-actions#402 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di cncf/prow-github-actions
Issue simili
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
lingdojo/kana-dojo#32018 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
paperclipai/paperclip#15751 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
BuilderIO/agent-native#7275 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno