Repository navigation
Description
Summary
0.9.34 (#7548) added an in-browser check: with strict variables on, a render fails with VARIABLES_INVALID when a variable is not declared by the page. On a local hyperframes render … --strict-variables, that check never runs, because the CLI does not pass strictVariables to the producer. Only the static check runs. For a page with no data-composition-variables, the static check has nothing to compare, so the render succeeds with every variable undeclared.
Batch render, the producer server, Lambda and Cloud Run do pass the flag, so local and remote renders of the same project now behave differently.
Version
hyperframes 0.9.34 (npm, gitHead 7a4dfb76), Linux x64, Node 26.
Reproduce
- Create a project whose
index.htmlhas a text element and nodata-composition-variables. - Run
npx [email protected] render . --output out.mp4 --variables '{"title":"x"}' --strict-variables - Expected: the render fails with
VARIABLES_INVALID(undeclaredtitle).
Actual: the render succeeds and exits 0.
Measured on 2026-11-11 with npx --yes [email protected] render . --output out.mp4 --fps 30 --workers 1 --no-browser-gpu --variables '{"title":"x"}' --strict-variables on a 640×360, 1 s page (a GSAP timeline and one #copy div filled from window.__hyperframes.getVariables().title, no data-composition-variables): exit code 0, out.mp4 written (4755 bytes), log ends with artifact validated. No variable-related message was printed; the only notice was Continuing render despite lint issues. Use --strict to block errors.
Reading the dist (below), batch render, the producer server, Lambda and Cloud Run do set strictVariables; I did not run those paths.
Where it happens (published dist of 0.9.34)
dist/cli.jsmapsrendertorender-CDWBVWJP.js.dist/chunk-TLU5DPES.jsbuilds the plan withstrictVariables: args["strict-variables"] ?? false.dist/chunk-UFKWSLJ5.jsusesplan.strictVariablesonly inreportSingleRenderNotes, which callsvalidateVariablesAgainstProject+reportVariableIssues(the static check). The batch path in the same file forwardsstrictVariables: plan.strictVariablestoprepareBatchRender.dist/render-CDWBVWJP.jsbuilds the producer request (producer.renderConfigFromRequest(request, …)→createRenderJob) withvariablesandstrictness, but nostrictVariables(the file has 0 occurrences ofstrictVariables).dist/chunk-Z64I7KJZ.js:checkStrictVariables(session)returns early unlesssession.options.strictVariablesis set, soassertVariablesMatchPageis never called for a local render.
Suggested fix
Forward strictVariables from the render plan into the producer request built in the local render path (the same field the batch, server and cloud paths already set), and add a test that a local render with --strict-variables and an undeclared variable fails with VARIABLES_INVALID.
If the local-render behaviour is intentional, the --strict-variables help text and the 0.9.34 release note should say the in-browser check applies only to batch and remote renders.
Activity