[quality] tide.ts: six mutation survivors in the merge-queue gate, draft refusal, fork-403 workflow-file diagnosis and getPull's fork flag are unpinned by any test
Los mantenedores suelen responder en 2 días
Ya se ha fusionado un pull request relacionado.
- #518 de @hivecommons-hive — fusionado
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- github-actions, typescript
Línea de trabajo
Empieza por __tests__/plugins/tideMergeQueue.test.ts y __tests__/plugins/tide.test.ts; después, lee los puntos de decisión referenciados en src/plugins/tide.ts y las pruebas existentes relacionadas. Añade una prueba específica para cada una de las seis carencias de aserciones indicadas, siguiendo los casos propuestos en el issue. El trabajo estará terminado cuando esas pruebas fallen con los mutantes descritos y pasen con la implementación actual.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Finding
src/plugins/tide.ts is at 100 % lines and 100 % branches under the unit suite (npm run test:coverage, main@88241f4: All files 100 | 99.75 | 100 | 100, no zero-hit BRDA for tide.ts in coverage/lcov.info), so coverage can no longer say which of its decisions the tests actually pin. A 50-mutant single-site probe of tide.ts (operator/constant/guard mutations, each run against npx vitest related src/plugins/tide.ts --run, 60 files / 1166 tests) found 8 survivors. Six are real assertion gaps in the automerge path:
| # | Site | Mutant that passes the suite | Why it matters |
|---|---|---|---|
| 1 | tide.ts:188 tide.merge_queue === 'auto' ? await queueState(...) : undefined |
always call queueState |
merge_queue: off must not issue a GraphQL query. queueState swallows a failed read with one core.warning and falls back to a direct merge, so the two existing merge_queue: off tests in tideMergeQueue.test.ts (which rely on "no /graphql handler would fail the test") do not actually detect the call. |
| 2 | tide.ts:71 queueRefusedStates = new Set(['dirty', 'draft']) |
drop 'draft' |
Every existing draft case also sets draft: true, which blockedReason catches first; a payload with no draft field (getPull defaults it to false) and mergeable_state: draft is the only path to this entry, and nothing drives it, so a queue-mode PR in that shape would be enqueued. |
| 3 | tide.ts:415 blockedReason: if (pr.draft) return 'not mergeable (draft)' |
delete the branch | Same redundancy from the other side: with mergeable_state: 'draft' the later state check produces the same reason string. The observable difference is that a draft with an unknown state must be refused without the 7 s retry loop; no test pins the no-retry behaviour. |
| 4 | tide.ts:280 workflowFiles: path.startsWith('.github/workflows/') |
path.includes(...) |
A fork 403 diagnosis would count docs/.github/workflows/x.yml or templates/.github/workflows/prow.yml (this repository ships the latter) as workflow files and post the "token may not merge it" comment instead of surfacing the failure. |
| 5 | tide.ts:285 fileList: paths.length > 5 |
>= 5 |
Exactly five workflow files would be reported as "… and 0 more". The only existing test uses seven. |
| 6 | tide.ts:437 getPull: fork: head.repo?.full_name !== undefined && head.repo.full_name !== base.repo?.full_name |
drop the !== undefined guard |
A head whose repository was deleted (head.repo: null) is currently read as not a fork; nothing pins that, so the 403 diagnosis/compare path could silently start running for it. |
Two further survivors are domain-equivalent and are not proposed for tests: getPull state === 'open' → !== 'closed' and tideOnComment issue.state !== 'open' → === 'closed' only differ for a state GitHub never emits.
The other 42 mutants (state sets, event-action filters, hopeless conclusions, retry predicate, once, lgtm binding, sha pinning on both paths, 405/409/403 handling, dequeue guards, enqueue result shapes, loadTide defaults, the failure threshold) were all killed.
Recommendation
Add the killing cases to the two files that already own this ground, one it per site, named after the behaviour it pins:
-
__tests__/plugins/tideMergeQueue.test.ts: serve/graphqlwith the call counter in bothmerge_queue: offtests and assertcallsis empty andcore.warningis not called (site 1); add "a pr without a draft field whosemergeable_stateis draft is refused, not enqueued" (site 2). -
__tests__/plugins/tide.test.ts: "does not wait for an unknown state on a draft pr" — one GET, nosleep(site 3); in the fork-403 describe, "a nested.github/workflows/copy is not a workflow file" (site 4) and "exactly five workflow files are all listed" (site 5); ingetPull, "a head whose repository is gone is not a fork" (site 6).
No production change. Disjoint from the open held PRs (#510 auth.ts, #511 contributing.md, #512 remove.test.ts, #514 labelMatch/command tests, #516 sweep.test.ts).
Evidence / provenance
- Unit:
npm run test:coverageon main@88241f4, local — 163 files / 2206 tests, 100 / 99.75 / 100 / 100; tide.ts has no uncovered line or branch. - Mutation: 50 single-site mutants of
src/plugins/tide.ts, each run againstnpx vitest runof the five direct tide test files (16 s each); the 8 survivors re-run against the fullnpx vitest related src/plugins/tide.ts --runset (60 files / 1166 tests) on a clean checkout — all 8 still pass. - e2e: the bundle harness exercises
dist/index.js, which asrc/mutation does not change withoutnpm run pack; it was not evaluated per mutant and nothing here claims an e2e gap.
Priority
- Impact: medium (automerge decisions; every mutant above is a silent behaviour change in the merge/enqueue path)
- Effort: low (two test files, ~70 lines)
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 88241f4
— 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 2 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 2 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 3 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 3 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
-
VS Code extension: clickable file links in chat drop the :line suffix, never jump to the lineAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
MoonshotAI/kimi-code#4398 ·
Los mantenedores suelen responder en 1 día
-
Xiaomi Mimo语音识别服务异常Abiertopending triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
package-lock.json : les binaires natifs macOS et Linux de unrs-resolver ont disparu depuis #1823Abiertobug dependencies
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
AxaFrance/design-system#2064 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100