Repository navigation
fix(producer): resolve template sub-composition entries in the shared compile stage - #7217
Merged
jerrai-bot-heygen merged 1 commit intoNov 5, 2026
Conversation
… compile stage The distributed planner compiled the raw entry file, so a <template>-wrapped sub-composition rendered alone had no live root, timeline or duration and failed with "Composition has zero duration". Entry resolution now lives in runCompileStage, which both the in-process renderer and plan() call. — Jerrai
Contributor
Contributor
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head b9ce940
This moves the code without changing its behavior. runCompileStage now resolves the entry itself, and htmlPath is gone from CompileStageInput. plan.ts and renderOrchestrator.ts are its only two callers, so neither can skip the template isolation.
Scope
- Read all 6 files. The orchestrator never used
htmlPathafter the compile step, so leaving it as the raw entry path changes nothing downstream. - Plan lane: the wrapper is written to
<planDir>/.plan-work/standalone-entry.html. That directory is removed beforefreezePlan, so the wrapper does not enter the planHash or the planDir sent to workers. This matches the unchanged index.html planHash in the description. - No other code or test mocks
extractStandaloneEntryFromIndex/isTemplateEntry, so the removed import in the orchestrator breaks nothing. - CI on this head passed, including Producer unit and integration tests, regression, and Windows render verification. The local ProRes mov plan timeout did not show up in CI.
- Not covered here: a real DEV distributed render. It needs a producer release first, as the description says.
jerrai-bot-heygen
deleted the
jerrai/hf_distributed_template_entry-11052026
branch
November 5, 2026 10:04
Merged
miguel-heygen
added a commit
that referenced
this pull request
Nov 5, 2026
mitanshu450
pushed a commit
to mitanshu450/hyperframes-video-generation
that referenced
this pull request
Nov 5, 2026
* chore: release v0.9.16 * chore: format v0.9.16 release notes * chore: add heygen-com#7228 and heygen-com#7231 to v0.9.16 notes * chore: add heygen-com#7217 heygen-com#7224 heygen-com#7225 heygen-com#7226 heygen-com#7229 heygen-com#7233 to v0.9.16 notes
2 of 4 tasks
SanHsien
added a commit
to SanHsien/hyperframes
that referenced
this pull request
Nov 6, 2026
…eview Adopts or partially adopts 11 groups: multi-worker tween replay behind the timeline stand-in (heygen-com#7231), template entries in the shared compile stage (heygen-com#7217), HYPERFRAMES_CACHE_DIR and HYPERFRAMES_CONFIG_DIR for every per-user cache and settings file (heygen-com#7224, heygen-com#7229; HeyGen credentials stay under HEYGEN_CONFIG_DIR), WebKit audio clock (heygen-com#7225), packet-based video length (heygen-com#7233), HLG tone mapping (heygen-com#7234), fetch network cause (heygen-com#7236), .hyperframesignore in lint (heygen-com#7239), info --media (heygen-com#7235), lint priority (heygen-com#7244), check --budget (heygen-com#7245) and the unknown-command answer (heygen-com#7247). bun.lock gains only the lint `ignore` edge from heygen-com#7239, already resolved. Watermark advances to 0a6746e. Co-authored-by: Jerrai <[email protected]> Co-authored-by: Miguel Ángel <[email protected]> Co-authored-by: WaterrrForever <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What
Rendering a
<template>-wrapped sub-composition alone (entry file such ascompositions/sting.html) through the distributed planner now works. The mounted-shell extraction moves fromrenderOrchestrator.tsintorunCompileStage, which both the in-process renderer andplan()already call.Why
plan()sethtmlPath = join(projectDir, entryFile)and compiled the raw file. A template entry has no live root, its script never runs, so the probe found no timeline and no duration. Production symptom (render service,/v2/distributed/plan-s3, 500 INTERNAL_ERROR, found by Cut Room'shf_render composition="render alone" preview):Only the in-process path handled this (
extractStandaloneEntryFromIndexinrenderOrchestrator.ts), so the two lanes had diverged. Before the fix, the new plan test reproduces exactly this error (browser probe, "root duration unknown").Related work
None linked (found from a Cut Room walk, not a filed issue).
How
resolveEntryHtmlPath(new, exported fromcompileStage.ts): index entries and non-template files returnjoin(projectDir, entryFile)unchanged; a template entry is isolated inside the project'sindex.htmlshell viaextractStandaloneEntryFromIndex, written to<workDir>/standalone-entry.html, with the same two errors as before (no index.html; not mounted by adata-composition-srchost). Nothing is keyed to one file name or tag shape; it derives fromisTemplateEntryand the mount host.runCompileStagederives the path itself, sohtmlPathis removed fromCompileStageInput: a caller can no longer skip the resolution. The orchestrator block is deleted andplan.tsdrops the argument. Both callers keep their own entry-file-exists checks and error text.Test plan
Run from
packages/producer:bun test src/services/distributed/plan.test.ts— 73 pass, 1 fail. The failure isstitched mp4 plans > locks each ProRes profile's preset and pixel format into a mov plan, a 120 s timeout in a mov/ProRes plan test that does not touch entry resolution; I did not confirm it onorigin/main, CI will show.totalFrames90 (3 s at 30 fps); rejects a template entry thatindex.htmldoes not mount. Both fail before the fix with the zero-duration error above.bunx vitest run src/services/render/stages/compileStage.test.ts src/services/render/stages/compileStage.mediaType.test.ts— 21 pass, including newresolveEntryHtmlPathcases (plain entry untouched and no wrapper written, non-template sub-composition untouched, template isolated in the index shell, unmounted refused, no index.html refused).bun run typecheckinpackages/producer— clean.oxlintandoxfmton the 6 changed files — clean.index.htmlproject before and after gives identicalplanHash(daa0ae639e3e8518656c0d1f8d9bc9d2ef904229ae2715cd0dcbdd258e593fea) and identicalcompiled/index.htmlsha256 (209fe53bd0180ccc4936eec2874d7d492f503f9104dcab990b5e61154ebf85ad).resolveEntryHtmlPathtests now cover it for both lanes.Not exercised:
No render of a real DEV project and no chunk-worker or Lambda run; only plan-time compile.
scripts/check-comment-citations.mjsandscripts/comment-ratchet.mjscould not run locally (this box's git lackscheck-attr --source); CI runs them.Template entry with a probe-time (non-static) duration was not exercised; the fixture declares
data-duration.The published
@hyperframes/producerversion the render service pins needs a release before consumers see the fix.Unit tests added/updated
Manual testing performed
Documentation updated (if applicable): no user-visible CLI flag or command change
Comments follow CONTRIBUTING.md "Comments"
— Jerrai