mutation-model: indirect-ownership self-test pins a test that stopped reaching scroll-edge-state

Abierto Apto para principiantes
#2,547 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
88/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
testing

Línea de trabajo

Comienza en scripts/mutation/ownership.test.ts, especialmente en la aserción de ownership indirecta alrededor de las líneas 40-44 y en su mensaje de error correspondiente de las líneas 37-38. Ejecuta pnpm mutation:test, inspecciona los candidatos de prueba verificados de scroll-runtime y ownershipDeriver().ownersOf, y después ejecuta pnpm check:affected --run. La tarea estará terminada cuando la comprobación de alcanzabilidad indirecta siga siendo significativa, informe de un par obsoleto con un mensaje útil y ambos comandos pasen.

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

Descripción

bug needs-triage

Purpose

mutation-model — the mutation harness self-test inside pnpm check:affected — fails on a clean origin/main checkout, so any contributor whose diff selects that check sees a red local gate for a reason unrelated to their work. It hit #2533 and #2521 during wave 1 of #2531.

Reproduce

pnpm install --frozen-lockfile
pnpm mutation:test
# or, as check:affected selects it:
pnpm check:affected --run   # → check:affected: mutation-model failed.
ℹ pass 39
ℹ fail 1
✖ a kernel is owned by tests that reach it indirectly
  AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
  at scripts/mutation/ownership.test.ts:40:10

The other 39 assertions in that file pass, including ownership is complete: every test reaching a kernel owns it.

Root cause

scripts/mutation/ownership.test.ts:40-44 pins src/commands/interaction/runtime/gestures.test.ts as an indirect owner of the scroll-edge-state kernel. That kernel is packages/capture-kit/src/snapshot/scroll-edge-state.ts plus packages/capture-kit/src/snapshot/scroll-edge-state/selection.ts.

gestures.test.ts no longer imports anything on the scroll path: its resolved import graph is 257 modules and contains neither kernel source, so ownersOf returns kernel-errors, interaction-settle, selectors, target-annotation-serde, snapshot-occlusion and no scroll-edge-state. Scroll moved out of the interaction command family — src/daemon/scroll-runtime.ts was added by bcca714a07 ("refactor: move gesture family to platform runtime", #1952) and the snapshot zone relocation landed in 1f9d940bff (#2385) — and the ownership assertion was never moved with it.

The kernel itself is not uncovered: it has 82 owning test files, including the mirrored packages/capture-kit/src/snapshot/__tests__/scroll-edge-state-*.test.ts set, and the ownership is complete: every test reaching a kernel owns it test passes. Only this hand-pinned pair is stale.

Required behavior

  • The indirect-reachability assertion keeps its purpose — proving the deriver credits a test that exercises a kernel without importing it by name — while naming a pair that is true today.
  • Verified live replacement pair: src/daemon/__tests__/scroll-runtime.test.ts. It never contains the string scroll-edge-state, reaches both kernel sources through src/daemon/scroll-runtime.ts, and ownershipDeriver(...).ownersOf includes scroll-edge-state. src/daemon/scroll-until.test.ts is a second verified candidate.
  • Give the assertion a failure message in the style of its sibling at :37-38, so the next relocation reports which pair went stale instead of printing a bare falsy expression.

Observable completion conditions

  • pnpm mutation:test passes on a clean tree with no other assertion weakened.
  • pnpm check:affected --run reports no mutation-model failure on a docs- or config-only diff.
  • The replacement assertion still fails when the deriver stops crediting indirect reach, i.e. it is not converted into a direct-import assertion.

Dependencies and blast radius

  • No CI job runs mutation:test or check:affected: mutation-affected.yml triggers on scripts/mutation/**, scripts/lib/**, stryker.config.json, or its own workflow file, and mutation-weekly.yml is a Sunday schedule plus workflow_dispatch. This issue therefore gates local contribution, not PRs, and no PR label or re-run depends on it.
  • Contained in scripts/mutation/**; no runtime or kernel source changes are implied.
Lenguaje dominante
TypeScript
Estrellas
4.7k
Forks
304
Merge medio
12 h 42 min
PR fusionados (30 d)
463

Guía de contribución

Abrir la guía de contribución

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.