Idle: a test that waits on the runner's RPC (a dynamic import, vi.importActual) past 500 ms is killed by no progress

Abierto
#148 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript
Área
devtools, testing

Línea de trabajo

Read packages/oracles/oracle-gaps/capture-setup.mjs, focusing on the testsIo and testsTimerDue sampler, then trace how worker RPC calls are started from a test frame. Build the proposed witness history with the driver holding a module fetch reply past the idle window by a count rather than elapsed time. Done means the pending test-started RPC prevents the no progress kill, with the e2e oracle recording the case in its Limits.

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

Descripción

What happens

Under #99 (deterministic cuts), a mutant copy is idle when no timer that the test started is due inside its horizon and no I/O handle or request that the test started is open (v21.2 R51; M entries "Idle is decided by state only" and "Idle counts only the test's I/O"). Idle for 500 ms (IDLE_MS) is a kill by the built-in law no progress (M-24).

A test can wait on a reply over the runner's own channel. Examples: a dynamic import(), vi.importActual, or a mocked module's importOriginal. Each one fetches and transforms a module over Vitest's worker RPC. While the test waits, no test-owned timer or I/O is pending: the request goes out on the runner's channel, which is the runner's resource, and the pending reply is a promise, which the async_hooks hook does not record.

So a copy whose reply takes more than 500 ms is killed by no progress. On a loaded CLI main thread (16 contexts that transform instrumented copies), a reply can take that long. The kill then depends on load, against I15.

The law

M "Idle counts only the test's I/O": "a copy is idle when its test can't make progress without a timer firing". A test that waits for a reply that will come is not idle under that rule.

Where

  • packages/oracles/oracle-gaps/capture-setup.mjs: the sampler (testsIo, testsTimerDue).
  • The e2e oracle records the case in its Limits; no history reaches it.

What would close it

  • Count a pending runner RPC that the test's code started as the test's own pending work. One way: count the worker RPC calls in flight that a test frame started.
  • A witness: a constructed history whose test awaits a module fetch that the driver holds past the idle window by a count, not by time.

Found in the merge-gate review of #99 (M3). Recorded in #99's Limits with this issue as its owner.

Lenguaje dominante
JavaScript
Estrellas
5
Forks
1
Merge medio
11 h 18 min
PR fusionados (30 d)
66

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 TanStack/oracles

Todos los issues de TanStack/oracles

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.