[quality] bare /uncc by a non-collaborator (uncc.ts:79) and /milestone with no milestones (milestone.ts:66) are never driven through dist/index.js

Cerrado
#454 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@hivecommons-hive ya está trabajando en esto.

Desde el 12/10/2026.

  • #455 de @hivecommons-hive — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
20/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
github-actions, typescript

Línea de trabajo

Read __tests__/bundle/collaborationCommands.test.ts and __tests__/bundle/closeMilestone.test.ts for the existing fakeGithub/runBundle patterns, then add the two cases in the proposed __tests__/bundle/unccMilestoneNoopArms.test.ts. Run npm run test:coverage:e2e; done means both cases pass and the uncc.ts and milestone.ts branches reach 100%.

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

Descripción

agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing

Finding

Two quiet arms are unit-covered but never exercised by the bundle (end-to-end) suite:

  • src/issueComment/uncc.ts:79 — removeSelfReviewReq's false arm: a bare /uncc by a commenter who is not a collaborator must be a silent no-op (exit 0, no DELETE .../requested_reviewers). __tests__/bundle/collaborationCommands.test.ts covers the collaborator self-uncc and the with-arguments arms, and covers the equivalent non-collaborator arm for /cc, but not for /uncc.
  • src/issueComment/milestone.ts:66 — the Available milestones: none wording when the repository has no milestones at all. __tests__/bundle/closeMilestone.test.ts only reaches the not-found message with a non-empty title list.
Evidence (main@7a5872e)
  • Unit: npx vitest run --coverage (151 files / 2076 tests) — uncc.ts and milestone.ts both 100% statements/branches/lines.
  • End-to-end: npm run test:coverage:e2e (local, .coverage-bundle remapped onto src/) — uncc.ts branches 88.88% (uncovered line 79), milestone.ts branches 92.3% (uncovered line 66). Overall e2e: 99.32% statements, 95.37% branches (1588/1665).
  • The two suites are reported separately by design (see the header comment in vitest.e2e-coverage.config.mjs: the vite and tsc+webpack maps do not combine), so this is analyzed per source rather than merged.

Recommendation

Add one bundle test file, __tests__/bundle/unccMilestoneNoopArms.test.ts, with two cases driven through dist/index.js via the existing fakeGithub/runBundle harness:

  • /uncc (no arguments) with GET /collaborators/Codertocat → 404: run exits 0, no errors, the only call is the collaborator read, no DELETE is issued.
  • /milestone v1.0 with GET /milestones → []: run exits 1 with milestone "v1.0" not found. Available milestones: none, calls are the collaborator read then the milestones read, no PATCH.

With both cases, uncc.ts and milestone.ts report 100% under test:coverage:e2e (branches 1588 → 1590 / 1665).

Priority

  • Impact: low (defensive no-op and message wording arms; both already unit-tested)
  • Effort: low

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 7a5872e

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

Lenguaje dominante
TypeScript
Estrellas
135
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.