Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

クローズ 初心者向け
#5,485 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #5491 @xiajiahang による — マージ済み
  • #5496 @Yi-111-a による — マージされずにクローズ

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bash, node.js, typescript

調査の方向性

skills/embedded-captions/scripts/render-and-composite.sh の watchdog kill 分岐から始め、verdict_at、OCC_RC、OCCLUSION_SKIP がゲートの結果にどう影響するかを追ってください。issue に記載されたハーネスで verdict 前のタイムアウトを再現し、それによってゲートが失敗することを確認してください。一方、verdict 後の teardown のハングは現在の動作を維持することも確認してください。未完了の解析が PASS として記録されなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
54.1k
フォーク
4.9k
平均マージ
9時間 46分
マージ済み PR(30日)
652

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

heygen-com/hyperframes のほかの issue

heygen-com/hyperframes の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。