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

worker: /health reports ok for a stopped or wedged worker (revisits #138)

Cerrado
#182 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
58/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
typescript
Área
api, backend

Línea de trabajo

Lee apps/worker/src/index.ts e inspecciona Worker.stop() y Worker.poll(), especialmente cómo se actualizan running y lastPollTime alrededor del polling y de los lotes de trabajos. Prueba /health con un Worker detenido, un polling bloqueado y un trabajo saludable de larga duración; se considera completado cuando los estados no saludables se rechazan sin hacer que falle un lote saludable en curso.

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

Descripción

area: infrastructure roadmap roadmap: now

Found during the review of #180; the fix attempted there was reverted because it broke the healthy path (see below).

apps/worker/src/index.ts returns 200 {status:'ok', ...health} whenever the worker object exists. It never consults running or lastPollTime, so:

  • Stopped worker reports healthy. Worker.stop() sets running = false without exiting the process — including from Worker's own signal handlers — leaving /health serving 200 {"status":"ok","running":false}.
  • Wedged poll loop reports healthy. Worker.poll() catches every error and reschedules. A poll blocked on a hung database call leaves running: true and lastPollTime frozen, and /health returns 200 forever while the queue backs up.

Important constraint for whoever picks this up: the naive fix (503 when lastPollTime is stale) breaks the healthy path. Worker.poll() stamps lastPollTime at the top and then awaits the job batch, so the timestamp legitimately freezes for the whole batch — up to the 300s jobTimeouts. A 60s staleness bound therefore 503s a perfectly healthy worker mid-job and lets the container healthcheck kill it. That regression was caught in review and is why this is not already fixed.

Any real fix probably needs Worker to stamp when it schedules the next poll rather than when one begins, or to gate the stalled verdict on activeJobCount === 0.

Lenguaje dominante
TypeScript
Estrellas
12
Forks
6
Merge medio
2 h 23 min
PR fusionados (30 d)
2

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin 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 CopilotKit/outpost

Todos los issues de CopilotKit/outpost

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.