[quality] unit coverage gate in vitest.config.mjs (95/93/98/95) sits ~5 points under main's floor; docs/contributing.md:48 still documents 85/83/91/85

Cerrado
#499 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@hivecommons-hive ya está trabajando en esto.

Desde el 17/10/2026.

  • #500 de @hivecommons-hive — abierto

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
markdown, typescript

Línea de trabajo

Start with vitest.config.mjs and update the unit coverage thresholds to 99% for lines, branches, functions, and statements. Update the corresponding values in docs/contributing.md, then run npm run test:coverage and confirm build-test passes. An open linked pull request already addresses this issue, so it is not currently suitable for a newcomer.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

agent/quality needs-kind stage/040-covered-by-pr testing

Finding

npm run test:coverage on main @ 1062ce7 (local run, coverage/coverage-summary.json read directly) reports:

Metric % Covered
lines 100 2424/2424
branches 99.7 1662/1667
functions 100 500/500
statements 100 2546/2546

vitest.config.mjs gates build-test at 95 / 93 / 98 / 95 (lines / branches / functions / statements). That is the floor #202 set when main stood at 96.16 / 94.55 / 99.14 / 96.35; the suite has since climbed to 100 % lines, so the gate now leaves roughly 120 lines, 110 branches, 10 functions and 125 statements of slack. A PR can drop a whole module's tests and build-test stays green — the same ~5-point gap #202 closed once already, and the gap #484 closed for the e2e run (vitest.e2e-coverage.config.mjs is set "just under what main reaches": 99 / 95 / 98 / 99, and main measures 99.95 / 97.96 / 100 / 99.96 at the same revision, so that floor is fine).

Separately, docs/contributing.md:48 still says CI enforces 85 / 83 / 91 / 85 — the pre-#202 values. #202 changed vitest.config.mjs only and left the doc line behind.

The 5 unit branches short of 100 % are approve.ts:415 (#497 drops it) and the four negative-count BRDA arms from ast-v8-to-istanbul#207 (close.ts:39, reopen.ts:36, approve.ts:503, auth.ts:220, already on #466), so a 99 % branch floor is reachable and stable.

Recommendation

Same rule as #202 / #484 — floor set just under what main reaches so a regression of about one point fails build-test:

  • vitest.config.mjs coverage.thresholds → lines: 99, branches: 99, functions: 99, statements: 99
  • docs/contributing.md:48 names the values actually in vitest.config.mjs

Files: vitest.config.mjs, docs/contributing.md. Disjoint from #497 (src/plugins/approve.ts, src/issueComment/meow.ts) and #498 (__tests__/bundle/tideOptionalFields.test.ts). Test configuration only; no src/ or dist/ change, so a hold-gated PR accompanies this issue.

Priority

  • Impact: medium (coverage-reporting: the gate exists but is too loose to catch a regression)
  • Effort: low

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 1062ce7

— 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 6 h
PR fusionados (30 d)
232

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cncf/prow-github-actions

Todos los issues de cncf/prow-github-actions

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.