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

product-launch-video: assemble-index.mjs is not idempotent — a second run drops every approved frame video

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

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

@Dante-dan がすでに取り組んでいます。

2026年10月17日 から。

  • #5738 @Dante-dan による — オープン

評価

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

調査の方向性

skills/product-launch-video/scripts/assemble-index.mjsから始め、特にguardFrame()、hoistApprovedVideos()、417行目付近の書き込み処理を確認してください。index.htmlの構築時に修復されたフレームHTMLがどのように使われるかを追い、その後、同じfixtureを2回組み立ててルートの動画数を比較する回帰テストを追加してください。両方の実行で承認済みの映像が保持され、2回目の実行で空のレンダリングがひそかに生成されなければ完了です。

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

説明

Summary

skills/product-launch-video/scripts/assemble-index.mjs is not idempotent. The first run hoists each approved frame <video> out of its frame file and writes the frame file back with only a placeholder comment (<!-- approved frame video hoisted by assemble-index -->). A second run finds no <video> in the frame files, so it rebuilds index.html with no footage, and it exits cleanly without any error or warning.

Repro (hyperframes 0.8.163)

  1. A project with a frame compositions/frames/02-x.html that holds an approved video (data-frame-video="approved", with data-start / data-duration / data-track-index / layout attrs).
  2. Run assemble-index.mjs, and index.html has the root-level <video>. ✅
  3. Edit any frame (e.g. a caption fix) and run assemble-index.mjs again.
  4. index.html has no <video>, the frame file has only the hoist comment, and the render shows empty device frames.

Cause

guardFrame() → hoistApprovedVideos() returns the stripped HTML as repairedHtml, and the caller persists it (writeFileSync(compAbs, guard.repairedHtml), ~line 417). The hoist is meant to happen at assembly time, but it mutates the source of truth, so the operation destroys data on re-run.

Suggested fix

Either of these would work:

  • Don't write the hoist back: keep the <video> in the frame source and strip it only in the in-memory copy used for index.html (the root-dimension repair can still be persisted on its own).
  • Or make the placeholder carry the full tag (e.g. a data-hoisted <template> or an attribute-bearing comment) so a re-run can re-hoist from it.

A regression test: run assembly twice on the same fixture and assert that the <video> count in index.html is equal across runs.

Impact

Any edit-and-reassemble loop, which the review loop encourages, silently loses all footage. The only signal is a blank render, found after a full render cycle.

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

環境構築

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

はじめの一歩

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

heygen-com/hyperframes のほかの issue

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

似ている issue

TypeScript の issue をもっと見る

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

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