[GUI] apps/host tests: startHost readiness fetch has no timeout, so a stuck host hangs the run
Los mantenedores suelen responder en 4 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, node.js
- Área
- testing
Línea de trabajo
Lee apps/host/tests/agent-host.test.mjs alrededor de startHost() y compara sus comprobaciones de disponibilidad con las solicitudes fetch con límite de tiempo de tests/host-lifecycle.test.mjs y tests/app-ui.test.mjs. Añade un timeout a cada solicitud fetch de disponibilidad para que los intentos fallidos lleguen al catch y al bucle de reintento existentes. Se considera terminado cuando un host que no responde ya no bloquea la consulta de disponibilidad y la prueba muestra el registro del host si falla.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Area
[GUI] (the desktop app)
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
startHost() in apps/host/tests/agent-host.test.mjs waits for the spawned host with up to 100 attempts of fetch() and 200 ms sleeps, but the fetch() has no timeout (agent-host.test.mjs:43 in v0.2.12):
for (let i = 0; i < 100; i++) {
try { if ((await fetch(`${base}/api/agent/status`)).ok) break; } catch { /* not up yet */ }
if (child.exitCode !== null) throw new Error(`the host exited: ${log.slice(-500)}`);
await sleep(200);
}
Node's fetch (undici) has no short default timeout — headersTimeout is 300 s — so a host that accepts the TCP connection but never answers /api/agent/status (a deadlock, a paused process) keeps the await pending for minutes. Neither the 20 s loop budget nor the child.exitCode check can run during that time, so instead of failing with the collected log the run hangs and the failure is reported by the test runner's global timeout, without the host's own output.
Other tests in the same folder already bound their probes: tests/host-lifecycle.test.mjs:87 uses AbortSignal.timeout(1500) and tests/app-ui.test.mjs:124 uses AbortSignal.timeout(2000). The catch in this loop already swallows a rejected fetch, so an aborted attempt would simply count as "not up yet".
Expected: each readiness attempt ends within a bounded time, and a host that never answers fails the test with its log instead of hanging the suite.
Suggested fix: fetch(url, { signal: AbortSignal.timeout(2000) }) in the loop (or Promise.race with a timer). No other change is needed: the abort lands in the existing catch.
Smallest steps or command that reproduce it
Not observed; this is from reading the code. To confirm it, start a fake server that accepts connections on the host's port and never responds, point startHost() at it (or pause the host process after it binds), and run one test: the for loop stays in the first await fetch instead of reaching the 100th iteration after about 20 s.
Reproduction status
Unconfirmed static analysis (I read code or ran a scanner; I did not see it fail)
Strata version
Strata 0.2.12 (tag v0.2.12, commit 123bad4a) · engine 0.1.58
Graphics card, memory and system
RTX 4090 24 GB · 253 GB RAM · Intel Core Ultra 9 285K · Windows 11 25H2 (build 26200.8655) · Node 25.9.0
- Lenguaje dominante
- C++
- Estrellas
- 11.6k
- Forks
- 1k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
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
- 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 Niko1221/Strata
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Niko1221/Strata#5743 · 1 comentario ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Niko1221/Strata#5730 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
needs-format
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Niko1221/Strata#5720 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
[Engine] Two prompt block scorers enabled at once: WMMA silently wins and no log line is printedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Niko1221/Strata#5693 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 4 días
Todos los issues de Niko1221/Strata
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
-
area:qmc bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Los mantenedores suelen responder en 3 días
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
ASGC-Game-Jam/asgc-gamejam-2026#563 ·
Los mantenedores suelen responder en 1 día
-
area/ysql kind/bug priority/medium status/awaiting-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
yugabyte/yugabyte-db#37523 ·
Los mantenedores suelen responder en 1 día
-
Let agents name their jobsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100