Skip to content

fix(skills): reject empty or partial scene files at assembly time#1629

Merged
miguel-heygen merged 1 commit into
mainfrom
fix/assemble-guard-empty-scene-files
Jun 22, 2026
Merged

fix(skills): reject empty or partial scene files at assembly time#1629
miguel-heygen merged 1 commit into
mainfrom
fix/assemble-guard-empty-scene-files

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Summary

When a scene worker errors or is interrupted mid-write, it can leave an empty (or markup-less) compositions/<scene>.html. The assembler only checked that the file existed, so it still emitted a data-composition-src reference to it. The problem surfaced much later — at render — as the confusing compile error:

Composition HTML is empty or could not be parsed: compositions/scene-*.html

By then the broken project had already shipped to the user, and the message pointed at the symptom rather than the cause.

Changes

All three assemblers (product-launch-video, faceless-explainer, pr-to-video) now validate scene-file content — non-empty and contains markup — at the exact point they already read the file for the duration cross-check. If a scene file is blank or partial, assembly fails fast with an actionable message telling the author to re-dispatch that scene worker, before any reference to it is written into index.html.

This moves the failure from a late, opaque render error to an early, clear authoring error, and prevents an unrenderable project from being produced at all.

Verification

  • node --check passes on all three scripts.
  • Repro against the real assembler: empty and whitespace-only scene files now fail at assembly with the new message (exit 1); a valid scene file passes the guard and assembles successfully (no false positives).

A scene worker that errors or is interrupted mid-write leaves an empty (or
markup-less) compositions/<scene>.html. existsSync passed, so assemble-index
emitted a data-composition-src pointing at it and the failure surfaced much
later as the render-compile error "Composition HTML is empty or could not be
parsed: compositions/scene-*.html" — the #1 render_error, ~4.7k users/day and
climbing.

All three assemblers (product-launch-video, faceless-explainer, pr-to-video)
now validate scene-file content (non-empty + contains markup) right where they
already read it for the duration cross-check, and die with an actionable
"re-dispatch that scene worker" message before the broken project can reach a
user's render.
@miguel-heygen miguel-heygen merged commit a843b2a into main Jun 22, 2026
37 checks passed
@miguel-heygen miguel-heygen deleted the fix/assemble-guard-empty-scene-files branch June 22, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant