Flaky test: query-sql-streaming terminal memory guard misses the expected budget error

Abierto Apto para principiantes
#3,001 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@platypii ya está trabajando en esto.

Desde el 16/11/2026.

  • #3006 de @platypii — 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
javascript, node.js
Área
testing-qa

Línea de trabajo

Empieza en test/core/query-sql-streaming.test.js alrededor de la línea 107 y lee la prueba del límite de memoria al final, añadida en #2969. Comprueba cómo obtiene la prueba la medición del heap y cómo la usa la comprobación final; el issue sugiere inyectar una medición determinista. El trabajo estará hecho cuando la prueba compruebe de forma fiable QueryExecutionBudgetError sin depender de la lectura actual del heap.

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

Descripción

What happens

test/core/query-sql-streaming.test.js:107, "the terminal memory guard covers retained consumer output on early break", failed once in a merge-group run and removed an unrelated PR from the merge queue.

AssertionError [ERR_ASSERTION]: Missing expected rejection (QueryExecutionBudgetError).
    at async TestContext.<anonymous> (test/core/query-sql-streaming.test.js:110:3)

Sighting

  • Run 43942627137 (merge group for #2998 on master b2ffe17d), job test (24) 133563858691, 2026-11-16T19:48:15Z. The test took 119 ms.
  • test (26) passed in the same run. test (22) was cancelled when test (24) failed.
  • The same tree passed test (22), test (24) and test (26) minutes earlier on the PR itself (#2998 at 2b24b55c, which already contains master b2ffe17d).
  • #2998 changes the ai-gateway proxy, the test runner script and three other tests. It does not touch query streaming.

Why it looks like a race in the test, not in the PR

The test streams with maxHeapBytes: 1, breaks out of the loop after the first batch while holding 50,000 retained rows, and expects the terminal memory check to reject with QueryExecutionBudgetError. Whether it rejects depends on what the heap measurement reads at that moment. On this run it read under the limit, so nothing was thrown. The test was added in #2969.

Not verified: the exact reading that made the guard pass. Nobody has reproduced it locally.

Effect

A PR that does not touch this code can be dropped from the merge queue and has to be enqueued again.

What a fix needs

Make the test independent of the live heap reading (for example by injecting the measurement), or make the terminal check's reading deterministic for the test. The guard's product behavior is not in question here.

Lenguaje dominante
JavaScript
Estrellas
11
Forks
0
Merge medio
1 h 14 min
PR fusionados (30 d)
262

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 hyparam/hypaware

Todos los issues de hyparam/hypaware

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.