[quality] mutation survivors in src/plugins/requireMatchingLabel.ts: the withGracePeriod default, the graceMs > 0 guard, isBot's || and the no-rule debug text are not pinned by any test
Los mantenedores suelen responder en 2 días
@hivecommons-hive ya está trabajando en esto.
Desde el 19/10/2026.
- #520 de @hivecommons-hive — abierto
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- github-actions, typescript
Línea de trabajo
Lee __tests__/plugins/requireMatchingLabel.test.ts junto con src/plugins/requireMatchingLabel.ts para ver los fixtures existentes y los casos de enforceRequiredLabels. Añade las cuatro aserciones descritas para las opciones omitidas, un evento opened sin período de gracia, un comentario de un bot de GitHub App y el mensaje de depuración de una etiqueta no relacionada. Ejecuta npx vitest related src/plugins/requireMatchingLabel.ts --run; el trabajo estará terminado cuando cada una de las cuatro mutaciones descritas haga fallar su prueba correspondiente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Finding
Line coverage on main @ 88241f4 is 100 % for src/plugins/requireMatchingLabel.ts in both npm run test:coverage (unit) and npm run test:coverage:e2e (bundle), so the question is whether the tests pin the behaviour they execute. A single-operator mutation probe over the module (57 mutants: ||/&&, ===/!==, </<=, >/>=, true/false, ??/||, ! removal) — same method as #513, disjoint modules — leaves four survivors that pass the full transitive set, npx vitest related src/plugins/requireMatchingLabel.ts --run (40 files / 752 tests):
-
:139withGracePeriod = false→trueas theEnforceOptionsdefault. The only caller that omits the option issweep.ts:113; under the mutant every swept pull request with agrace_period_durationrule would park the runner for the grace period. No test callsenforceRequiredLabelswithout options and assertssleepis not called. -
:154graceMs > 0→>= 0. A rule withoutgrace_period_durationonopened/reopenedwould callsleep(0)before reading labels. Noopenedcase under a grace-less rule assertssleepwas not called ("touches nothing" at test line 207 asserts the writes only). -
:252isBot:type === 'Bot' || login === 'github-actions[bot]'→&&. The only bot fixture carries both attributes, so a marker comment from another GitHub App (type: 'Bot', a different[bot]login) is never exercised; under the mutant it would stop being deleted when the rule is satisfied. -
:149the "no rule applies … for label X" debug suffix inverted (changedLabel === undefined→!==). Cosmetic, but onetoHaveBeenCalledWithon the existing unrelated-label case pins it for free.
Survivors that are equivalent and need no test: :123 required: true→false on getInput (the token is always set in tests; same class as #513's type-only literals), :248 ?? ''→|| '' on a string body.
Recommendation
Add four cases to __tests__/plugins/requireMatchingLabel.test.ts; no src/ change:
- a new
describe('enforceRequiredLabels')calling it with{ issueNumber: 1, isPullRequest: false }and no options under a5srule:sleepnot called,needs-kindadded (the sweep's call shape) openedwithkindRule(no grace) and no kind label:sleepnot called at all,needs-kindaddedlabeled kind/bugwithneeds-kindpresent and comments[human-with-marker, other-app[bot] with marker]: exactly the app bot's comment id is deletedexpect(debug).toHaveBeenCalledWith('require-matching-label: no rule applies to issue #1 for label priority/high')on the existing unrelated-label case
Verified locally: with these cases each of the four mutants fails exactly one test (53 tests in the file).
Priority
- Impact: medium (grace-period sleeps bill Actions minutes on every swept PR; bot-comment cleanup)
- Effort: low
Decision taken by hive: one issue, since one PR to one test file closes all four and no src/ change is involved.
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 18 h
- PR fusionados (30 d)
- 191
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] prefixed.ts: /stage and /status exclusive replacement, two-value /remove-lifecycle, mixed-case allowlist values and the first protected offender survive mutationPosiblemente ocupada @hivecommons-hive la tomó hoy. Abiertoagent/quality needs-kind stage/040-covered-by-pr testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
cncf/prow-github-actions#538 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[quality] approveReview.ts: a PAT that is not the author never has its review submission asserted, and withdrawalReason's five-file bound, lgtm skip, user casing and withdrawer order are unpinnedPosiblemente ocupada @hivecommons-hive la tomó hace 1 día. Abiertoagent/quality needs-kind stage/040-covered-by-pr testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
cncf/prow-github-actions#526 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[quality] trigger.ts: /test matches workflow names and paths case-insensitively, /ok-to-test honours an existing label in any case, and the non-PR arm of /test and /ok-to-test leaves the run green — none of it is assertedPosiblemente ocupada @hivecommons-hive la tomó hace 1 día. Abiertoagent/quality needs-kind stage/040-covered-by-pr testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
cncf/prow-github-actions#523 · 6 comentarios ·
Los mantenedores suelen responder en 2 días
-
[quality] approve.ts: ten mutation survivors — any-Bot /approve, user-token bot review, require_self_approval break, approver sort, label casing, isBot notifier matchPosiblemente ocupada @hivecommons-hive la tomó hace 1 día. Abiertoagent/quality needs-kind stage/040-covered-by-pr testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
cncf/prow-github-actions#521 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
[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 testPosiblemente ocupada @hivecommons-hive la tomó hace 2 días. Abiertoagent/quality needs-kind stage/040-covered-by-pr testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
cncf/prow-github-actions#517 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de cncf/prow-github-actions
Issues similares
-
skillopt: success-reflect prompt omits the edit schema, so every success-only edit is droppedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Workspace secrets/constants containing "$" are corrupted when resolved in data source optionsAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
mobile-next/mobile-mcp#526 ·
Los mantenedores suelen responder en 1 día
-
e2e-failure ready-to-code
Dificultad 1/5 Menos de una hora Aptitud para principiantes 73/100
redhat-developer/rhdh-plugin-export-overlays#4470 · 1 comentario ·
Los mantenedores suelen responder en 1 día