Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa Adatta ai principianti
#5,485 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #5491 di @xiajiahang — integrata
  • #5496 di @Yi-111-a — chiusa senza merge

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bash, node.js, typescript

Direzione di ricerca

Inizia dal ramo di terminazione del watchdog in skills/embedded-captions/scripts/render-and-composite.sh e segui come verdict_at, OCC_RC e OCCLUSION_SKIP influiscono sul risultato del gate. Riproduci il timeout prima del verdetto con l’harness descritto nell’issue, poi verifica che faccia fallire il gate, mentre i blocchi durante il teardown successivo al verdetto mantengono il comportamento attuale. Il lavoro è completato quando l’analisi incompleta non può essere registrata come PASS.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
TypeScript
Stelle
54.1k
Fork
4.9k
Merge medio
10h 29m
PR unite (30g)
649

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di heygen-com/hyperframes

Tutte le issue di heygen-com/hyperframes

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.