From 22cac9cf13b961df3a7dbf24d824175afb7e78b3 Mon Sep 17 00:00:00 2001 From: James Dimachkie Date: Tue, 10 Nov 2026 12:37:09 -0800 Subject: [PATCH 1/2] Stills of a 2D composition render into a folder that doesn't exist yet, as before DR2 Since bb0a1768 every render writes its manifest beside its output, DIR/NAME.render.json for a folder of frames. A 2D composition's stills write the manifest before raea-render makes the folder and its frames, so with a DIR that didn't exist the render stopped before drawing anything: raea render edit.tsx --at 0 -o new-folder REFUSED new-folder/edit.render.json: The system cannot find the path specified. (os error 3) It worked into a folder that was already there, and for a composition with 3D, whose path makes the folder first. write_manifest now makes the manifest's folder before it writes. bench/at-0/check.sh and bench/svg-css-transform/check.sh render stills into a fresh temporary folder: both fail on main with the message above, and both pass with this (Windows 11). Co-Authored-By: Claude --- runtime/export/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/export/src/lib.rs b/runtime/export/src/lib.rs index a961bcddd..e7fdd4ced 100644 --- a/runtime/export/src/lib.rs +++ b/runtime/export/src/lib.rs @@ -67,11 +67,11 @@ pub(crate) struct Sound { /// `render --manifest PATH` (the CLI's; render_bundle keeps its signature for the iPhone): where render.json goes. static MANIFEST: std::sync::Mutex> = std::sync::Mutex::new(None); -/// With --manifest, its file: the frames' boxes as drawn (Ctx.manifest), its findings (DR3) and the sounds heard. +/// The manifest, its folder made first (2D stills write it before their frames): boxes as drawn, findings, sounds. fn write_manifest(cx: &mut Ctx, (w, h, fps): (u32, u32, f64), found: Vec, heard: impl FnOnce(&Ctx) -> Value) -> R<()> { let (Some(path), Some(frames)) = (MANIFEST.lock().unwrap().clone(), cx.manifest.take()) else { return Ok(()) }; - let m = json!({"width": w, "height": h, "fps": fps, "frames": frames, "findings": raea_core_facts::finding::ranked(found), "sounds": heard(cx), "not_applied": not_applied::seen(), "layers": raea_sys_layers::finish(fps)}); - std::fs::write(&path, m.to_string()).map_err(|e| format!("{}: {e}", path.display())) + let m = json!({"width": w, "height": h, "fps": fps, "frames": frames, "findings": raea_core_facts::finding::ranked(found), "sounds": heard(cx), "not_applied": not_applied::seen(), "layers": raea_sys_layers::finish(fps)}).to_string(); + path.parent().map_or(Ok(()), std::fs::create_dir_all).and_then(|()| std::fs::write(&path, m)).map_err(|e| format!("{}: {e}", path.display())) } /// `render --stage WxH`: a responsive composition (one that lays out from useVideoConfig) laid out at a stage's size, as From b6675ced2675f48211244b348cc291f3a881551b Mon Sep 17 00:00:00 2001 From: James Dimachkie Date: Tue, 10 Nov 2026 14:06:22 -0800 Subject: [PATCH 2/2] The manifest's folder is made in a statement of its own The first form chained the write after the folder with `.and_then(|()| std::fs::write(&path, m))`, which tools/dupes.sh reads as a copy of apps/check's hook.rs:105 (57 near-duplicate groups against the 56 allowed). The folder is now made first, in its own statement, and the write is as it was. The crate is still at its 2,000 lines: the manifest's JSON is written where it is built. Co-Authored-By: Claude --- runtime/export/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/export/src/lib.rs b/runtime/export/src/lib.rs index e7fdd4ced..b7f0954eb 100644 --- a/runtime/export/src/lib.rs +++ b/runtime/export/src/lib.rs @@ -70,8 +70,8 @@ static MANIFEST: std::sync::Mutex> = std::sync::Mutex::new(None) /// The manifest, its folder made first (2D stills write it before their frames): boxes as drawn, findings, sounds. fn write_manifest(cx: &mut Ctx, (w, h, fps): (u32, u32, f64), found: Vec, heard: impl FnOnce(&Ctx) -> Value) -> R<()> { let (Some(path), Some(frames)) = (MANIFEST.lock().unwrap().clone(), cx.manifest.take()) else { return Ok(()) }; - let m = json!({"width": w, "height": h, "fps": fps, "frames": frames, "findings": raea_core_facts::finding::ranked(found), "sounds": heard(cx), "not_applied": not_applied::seen(), "layers": raea_sys_layers::finish(fps)}).to_string(); - path.parent().map_or(Ok(()), std::fs::create_dir_all).and_then(|()| std::fs::write(&path, m)).map_err(|e| format!("{}: {e}", path.display())) + path.parent().map_or(Ok(()), std::fs::create_dir_all).map_err(|e| format!("{}: {e}", path.display()))?; + std::fs::write(&path, json!({"width": w, "height": h, "fps": fps, "frames": frames, "findings": raea_core_facts::finding::ranked(found), "sounds": heard(cx), "not_applied": not_applied::seen(), "layers": raea_sys_layers::finish(fps)}).to_string()).map_err(|e| format!("{}: {e}", path.display())) } /// `render --stage WxH`: a responsive composition (one that lays out from useVideoConfig) laid out at a stage's size, as