[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
Los mantenedores suelen responder en 2 días
Ya se ha fusionado un pull request relacionado.
- #406 de @hivecommons-hive — fusionado
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 22/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- github-actions, typescript
- Área
- testing
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 132
- Forks
- 24
- Merge medio
- 1 d 17 h
- PR fusionados (30 d)
- 218
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de 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 membersPosiblemente ocupada @hivecommons-hive la tomó hace 1 día. Abiertoagent/quality needs-kind stage/040-covered-by-pr testing
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
cncf/prow-github-actions#574 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[quality] Unit msw servers reject unhandled requests but no test fails when the code under test swallows the rejection (158 tests run through fallbacks)Posiblemente ocupada @hivecommons-hive la tomó hace 3 días. Abiertoagent/quality needs-kind stage/040-covered-by-pr testing
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
cncf/prow-github-actions#570 · 3 comentarios ·
Los mantenedores suelen responder en 2 días
-
[quality] bundle fake answers unrouted requests with a plain 404; the harness should assert on unexpected traffic outside application fallbacksPosiblemente ocupada @hivecommons-hive la tomó hace 3 días. Abiertoagent/quality needs-kind stage/040-covered-by-pr testing
Dificultad 3/5 Medio día Aptitud para principiantes 48/100
cncf/prow-github-actions#568 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[quality] sweep.ts delayed-reviewers OWNERS guard (line 80 false arm) is covered by neither the unit nor the bundle suitePosiblemente ocupada @hivecommons-hive la tomó hace 4 días. Abiertoagent/quality needs-kind stage/040-covered-by-pr testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
cncf/prow-github-actions#560 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
Follow-up: strengthen test contracts, CI enforcement, release delivery, and quality triagePosiblemente ocupada @hivecommons-hive la tomó hace 4 días. Abiertokind/cleanup quality stage/040-covered-by-pr tests
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
cncf/prow-github-actions#554 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de cncf/prow-github-actions
Issues similares
-
type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
0️⃣ phase/new
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
microsoft/playwright#43640 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100