fix(skills): reject empty or partial scene files at assembly time#1629
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 adata-composition-srcreference to it. The problem surfaced much later — at render — as the confusing compile error: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 intoindex.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 --checkpasses on all three scripts.