Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

check:affected: a changed test file must run the test-file size ratchet

Abierto
#3,787 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@thymikee ya está trabajando en esto.

Desde el 18/10/2026.

  • #3804 de @thymikee — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
testing, tooling

Línea de trabajo

Read the selection rules in scripts/check-affected/model.ts and the existing ratchet test, scripts/tests/test-file-size-ratchet.test.ts. Find where the measured file patterns and roots are defined, then check how other text-read gates declare selection reasons. Add a model.test.ts case and run it: a changed measured test file should select the ratchet with its path in the reason, while a non-test change should not.

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

Descripción

bug in-progress ready-for-agent

Purpose

pnpm check:affected --run passed on #3732 at 63c6a66, but CI Coverage failed scripts/__tests__/test-file-size-ratchet.test.ts: packages/platform-apple/src/lifecycle.test.ts grew from 970 to 1,006 lines, past the 1,000-line tripwire. The local gate selects tests through Vitest's module graph (vitest related). The ratchet doesn't import the files it measures; it walks the tree and reads line counts. So no change to a test file ever selects it, and the failure reaches CI one review round late.

Required behavior

  • When a change adds or modifies a file the ratchet measures (*.test.ts, *.test.tsx or *.test.mjs under src/, packages/, test/ or scripts/, excluding node_modules, dist, dist-types and .tmp), the affected plan selects the ratchet test, with a reason that names the triggering file.
  • Express it as a selection rule in scripts/check-affected/model.ts, the same way other text-read gates are declared there. Don't special-case it in run.ts.
  • Keep a single definition of which files the ratchet measures. The selection rule and the ratchet test must read the same pattern and roots, so they can't drift. Put the shared definition where both can import it.
  • A change that touches no test file doesn't select the ratchet.

Completion

  • A model.test.ts case: a changed test file selects the ratchet check and gives the triggering reason, and a non-test change doesn't. It fails before the change and passes after.
  • Planting a 1,001-line new test file in a scratch checkout makes pnpm check:affected --run fail locally on the ratchet.
  • pnpm check:affected --run --head <sha> passes on the final commit.
Lenguaje dominante
TypeScript
Estrellas
5k
Forks
334
Merge medio
12 h 2 min
PR fusionados (30 d)
706

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 callstack/agent-device

Todos los issues de callstack/agent-device

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.