Repository navigation
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
|
Independent GPT-6 Astra high review of exact head The reviewer independently passed 68 focused tests and 26 bounded base/head controls. Both BOM-marked batch formats fail on the base and succeed on this head, preserving Review validation reused the verified clean exact-head author checkout and its existing successful build. Native Windows, the broad suite and fresh video renders were not rerun by the reviewer. The author's matching render proof and baseline comparison remain in the PR description. All twelve required checks have passed at |
What
Batch rendering rejects otherwise valid JSON saved with a UTF-8 BOM or as UTF-16LE with a BOM, including files written by Windows PowerShell. These files now render through the existing JSON decoder.
The complete input and setup are in #6604. On the same one-second composition, run:
node --import ../node_modules/tsx/dist/loader.mjs ../packages/cli/src/cli.ts render \ --batch rows-utf8.json --output 'renders/{index}.mp4' \ --fps 1 --workers 1 --json --quiet --strict-variablesRepeat with
rows-utf16le.json; only that filename changes between the two encoding cases. Within each case the input bytes, composition, arguments, environment and browser are identical before and after.7e92aec5Invalid JSON in --batchInvalid JSON in --batchBoth successful runs produce this projection of stdout (paths and timing fields omitted):
{"type":"batch-complete","total":1,"completed":1,"failed":0,"skipped":0,"variables":{"title":"Café"},"durationMs":1000}FFprobe reports H.264, 320×180, one frame and 1.000000 seconds for each output. I decoded and inspected both frames: they show
Café. An unmarked UTF-8 control also renders successfully.Why
The batch reader decoded every file as UTF-8 and sent a leading BOM directly to
JSON.parse. Other JSON flags already decode these PowerShell file formats.Related work
Fixes #6604.
#5725 handles project configuration; #6580 handles HTML files; #6591 handles undefined injected readers for
--variables-file. This change uses the existing decoder without changing that reader-selection logic.How
Share the existing byte decoder with the batch-file reader. Keep JSON parsing and row validation unchanged. The regression reads real UTF-8 and UTF-16LE files, checks non-ASCII text and the output path, and preserves a U+FEFF inside a value.
Test plan
mintis not installed locally.