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

embedded-captions: occlusion gate records PASS when check-occlusion times out before its verdict

Cerrado Apto para principiantes
#5,485 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Ya se ha fusionado un pull request relacionado.

  • #5491 de @xiajiahang — fusionado
  • #5496 de @Yi-111-a — cerrado sin fusionar

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bash, node.js, typescript

Línea de trabajo

Empieza por la rama de terminación del watchdog en skills/embedded-captions/scripts/render-and-composite.sh y sigue cómo verdict_at, OCC_RC y OCCLUSION_SKIP afectan al resultado de la compuerta. Reproduce el timeout previo al veredicto con el arnés descrito en el issue y comprueba que hace fallar la compuerta, mientras que los bloqueos durante el desmontaje posterior al veredicto mantienen su comportamiento actual. El objetivo se cumple cuando no se puede registrar como PASS el análisis incompleto.

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

Descripción

Bug

In skills/embedded-captions/scripts/render-and-composite.sh, the occlusion + overflow gate runs check-occlusion.cjs under a watchdog. When the watchdog fires because no verdict was printed within 150 s (analysis stuck, not the known sharp/libvips teardown hang), the kill branch still sets:

if grep -q 'cap(s) FAIL' "$OCC_LOG"; then OCC_RC=2; else OCC_RC=0; fi

The incomplete log has no cap(s) FAIL line, so OCC_RC=0. The gate then appends occlusion+overflow PASS to _gates.txt and the render continues, even though the analysis never completed. It also logs the misleading "hung after verdict (sharp teardown)" message.

The verdict_at marker (set when the [v2] … word-fail≥ header appears) already distinguishes the two cases, but the kill branch does not consult it.

Reproduction

Extract the gate block (the if [[ -f "$PROJECT/plan.json" && -d "$PROJECT/frames_fg" ]] … fi section) into a harness, lower occ_t0 > 150 to > 4, and stub check-occlusion.cjs with a process that never prints, e.g. setInterval(() => {}, 1000);. On current main the harness exits 0 and _gates.txt reads occlusion+overflow PASS.

Suggested fix

Treat a pre-verdict timeout as a failed gate, keeping the post-verdict teardown tolerance and the existing OCCLUSION_SKIP=1 override:

       kill -9 "$OCC_PID" 2>/dev/null
+      if [[ -z "$verdict_at" ]]; then
+        # No verdict: the analysis never finished, so it cannot count as a pass.
+        OCC_RC=3
+        echo "[render] occlusion gate timed out before its verdict — killed; analysis incomplete (rc=3)" >&2
+        break
+      fi
       if grep -q 'cap(s) FAIL' "$OCC_LOG"; then OCC_RC=2; else OCC_RC=0; fi

Checked in the same harness with stub analyzers:

Scenario Current main With the fix
Hangs before any verdict PASS (wrong) aborts, rc 3
Verdict, no FAIL, then teardown hang PASS PASS
Verdict + cap(s) FAIL, then hang aborts, rc 2 aborts, rc 2
Pre-verdict timeout with OCCLUSION_SKIP=1 PASS (wrong) continues, recorded as OVERRIDDEN

No permanent test is included: the skill has no harness for its shell scripts, and a fast test would need the 150 s budget to be configurable. Happy to open a PR with or without that if useful.

Found by automated review while vendoring the skills into a downstream repository (related: #5482, #5483).

Lenguaje dominante
TypeScript
Estrellas
54.1k
Forks
4.9k
Merge medio
9 h 46 min
PR fusionados (30 d)
652

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 heygen-com/hyperframes

Todos los issues de heygen-com/hyperframes

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.