Files
raea/docs/rerender.feature
T
shaneandshinyobjectz d80966354c Poteto audit: 4,478 lines, 34 files, 2 crates and 4 dead checks removed; 4 checks made to run (#351)
* A cloud render's check is proved by a test, and the old verb names are refused in one message or not at all

offload.ts's check step is checkRender(), exported and tested in sdk/cloud/test/units.ts against a stand-in raea: an ERROR in the cut fails the render with exit 1, and a check that can't run fails it with its own exit, never passing it unchecked. engine/cli's tests check the argv offload sends passes regroup() and gone() untouched.

regroup() answers `raea make check|seen|look|judge|gates` with one message naming `raea check`, instead of pointing at goal verbs gone() refuses. The part, next and make-plan arms, the controller tombstone and the craft alias of `raea guide` are deleted, with their tests and the docs that promised `raea part` still answers. The conformance test that ran `raea part add` now runs `raea make component add`, and its guide-name scan no longer accepts `raea craft`.

Poteto audit F01.

* The judge, make's gates and raea ask's verbs are deleted, since gone() already refused every way in

apps/judge, apps/make's gates and asked ledger, apps/ask's verbs, sdk/raea's raea/ask module and its drift test, and `scene faults --ask` (which spawned the refused `raea ask`) are deleted, with their Cargo edges, the lock, the layers entry and scene's now-unused image dependency. lod-plan's gate() and held() go with gates.rs, their only caller. why_refused moves into apps/make, its one reader.

In the CLI, gone() runs before the flag check, so `raea judge x` gets gone()'s reason and not a stray-flag error. Judge and ask leave the help, and a new test checks that no `raea X Y` form the help teaches is one gone() refuses. gone() names `--quick` and `--taste` apart.

core/brief's ROUNDS had no reader left and is deleted; the rounds field's doc says nothing reads it and that it stays so old briefs parse. The critic's comments name its one caller, `raea fingerprint read`. The manual and specs stop teaching the removed verbs and packs (seen, stills, critic, record, notes, and the surprise pack that was already gone), and the brief examples use montage instead.

Poteto audit F02.

* The three-stills quick check is deleted: a render checks its own output, and raea check OUT.mp4 checks it again

apps/check's quick.rs and the floor packs' stillsPack (never registered) are deleted; every helper quick.rs used has another caller. The `check EDIT.tsx --quick` help line and flag row are gone, and gone() still refuses --quick with where it went. Comments that cited the quick check's stills are rewritten, Grok Bot's preface tells the agent a render checks its own output, and the sizes test fixture no longer switches off the stills and seen packs, which no longer exist.

Poteto audit F03.

* Every description of raea's hooks says what they do: raea show for media, and raea check as a turn ends

The README, both plugin descriptions, the hook, index, skill, skills, goal and install pages, the CLI help, skill.rs and agent_hooks' module doc said a hook runs the quick check after a save. They now say what hook.rs does: before a shell command, media opened in the Mac's viewer goes to raea show; as a turn ends (Claude Code and Codex), `raea check --at done` holds the brief's goals; nothing is checked after a save, since a render checks its own output. goal.md's moments table says the edit moment is run by the agent or a person, and the raea/check and raea/brief doc comments no longer say a rule runs on every save.

Poteto audit F05.

* The critique guide holds the craft questions, and the floor says what raea check measures instead of repeating it

rubric.md is merged into verbs/critique.md, which now holds the questions in the same `- id (modes):` lines core/ask parses, the generated-music tells and the P0-P3 table. The model-judged pass, its level mapping and the gate's Passing section are dropped. floor.md's Verify list opens with one line naming what `raea check` measures and keeps only what no check holds. Everything that read rubric.md reads critique.md: core/ask, apps/ask's tests, the guide list and its test, and tools/skills.sh's copies.

The montage guide and pack header say who holds emotion and story (the person, in review), and the bevy NOTICE stops crediting the deleted gates and per-kind critic rubrics.

Poteto audit F06.

* The legacy-names gate catches the removed checks, and the manual renders first and checks the export

tools/legacy-names.sh has entries for `raea ask`, `raea judge`, `raea goal seen|judge|gates`, `check --quick`, the quick check, raea/ask and `raea controller`, each pointing at `raea check`. A word boundary is spelled as the characters around it, because a Mac's git grep -E has no \b and every entry with one matched nothing there. The script skips the check and ask specs, the refusals themselves and the cloud image's sdk-overlay.

The manual's quick-check steps now render, then run `raea check OUT.mp4`: first-video, agents (its step 4 is gone and the rest renumbered), rendering, check and findings. The specs that named the quick check, `raea judge` or `raea part` are updated, and the `says` field's doc says nothing checks it and to hold it with a `run` or `file` rule.

Poteto audit F04.

* The farm's volume gate is a module of its own, and its test exercises the real class

The Gate class moved out of farm.py's api() into deploy/modal/farm_gate.py, with the volume and the log as constructor arguments; nothing else in its body changed. farm.py builds farm_gate.Gate(vol), ships farm_gate with its other Python sources and drops the contextlib import only the Gate used. The moved comments say why the gate exists without dates or customer names.

test/farm_gate.py imports the module instead of slicing farm.py's source. Its stand-in volume records how many requests are inside the volume at every reload's start and end (always 0), and each request records whether a reload was running. The first case counts reloads and late entries rather than timing them, and a new case covers a refused reload tried again while requests are held back.

Poteto audit F14.

* The farm planner handles a run's answer, its budget check and its ending in one place each

spread() and hedged() each had a full copy of the code that takes a run's answer: log an exception, bill the run, send a failed or 3D run back for a GPU, keep it in got and log the result. That is now one helper, _landed(), which returns the run's code (1 for an exception), or None when the call goes back for a GPU. spread() keeps its map of calls still out, because a starmap exception doesn't say which call raised it; hedged() appends the call it already holds.

raea_render() and blender() each had their own max_usd check and their own join-or-keep ending; those are now over_budget() and finish(). blender()'s usage string sat after its first statement, so it was never the docstring; it is now.

Poteto audit F15.

* Every raea cloud deploy names the raea release it installs; none falls back to a stale default

image/Dockerfile's RAEA_VERSION has no default and its install step stops with --build-arg RAEA_VERSION when it is missing, as fly/Dockerfile already did. compose.yaml requires the variable, fly.toml drops its build arg (the deploy line passes one), the k8s files tag YOUR-RAEA-VERSION, and wrangler.jsonc passes image_vars so its build hits the same guard. raea_cloud.py stops at deploy time when RAEA_VERSION is unset. farm.py's RAEA_FALLBACK and its local parameter are gone: a deploy that can't read raea's newest release stops and asks for RAEA_VERSION. test/smoke.sh takes the release as its argument (or IMAGE for an image already built) instead of package.json's version.

bench/gpus.py defaulted to 0.1.6 and never passed the version into its containers, so every result file recorded 0.1.6 whatever was installed. A local run now stops without RAEA_VERSION, and the image carries it to the containers.

Poteto audit F09.

* The Sprite box scripts and box.sh move are deleted; box.sh list reads raea cloud's list itself

Every agent box is a Fly Machine now, so deploy/sprites/box.sh and setup.sh are deleted, and so is fly/box.sh's move, which copied a Sprite box onto Fly. box.sh list no longer runs the Sprite script: it reads raea cloud's admin list and prints the same lines, through a staff() helper it shares with register. Comments in the box image, start.sh, login.sh, org.sh, tools/linux-box.sh and the server, and the CL16 and rerender specs, no longer name the deleted scripts or move. org.sh and login.sh stay for the Linux test machine, which is still a Sprite.

The client's onSprite and spriteToken stay: raea-platform still passes spriteToken, so they go only after it stops.

Poteto audit F11.

* Deploying the farm again keeps its token, and box.sh up gives every box the farm's current settings

workspace.sh minted a new farm token on every run, which cut off every box that held the old one. It now keeps the token beside the farm's URL in modal-PROFILE.env (mode 600) and reuses it; a workspace deployed before that takes farm.env's token when farm.env points at this workspace's farm. A new token is made only on the first run or with the new workspace.sh rotate.

box.sh up now requires farm.env on every run and rewrites each box's RAEA_CLOUD_GPU_* settings from it, so a farm made again reaches every box, not only new ones. On an existing Machine it runs fly secrets deploy (one restart) only when those settings changed. box.sh key does nothing when the box already has that key, and writes the key to the local settings file only after Fly has taken it, so a failed import exits 1 and is tried again on the next run.

Poteto audit F10.

* Reading a job's files no longer removes the job; the client drops it once the files have arrived

GET /v1/jobs/ID/out removed the job before its answer was sent, so an answer lost on the way lost the render. It is now a plain read on both the farm and the single server, and a new DELETE /v1/jobs/ID removes a finished job (jobs.drop() and main.ts on the server; on the farm, under the volume gate with a commit, its logs popped after). The farm sweeps jobs whose changed.txt is more than an hour old on each POST /v1/jobs, inside the same gate use and commit, matching jobs.ts's KEEP_MS, so a job nobody drops still goes.

The client's jobFiles asks again on any failure but a final 4xx (408 and 429 are asked again), then sends DELETE and ignores the answer, so an older farm's 404 or 405 is harmless. The retry is one helper, again(), which jobMedia and sendMedia use too: the farm answers 503 to both while its volume is busy, and a job could fail after its render had finished. Sending media twice is safe, since each is a signed PUT that leaves the same object.

units.ts covers the server's read-twice-then-drop (with GNU tar) and the client against a stand-in that cuts its first answer off and answers 503 once to each media call. smoke.ts reads a real job's files twice, drops it, and then gets 404. Deploy the farm before the boxes.

Poteto audit F12.

* A box refuses to hand a render to a GPU worker on another raea version

offload.ts now asks the worker's health before it packs the project or sends any media, and compares the worker's raea with the box's own raea --version through a new otherRaea(). On a mismatch the render fails at once, naming both versions and the two ways out: deploy the farm with the box's RAEA_VERSION, or set RAEA_CLOUD_GPU_ANY_VERSION=1. A worker still reporting 'reading' or 'unknown' is let through. Before, a farm on a full release drew an rc box's compositions with another engine.

An rc box needs the farm deployed on the same rc, or the override, once boxes take an image with this.

Poteto audit F13.

* CI runs sdk/cloud's local tests on every pull request

sdk/cloud/package.json has a test script: units.ts, memguard.ts, unused-media.ts and farm-blobs.ts on node, then farm_plan.py, farm_media.py and farm_gate.py on python3, stopping at the first failure. ci.yml has a cloud job on ubuntu-24.04 (10 minutes): Node 24, the box image's, and ffmpeg from apt, since farm_plan's stand-in GPUs encode with libx264 and aac, then npm ci and npm test in sdk/cloud. The README's Test it section says what npm test covers.

Poteto audit F16.

* Kept buffers and shapes stay under 4 GB: the least recently used go, never one used in the last two hours

buffers/ (a BufferMesh's kept text) and shapes/ (kept solids' meshes) were never pruned, and an animated BufferMesh adds about 10 MB a frame. Each process's first write into either folder now removes its least recently used files while it holds more than 4 GB, stopping at the first file read or written in the last two hours. Every read touches its file, so a buffer a running scene names stays.

A test sets old file times and checks the order, the budget and the two-hour floor.

Poteto audit F51.

* A render's flags are carried by that render, so two renders in one process each keep their own

raea render's flags (--keys, --manifest, --stage, --10bit, --aov, --alpha, --kbps, --quality and the composition's --props/--scale/--hold) went through ten process globals, and what the end checks saw went through another. They are now one RenderArgs, read once in render() and owned by the render's Ctx; the end checks' seen parts are returned with their findings and written by write_manifest. render_bundle keeps its signature for the iPhone and render --bundle, as a wrapper over render_bundle_as. program, program_of and scene_program_checked take alpha. Live play's 3D no longer reads --aov: one live_frame helper in bevy_frame.rs turns it on for a render's game frames.

The same leak, in the same places:
- --clay is set for each render, so one with --clay no longer leaves every later render in the process clay.
- The bundled JS of render, review and world reads is named by process and thread, as the work folder is, so renders on two threads don't write and delete one file.
- The composition's folder is one global (ASSET_DIR), not two kept in sync: ml.rs's own copy is gone, and composition_dir answers in every build, so baked play and builds without ml find /media/ and the physics and contact files.

BEVY_3D_PROBE, LIVE_CLIPS and FED_CLIPPING stay globals.

Poteto audit F48.

* styles.gen is compiled into each bundle's own work folder, never written beside the edit

Every render wrote styles.gen.ts into the edit's folder when it looked older than the code, so renders of one folder side by side (a farm's parts on one volume) truncated the file under each other, and bundles in one process waited on one mutex for the process's one work folder. Each bundle_fresh now has its own work folder (raea-cli-b{pid}-{n}), and styles::module(dir) only reads the edit's folder and returns the module, which is written into the bundle's copy. A project's styles.gen.ts (the template's, pong's and seedling's) is now a declaration for the type-checker. The bundle cache's temp file is named per thread.

release-check proves the compile by the styled render drawing and nothing being written beside the edit. The guides and the P26 stub follow. A new test bundles eight folders on eight threads and finds only each one's own class in its bundle.

The same write-then-move rule, beside it: a baked solid's .obj is written to a .part file and renamed (a second thread could read half of it), and the bake cache's temp file is named per thread.

tools/dupes.max: one group moves from exact to near (292/58, the same 350 groups). The deleted file-time closure was half of an exact pair; the other half now matches by shape only.

The farm probe's vol.commit() in sdk/cloud/deploy/modal/farm.py stays until a farm render of 14 or more parts passes without it.

Poteto audit F49.

* RAEA_FRAME_LOG writes the four columns it measures: frame, react, sync and gpu

The frame log went through a process global and wrote four columns that have always been 0 since the bevy_ui page (draw3d, gpu3d, page, gpupage), with sync computed as the snapshot's time less those zeros. render_fed now keeps the rows in a local Vec and writes frame, react, sync and gpu. The readers follow: bench/rerender's bench.sh and ios/bench.sh read gpu from the fourth column, and sdk/cloud's gpus.py names three value columns. bench.ps1 reads by header name and fog-score.py sums every value column, so both were already right.

Poteto audit F50.

* Every bench script that scores two frames by SSIM sources one comparator, bench/lib/compare.sh

Twenty-six copies of the ffmpeg SSIM pipeline in 23 sh, bash and zsh scripts become calls to one POSIX-sh function, ssim A B [FILTER_A [FILTER_B]]: both sides read as 8-bit RGB with an optional crop each, the six-decimal All value printed, nothing when the frames can't be compared. Eleven local ssim() definitions are deleted. encode/check.sh's metric() keeps only its PSNR half. The header records what the number can and can't see. Left as they were: rr3.sh's per-frame stats from two MP4s, media-vs-ffmpeg.sh's four YUV video-to-video sites (moving them to RGB would move their numbers), and the three Python scorers.

The function gives the same value to six decimals as every old variant on 49 PNG pairs, sourced from sh, bash and zsh. Converted scripts run against their HEAD copies with the same raea give the same verdicts and numbers.

Poteto audit F21.

* P26 fails a frame under SSIM 0.999, between what a run repeats at and a one-frame slip

The bar was 0.98, which passed a frame drawn one frame late (0.986 in stage-guards SG0, 0.9985 on a slow 60 fps film). 0.999 sits above both and below the run-to-run floor (0.99998) and an incremental build's rounding (0.99997). The header says why, notes that a few-pixel fault such as SG0's cut glyph (0.9996) needs a pixel measure rather than a higher bar, names L2 instead of a CI gate that doesn't exist, and says a row that differs for a good reason is taken again with recapture.sh, which writes the reason into its row. capture.sh's header gives the same bar.

Against a stand-in raea serving real frames: frame N+1 scored against frame N's baseline (0.9985-0.9987) passed before and fails now, and still passes with MIN=0.98.

Poteto audit F19.

* bevy-parity times Bevy's example and raea's port with one estimator, the probe's steady median

The Bevy side took the last line at frame f, whose frame_ms was the mean since the line before and so held the load or a screenshot's readback, while the raea side took its own jq median after the first five. Both now read the probe's frame_ms (systems/parity), which records every update's time and reports the median after the App's first five updates. tools/bevy-parity's raea side reads the last line as the Bevy side does, and the report says how the time is measured. docs/bevy-parity.md keeps its old numbers until the next run rewrites it.

steady_median, compiled alone, keeps a load and a readback stall out, moves 4.0 to 6.0 ms when 2 ms is added to every update, and equals jq's median over .[5:]. With stand-in binaries a raea at 6 ms against an example at 4 ms turns the time column to false and the row to no.

Poteto audit F20.

* L2 runs every bench check, not a hand list of five

bench/l2-checks.txt named 5 checks; about 50 others were run by nothing. L2 now runs every tracked bench/**/check.sh and sdk/**/check.sh, plus tools/settle-nudge.sh and tools/frame-pure-3d.sh (60 on this tree), less what bench/l2-skip.txt names with a reason (none yet). Checks that run the plugin build go after that build; when it isn't made they are reported as not run and still count in the total. Each check runs in its own process group with L2_CHECK_SECONDS (default 1800): past it, the group is killed and the check is a miss, and anything a check leaves running is killed when it ends. "bench checks: ok/N" prints after the plugin step.

Four sdk/react checks (ml, speech, timelines, tone) looked for raea in sdk/react/target, which no longer exists; they now take RAEA_BIN, and settle-nudge reads it too, so L2 tests the candidate's raea. speech.md and stage-guards SG17 follow.

The bench block, run alone against stub checks: nested paths selected, a skip line honoured, the plugin check deferred, a hanging check stopped at its budget with its child gone, a passing check's leftover child killed, RAEA_BIN passed through. The next release candidate's L2 is the first full run; budget one round of triage for checks nobody has run since they landed.

Poteto audit F17.

* CI tests every crate that needs no GPU, listed from the lock file instead of by hand

The unit-test step named about 15 crates, so a new crate's tests ran only if someone added it, and runtime/live's stage_guards.rs never ran. The crate list now comes from cargo metadata and cargo tree: every workspace crate that links neither wgpu nor Rolldown (98 on macOS), less raea-sys-mlx (its tests need MLX's Metal device, which hosted runners lack), plus the six wgpu-linked crates whose tests need no GPU, now including raea-runtime-live. raea-bundle keeps its own call for Rolldown's feature unification. jsengine and io-assets leave the feature step, since the main step runs them, and ffmpeg is installed on both OSes for app-double's and app-ask's tests. All of wgpu's side can't join: its test binaries would fill the runner's disk (#90).

Locally the selection gives the same 98 crates as an independent cargo-metadata count, and cargo test on 96 of them passes 521 tests (17 ignored).

Poteto audit F18.

* The README stops claiming renders run faster than they play, and bench/speed measures it

bench/speed/run.sh renders each L2 composition whole to an MP4, one warm-up then RUNS=5 timed runs with the export cache off, and prints two speeds in seconds of video per wall second with their median and range: the frames alone (the render's own frame and encode time) and the whole command, spawn to exit. Measured here: 57 of 58 compositions make their frames faster than they play (median about 4x, 2.2x to 35x), bevy/volume-light at 0.51x, but the whole render is slower than playback for 43 of 58, held back by the 3.2 to 10 s spent outside the frames (bundle, page start, sound, end checks, signing). So the tagline now ends at "rendered on your own GPU". The script is a measurement, not a check: it is named run.sh so L2's check glob leaves it out, and one pass takes over an hour.

Poteto audit F22.

* raea-sys-foliage is removed until a verb, native call or SDK module calls it

systems/foliage (1,904 lines) had no Cargo dependent and no code caller: nothing in raea could grow a plant with it. The crate, its workspace member, its lock entry and its two tools/layers.toml entries go. docs/foliage.feature says how it comes back with FO10's caller (git checkout 02051ee9 -- systems/foliage). Its hash_str was the exact twin of tone's tonegraph hash, which now matches rune's fnv by shape only, so tools/dupes.max moves one group from exact to near (291/59, the same 350 groups).

tools/layers.sh, tools/dupes.sh and tools/size.sh pass; git grep finds no raea_sys_foliage. cargo build --workspace is CI's.

Poteto audit F23.

* Comments say what a crate or file holds, not that it was split out to stay under the size limit

Eleven clauses told the history of a split ("split out to keep this crate small", "split from lib.rs, which is at its 500-line limit", "split out at the crate limit", a dated "Split out of raea-sys-weathering"), which tools/size.sh already enforces and a reader doesn't need. They go from apps/check's Cargo.toml and flash crate, the goal CLI's module doc, runtime/look's cuts.rs, systems/frame's Cargo.toml, systems/atlas, and tools/skills-app.sh and skills-sections.sh. runtime/live's three test headers keep theirs: they say why the tests live there, which F56's move settles.

Poteto audit F38.

* tools/ensure.sh's install lock is freed with its holder, however the holder ends

The lock was a directory removed by an EXIT trap, so an install killed with -9 (or a crash) left it behind and every later install waited 10 minutes and then failed, asking a person to remove it. lock() now takes flock(2) on a file held open by the installing shell: the kernel drops it when that shell ends, however it ends. The wait is a blocking flock with a 10-minute alarm, not a poll. uv's install also clears a half-made uv.part first, as git's did.

With lock() taken from the file: after a holder is killed with -9, the next lock is taken in 0.02 s (HEAD's lock waits until its 10-minute limit); behind a live holder of 2 s, the next waits 2.01 s and then takes it.

Poteto audit F45.

* tools/size.sh leaves a crate's tests/ and benches/ out of its line cap, and bundle's key test goes home

A crate's integration tests and benches aren't built into it, but they counted toward its 2,000-line cap, so tests about one crate were parked in another that had room: runtime/bake held raea-runtime-bundle's cache-key test "tested here: that crate is at its size limit". size.sh now counts a crate's own .rs without its tests/ and benches/ (FILE_MAX still holds for each file), and the test moves to runtime/bundle/tests/bundle_key.rs unchanged. A 450-line file in runtime/react/tests/ fails HEAD's size.sh (2449 lines) and passes this one.

runtime/bake/tests/reads.rs (runtime/react's) and runtime/live's three tests (runtime/scene's) move after the runtime/kinds-into-scene merge, on a fresh count. CI builds the moved test (raea-runtime-bundle is bevy-bound).

Poteto audit F56 (part).

* <BlenderShot> needs a script or a .blend and <GodotShot> a script or a scene, by type

Both props had every field optional, so <BlenderShot /> type-checked and failed only when rendered. BlenderShotProps is now the options plus a union that requires script or file (or both), and GodotShotProps the same for script or scene. The runtime throw stays for untyped callers. sdk/blender/test/shot-props.ts and sdk/godot/test/shot-props.ts hold the type tests: each accepted form passes tsc, and a shot naming neither fails it (with HEAD's props the @ts-expect-error goes unused and tsc fails).

Poteto audit F35.

* raea gen's spending verbs refuse a flag they don't take and a cap that doesn't read

`--max-cents 2.50` didn't parse and silently fell back to the 100-cent cap, and a misspelt `--no-tripo` was ignored, so Tripo stayed allowed: both let a run spend past what was asked. run, plan and image|video|music|sfx|speech|mesh|text now check their flags against one table each (RUN_FLAGS, MAKE_FLAGS) before reading a flow, refusing an unknown flag or a flag missing its value, and --max-cents must be whole cents. Every flag the usage names for these verbs, and every one the repo's docs and guides pass, is in the tables.

cargo test -p raea-io-gen: 30 pass, including tests_flags (a dollar cap refused, three misspellings refused, every listed flag taken). HEAD's cli.rs fails two of the three.

Poteto audit F32.

* raea gen's flag tests run as an integration test, so the crate stays under its line cap

tests_flags.rs only calls the public cli::command, so it moves to io/gen/tests/flags.rs, which tools/size.sh doesn't count. With it in src/ raea-io-gen was 2019 lines, over the 2000 cap.

Poteto audit F32, F56.

* The legacy-names gate leaves raea-skills' upstream snapshot alone

upstream/raea/ is what a released raea printed, written by just sync-raea and never by hand, so the names a later raea removes stay in it until the next sync. The gate failed on it once it learned the removed checks.

Poteto audit F04.

* The platforms' text zones are written out in the placement guide, held there to the check's numbers

F06 cut the zone numbers from floor.md, since raea check measures them, which broke apps/check's test that held floor.md to zones(). The numbers now live in motion/placement.md, the guide that places text, and the test holds that file to every zone (9:16 unknown, TikTok, Reels, Shorts, 4:5, 1:1, 16:9). floor.md points at it, and zones() and sdk/video's table name it as their prose.

Poteto audit F06.

* CI's crate tests run to the end, so one run names every crate that fails

Without --no-fail-fast the run stopped at the first failing test binary, so a second failure only showed in the next run.

Poteto audit F18.

* Review fixes: clay held per render, the shape prune takes only its own files, every styles.gen import spelling

- --clay: a count of running clay renders (ClayRender) instead of a flag
  each render resets, so a colour render starting beside a clay one no
  longer turns it colour, and nothing stays clay after.
- The shape cache's prune takes only names it writes (.tris, 32-hex
  .json, their .part), never other files in a RAEA_SHAPE_CACHE folder.
- styles.gen is found however its import is spelt (either quote, .ts or
  .js), so no bundle goes without its CSS.
- The farm's sweep renames finished jobs aside under the volume gate and
  removes them after, so a download isn't held past Modal's 150 s.
- RAEA_CLOUD_GPU_FALLBACK=cpu renders here on a raea version mismatch too.
- GUIDE_NOTE no longer names the removed part verb; farm.py's probe
  commit comment says why it stays (rc4 still writes styles.gen.ts).

* skills: raea-skills main (#162: the poteto audit's skills changes)

* tools/rask: a crate's size leaves out its tests/ and benches/ (rask #1)

---------

Co-authored-by: shinyobjectz <[email protected]>
2026-12-05 18:09:35 -08:00

315 lines
31 KiB
Gherkin

@spec
Feature: Re-render, don't stitch: one render changes anything per frame, redraws only what changed, and encodes on every platform's hardware
Shane, 11-10: "when using the raea engine the agent always ends up using ffmpeg and stitching clips together again. so
how do we actually make it so we optimize so fast it can rerender clips easily and not worry about using ffmpeg. or
maybe investigate why that would be the case beyond my assumptions. also i dont specifically want iphone we have lots
of mac and windows users so we have to plan for something that can use all of those". Then: keep wgpu, and make this
the complete overhaul for v0.1.1.
The research is docs/rerender.md (why agents stitch) and docs/gpu.md (the GPU layer on Mac, Windows and Linux). In
short: a raea render holds its first frame's look and camera for its whole length, and can't redraw part of a video,
so agents split films into chunk renders and join them with ffmpeg (the launch film: 80 chunks, 31-33 min a pass).
Speed matters second. This feature fixes the causes first, then the speed, on macOS, Windows and Linux alike.
Bars for every scenario: the same frames as before wherever nothing was meant to change (SSIM 1.000000 on decoded
frames, or the exact bound a scenario names); every number measured on this Mac (M5 Pro) and on the Windows PC
(cuda-box, RTX 4070), and on Linux where a scenario says so; a gate that can't be met goes to Shane with its
measurements, never loosened in place. GPU-heavy runs check `antsy board` first and run one at a time.
Rule: Measure first
@done
Scenario: RR0. A heavy multi-shot film to measure, and today's numbers on Mac and Windows
# Status 11-10: measured. The film is made from code (shots.tsx; content/rome's sets are gone) and its frames cost
# 10-45 ms on the Mac, so start-ups and joins weigh more than drawing does.
# Mac (M5 Pro, the 08:52 raea build): six chunks 3 at a time joined with ffmpeg -c copy, 16.3 s on a quiet machine
# and 25.0, 25.5, 26.9 s with 5-6 other jobs running; one render 31.4 s quiet, 30.9-38.5 s loaded. Each chunk's
# first frame comes 1.7-1.8 s after its spawn (about 0.6 s of it the restart when a render meets its first 3D
# frame; frame 0's sync 0.35-1.05 s, the pipelines being made), so the six chunks spend 10.5-16.2 s starting. A
# steady frame: React 1.0-1.7 ms, sync 6-15 ms, GPU wait 0-43 ms, readback and encode (VideoToolbox) under 1 ms.
# The note by hand (change.sh): shot 4 again 3.4-6.0 s and the join 0.15-0.23 s, against the whole film again
# 29.4-43.5 s.
# Windows (cuda-box, RTX 4070, v0.1.1-rc2, bench.ps1): no ffmpeg there, so the join is raea media concat, which
# re-encodes. Chunked 71.0 s: renders 23.6 s and the join 47.3 s. One render 39.0 s; its first frame 6.8 s, as it
# bakes all 900 frames' rows first (a chunk's 2.2-2.5 s; the first run on the machine 6.5-8.3 s). A steady frame:
# React 12 ms (10x the Mac's: QuickJS there, JavaScriptCore here), sync 12-24 ms, GPU wait 2-24 ms; openh264 isn't
# the bottleneck. The note by hand: 13.3 s and a 51.4 s join, 64.7 s, more than the whole film again (38.4 s).
# One render holding six looks, estimated from the chunks' frame costs without their start-ups: 27.7 s on the
# quiet Mac and 45.8 s on Windows (both over-counted: three chunks shared the GPU).
# The two biggest costs: on the Mac the start-ups (six cold processes) and GPU wait; on Windows the re-encoding
# join (47-51 s) and a frame's CPU side (React on QuickJS and sync, 24-36 ms). RR11-RR13 read their gates
# against these.
# The iPhone row (not a gate; ios/bench.sh on an iPhone 13 Pro Max, A15, iOS 27.0.1, jitless JavaScriptCore):
# shots 3-5 at 134, 61 and 265 ms a frame (GPU wait 64, 22 and 184 ms; React 4-13 ms), first frame 2.5-3.2 s
# after the launch and 5.0 s on a fresh install, peak footprint 2.4-2.8 GB. Shots 1 and 6 and the film can't be
# drawn there: Bevy 0.20's atmosphere samples its Rgba32Float medium LUTs with a filtering sampler, which the A15
# can't filter (RR9's, in vendor/ and upstream). raea said APPLIED on those videos without their 3D (handed to
# DR3's lane). Shot 2 is killed by iOS (SIGKILL, no report) at its first 3D frame, with the increased-memory
# entitlement as well.
# Noise: the same binary ran 16-27 s chunked across four runs as the machine's load changed, so later gates run
# the old and new binaries interleaved in one sitting.
Given the plan
| crate | file | lines | job |
| - | bench/rerender/shots.tsx | 220 | six 5 s shots on one set made from code (no media files, so it renders alike on every OS; content/rome's sets are gone), 900 frames at 1920x1080, a different look on each (grade, fog, bloom, depth of field, tonemapping, SSAO, volumetric fog, sky) and two cameras |
| - | bench/rerender/film.tsx | 40 | the film as one composition, and each shot as its own composition, as agents render today |
| - | bench/rerender/bench.sh | 160 | renders it with RAEA_FRAME_LOG and RAEA_TIMES and writes run.json: wall time, and per frame the split into start-up, React/JS, Bevy CPU, wgpu submit, GPU by pass, readback and encode |
| - | bench/rerender/change.sh | 80 | the "one note" case: changes shot 4's grade and lights, then times what it takes to get the whole film again |
| - | bench/rerender/bench.ps1 | 160 | bench.sh and change.sh for Windows, in its own PowerShell 5.1 (no bash, jq or ffmpeg there) |
| raea-rerender-ios | bench/rerender/ios/src/lib.rs | 80 | the iPhone row, not a gate: one composition bundle rendered in a cold process, its start-up marks timed from the kernel's process start |
| - | bench/rerender/ios/bench.sh | 140 | bench.sh's runs on the iPhone through a small app (ios/app), one launch a render, plus the first launch after a fresh install |
Then bench.sh runs on the Mac and on the Windows PC, and this scenario records both splits
And it records today's two ways to get the film: six chunk renders joined with ffmpeg (what agents do), and
what one render would cost if it could hold six looks (the chunks' frame costs without their start-ups)
And it records change.sh today: the changed chunk re-rendered and re-joined by hand
And the two biggest costs in each split are named; RR11, RR12 and RR13's gates are read against them
Rule: One render can change anything, every frame
@done
Scenario: RR1. Every look changes per frame
# Status 11-10: done. A frame's post-processing is its own (post.rs frame_post: the sky, bloom, fog, grade,
# vignette, AO, anti-aliasing, tonemapping, exposure, volumetric fog and depth of field's kind), and sets that
# change go in a per-frame table (frame_sets, frame_set_i); each light's colour, shadows and shafts too
# (light_sets). The camera takes a group off and puts it on again when its columns change (raea-sys-post, 12
# groups). A draw across a cut (a set bringing or taking a sky, AO, anti-aliasing, a tonemapper, shadows or
# volumetric fog: tables.rs Cuts) warms up 8 updates at its frame, as a load does, in frames() and in the page
# path's draw: the sky's light (Bevy's generated environment map) takes three, and RR0's sunset opened 2 frames
# dark without them. A ramp (a value moving within one set) is no cut. Play builds its rows the same way (live.rs:
# tables, the page background keyed), and a seek back that makes a new engine sets play's rows on it again.
# Measured on this Mac with bench/rerender/rr1.sh (the 13:00 build):
# the film as one composition against its six shot renders: 900/900 frames identical (it held shot 1's look)
# ramp.tsx's 60-frame grade, bloom and fog ramp against 60 stills each rendered alone: 60/60 SSIM 1.000000,
# its first and last frames 0.645 apart
# raea play seeking to the first and middle frame of each shot: the 3D and its looks as the render draws them
# 12/12 (before: play held shot 1's sky, missed the page background on shots 3-5, opened without the sky's
# light and never put depth of field on, SSIM 0.43-0.93); a seek back (0, 400, 350, 0) equal to the forward
# seeks 2/2 (it drew the first frame's look: a plugin's clock makes a new engine from the load)
# not exact: the HTML caption over the 3D (text with a 12 px blurred shadow) differs between play and render by
# at most 2 levels at its edges, SSIM 0.999473-0.999999, as it did before RR1: the page's composite over the
# 3D, not a look, handed to the issues lane
# Cost, interleaved with the pre-RR1 binary under load 6-12: the film as one MP4 with its six looks in 20.4, 26.4,
# 34.4 and 26.3 s; the old binary's one render (shot 1's look for all 900 frames) 30.1, 34.6, 31.8 and 34.7 s.
# The five cuts cost 1.3-1.7 s together (0.4 s before RR1, the new shots' first frames), most of it their warm-up
# updates. variants.rs isn't built: preparing every look's pipelines before frame 0 would move their compiles onto
# the first frame, which RR10 makes 5x faster; RR10's cache takes compiles off every first use instead.
Given the plan
| crate | file | lines | job |
| raea-runtime-look | runtime/look/src/post.rs | 370 | each frame's post-processing from its own parts (atmosphere, bloom, fog, every Grade field and the vignette, SSAO, anti-aliasing, shadows, volumetric fog, tonemapping and exposure, depth of field's kind); sets that change go in a per-frame table (frame_sets, and frame_set_i keyed), as depth of field's aperture and aberration are already keyed; each light's colour, shadows and shafts as its own table (light_sets) |
| raea-sys-frame | systems/frame/src/tables.rs | 225 | the frame_looks table generalised: each frame's set laid onto its row (FrameRows::vals), for a frame look and for the post-processing; where a render's frames cut (Cuts: a set that brings or takes a mode) |
| raea-sys-post | systems/post/src/camera.rs | 233 | the post-processing on the camera by group, moved out of raea-runtime-scene3d (camera.rs), which is at its 2,000-line limit; a frame whose row changes a group takes it off and puts it on again, and MSAA goes off with AO or SMAA/FXAA and back on without them |
| raea-sys-post | systems/post/src/camera/on.rs | 199 | each group put on and taken off (scene3d's code, moved) |
| raea-sys-fog-half | systems/fog-half/src/camera.rs | 91 | volumetric fog's group (VFOG), there because it puts on that crate's HalfFog and a system can't use another sideways: raea-runtime-scene3d hands it to raea-sys-post's apply and sync beside its own |
| raea-runtime-scene| runtime/scene/src/live.rs | 405 | play's rows as a render's: each frame's post-processing and light sets as tables, the page background keyed (bg_r..bg_a) |
| raea-render | engine/render/src/engine.rs | 474 | a draw across a cut warms up as a load does (Engine::draw and output.rs frames); a seek back that makes a new engine sets play's rows on it again |
| raea-runtime-gpuframe | runtime/gpuframe/src/downsample.rs | 52 | a supersampled readback shrunk (RAEA_SS), moved out of raea-render to keep it under 2,000 lines |
| - | bench/rerender/rr1.sh | 106 | the three checks below (equal, ramp, play), each writing its JSON, the frames deleted as they're compared |
| - | bench/rerender/ramp.tsx | 37 | the 60-frame ramp: grade, bloom, fog colour and vignette moving every frame |
Then runtime/look/src/camera.rs stops reading these "as the first frame that has each asks"
And a value (a grade's saturation, bloom's strength, fog's colour, the focus distance) is keyframed like any prop
And RR0's film rendered as one composition equals its six chunk renders frame for frame (SSIM 1.000000)
And a grade ramp over 60 frames equals 60 stills each rendered alone with that frame's grade
And a play of the film (raea play) shows the same look changes as its render (render = play)
@done
Scenario: RR2. The camera changes per frame
# Status 11-10: done. `<Camera3d is_active>` (Bevy's Camera field) says which camera draws: each frame's first
# active camera in the tree is the piece's, the others are dropped from that frame (their depth of field and
# ambient with them), and the camera row's `shot` column steps where another camera takes over (active.rs). A
# frame where it steps is a cut (Shots), drawn as a shot rendered alone draws its first frame: motion blur's
# step before it draws the frame itself, not the other camera's frame, and Solari's and the path tracer's
# history start again (`reset`). Play sends the shot on its live camera row, 0 again when the first camera is
# back, and its engine takes a changed shot as a cut (Moved). A teleport of one camera is no cut: it smears.
# Found on the way, and fixed for cuts only: the step to f - 1 that motion blur needs never runs on any engine,
# because the Engine's reads (react_share) count as a Bevy plugin. Renders are right anyway (export draws f - 1
# before every f for those reads); play blurs from the frame drawn last. Handed to the issues lane.
# RR0's film has no shot with two cameras, so bench/rerender/cams.tsx is the piece: camera A wide and dollying
# (frames 0-39), B low and close at f/1.4 (40-89), A again (90-119), parts moving, motion blur on. Each shot is
# also its own composition, as an agent's chunk is. Measured on this Mac with bench/rerender/rr2.sh:
# without motion blur, the piece against its three shot compositions: 120/120 frames identical (each cut
# frame is SSIM 0.707 and 0.688 from the frame before it: the cut is there)
# with motion blur, against the same compositions: the frames before the first cut and both cut frames
# identical; the other 78 differ by the blur's grain alone, SSIM >= 0.999439, because the grain is seeded by
# the frame number and a composition counts from 0 (raea-sys-post pin_frame_count). The control, one camera
# moved to B's place and back: its cut frames 0.810 and 0.785 against the shots' first frames
# with motion blur, each shot of the piece rendered alone (--at its frames): 120/120 identical, as RR3's
# re-rendered segments need
# raea play seeking onto a cut, across each cut frame by frame and back: 7/7 held seeks identical to the
# render. The seeks that jump (40 to 38, 41 to 88, 91 back to 90) are said, not held: with motion blur a jump
# differs from the render in play, cut or not, since before RR2
# Cost: the piece in 2.3-2.9 s, its three shots as compositions in 4.9-6.0 s together.
# Not covered: the three.js hosts (sdk/r3f, playables) still take the first camera node; a live game's cuts
# take the same path as play's but weren't run.
Given the plan
| crate | file | lines | job |
| raea-runtime-look | runtime/look/src/active.rs | 82 | which camera draws, per frame: the first active one (`<Camera3d is_active>`), the others dropped; its shot keyed where it steps |
| raea-sys-frame | systems/frame/src/shots.rs | 41 | the frames a shot starts at (Shots), and a live camera row's shot changed (Moved) |
| raea-render | engine/render/src/engine.rs | 490 | a cut drawn as a shot's first frame: the step before it draws the frame itself, with a plugin too; Solari reset (raytrace cut) |
| raea-runtime-scene | runtime/scene/src/live.rs | 432 | play's camera row says its shot, and 0 when the first camera is back |
| - | sdk/render/src/bevy3d/core.tsx | 332 | `is_active` on `<Camera3d>`; an inactive camera isn't the one the pointer picks through |
| - | bench/rerender/cams.tsx | 82 | two cameras cut A, B, A with parts moving, each shot its own composition too, and a one-camera control |
| - | bench/rerender/rr2.sh | 141 | the four checks above (still, blur, range, play), each writing its JSON, frames deleted as they're compared |
Then a film can cut between several cameras inside one render
And RR0's two-camera shot rendered once equals the same shot rendered as one render per camera, frame for frame
Rule: Redraw only what changed
Scenario: RR3. A video is made of shot segments, assembled without re-encoding
Given the plan
| crate | file | lines | job |
| raea-runtime-segments | runtime/segments/src/lib.rs | 120 | the crate: a render as segments (raea-runtime-export is at its limit) |
| raea-runtime-segments | runtime/segments/src/split.rs | 160 | where a video splits: at every cut the timeline knows (a Sequence's start, a camera change), never inside a shot, merging shots under a minimum length |
| raea-runtime-segments | runtime/segments/src/encode.rs | 180 | each segment encoded as its own run starting on a keyframe, on every backend (VideoToolbox, openh264, rav1e, RR8's) |
| raea-runtime-segments | runtime/segments/src/join.rs | 200 | segments muxed into one MP4 by stream copy (io/codec's remux, muxide), the sound laid under once from the render's own mix |
| raea-runtime-segments | runtime/segments/src/warm.rs | 120 | a segment's warm-up: the frames before it that temporal effects need (TAA, motion blur, MetalFX), drawn and not kept |
Then `raea render` makes every video this way
And a segmented render's decoded frames match a single-run render at the same --quality: SSIM >= 0.999 on every
frame, and VMAF >= 99 over the film
And joining a two-minute 1080p film's segments takes under 1 s
@needs:RR3
Scenario: RR4. Segments are cached by what made them
Given the plan
| crate | file | lines | job |
| raea-runtime-segments | runtime/segments/src/key.rs | 220 | a segment's key: its frames' baked rows (the state at its first frame included, so physics and particles count), the assets they read, the render's settings, raea's version |
| raea-runtime-segments | runtime/segments/src/store.rs | 160 | segments on disk by key, beside the whole-video export cache (runtime/bundle/src/cache.rs), with a size cap and the oldest dropped first |
Then a render reuses every segment whose key is unchanged and prints "N of M shots redrawn"
And after change.sh's note, getting the whole film again costs shot 4's frames plus under 1 s
And the film it gives equals a fresh full render with the cache off (SSIM 1.000000 on reused segments, RR3's
bound on redrawn ones)
And a change to a shared asset (a texture both shots use) redraws exactly the shots that use it
@needs:RR3
Scenario: RR5. Ranges and parallel workers inside one render
Given the plan
| crate | file | lines | job |
| raea-runtime-segments | runtime/segments/src/workers.rs| 240 | segments drawn by several workers at once, sized from the GPU's memory and the machine's free memory, never past antsy's floor; one worker on a GPU too small for two |
Then `raea render EDIT.tsx --frames A-B -o OUT.mp4` renders that range as a video
And a long render splits itself across workers and joins them with RR3; `--workers N` overrides the count
And the default worker count is the one measured fastest for RR0's film on each machine, recorded here
And no agent needs `xargs -P` or a chunk composition to render a film in parallel
Rule: Assemble and look at renders without ffmpeg
@needs:RR3
Scenario: RR6. The media verbs agents reach ffmpeg for
Given the plan
| crate | file | lines | job |
| raea-app-assemble | apps/assemble/src/lib.rs | 80 | the crate (raea-app-media is at 1,776 lines), reached through `raea media` |
| raea-app-assemble | apps/assemble/src/concat.rs | 180 | `raea media concat` by stream copy when the inputs match (codec, size, rate), re-encoding only when they don't and saying so |
| raea-app-assemble | apps/assemble/src/compare.rs | 200 | `raea media compare A B [C ...] -o OUT` side by side or in a grid, labelled, as a still, a sheet or a video: the commonest ffmpeg use in agents' sessions (2,627 commands) |
| raea-app-assemble | apps/assemble/src/frames.rs | 160 | `raea media encode DIR -o OUT.mp4|OUT.mov --fps N`: a PNG folder to H.264, HEVC or AV1 on every platform, ProRes 4444 with alpha on the Mac |
Then concat of RR3's segments, or of any matching MP4s, takes under 1 s for two minutes of 1080p
And every flag is in `raea help`, and docs/manual's CLI reference is regenerated
@needs:RR1,RR2,RR4,RR5,RR6
Scenario: RR7. The skill and the manual teach re-rendering
Then the raea skill's "one camera, one set of effects" rule (3d.md rule 6, 3d/limits.md, 3d/post.md) says looks
and cameras change per frame
And it says how to change one shot of a film: edit it and render again, with the redraw count to check
And its ffmpeg share line (SKILL.md) is a raea command, and it says raea's own renders never need ffmpeg
And the change goes through raea-skills' own process (its SOP, `just ci`), and docs/manual's rendering concept
page says the same
Rule: Every platform encodes on its own hardware
Scenario: RR8a. Windows: Media Foundation's hardware encoders
Given the plan
| crate | file | lines | job |
| raea-io-windows | io/windows/src/lib.rs | 120 | the backend behind raea-io-codec's Backend trait, picked first on Windows |
| raea-io-windows | io/windows/src/encode.rs | 320 | H.264 and HEVC through Media Foundation's hardware encoder (NVIDIA, AMD and Intel behind one API), rate control as `--quality` asks, keyframes where RR3 asks |
| raea-io-windows | io/windows/src/texture.rs | 220 | frames handed over as GPU textures through the DXGI device manager (wgpu's DX12 device by as_hal), no CPU copy where the driver allows; a copy where it doesn't, said once |
| raea-io-windows | io/windows/src/decode.rs | 200 | hardware decode for footage, through the same API |
Then on the Windows PC, RR0's film is not encoder-bound: encode is under 20% of its frame time
And its export scores VMAF >= 95 against the Mac's at `--quality high`, and its colours meet docs/lightspeed
Q3's floors
And a machine without a hardware encoder falls back to openh264 and says so once
Scenario: RR8b. Linux: VAAPI and NVENC
Given the plan
| crate | file | lines | job |
| raea-io-linux | io/linux/src/lib.rs | 100 | the backend, picked first on Linux when a device answers |
| raea-io-linux | io/linux/src/vaapi.rs | 300 | H.264 and HEVC through VAAPI (Intel and AMD) |
| raea-io-linux | io/linux/src/nvenc.rs | 300 | H.264 and HEVC through NVENC (NVIDIA, as on Modal), its headers' licence checked first (docs: permissive-licences) |
Then RR0's film renders on a Linux NVIDIA machine (a Modal GPU) not encoder-bound, with the
same VMAF bound as RR8a
And without a device it falls back to openh264 and says so once
Rule: The GPU layer: keep wgpu, go native underneath where it pays (docs/gpu.md)
Scenario: RR9. The wgpu fixes raea needs, ours, sent upstream
Given the plan
| crate | file | lines | job |
| - | vendor/wgpu-hal/PROVENANCE.md | 60 | each local change, the test that holds it, and when it goes (upstream merged) |
| - | vendor/wgpu/PROVENANCE.md | 30 | likewise |
Then the Metal backend checks every command buffer's status, and a failed one reaches raea as a device loss
from `poll` with its label, instead of a silent fault; tested by injection, never by provoking the GPU
And MSL compiles with safe math where raea asks (naga's output and passthrough alike), so a frame doesn't depend
on how its variant was compiled
And each change is written by us (Vork's are under its preview licence and aren't copied), opened as a PR on
gfx-rs/wgpu with a hand-written description, and carried in vendor/ until it merges
And one-version, dupes and the size gates pass with the vendored crates
@needs:RR9
Scenario: RR10. No cold pipeline compiles, on any platform
Given the plan
| crate | file | lines | job |
| raea-gpu-device | gpu/device/src/pipelines.rs | 220 | one pipeline cache across launches: Metal as an MTLBinaryArchive through wgpu's PipelineCache (RR9's vendored change), Vulkan through wgpu's own, DX12 measured first (the driver's may be enough); keyed by adapter, driver and raea's version |
Then Bevy's pipelines, Vello's and K's are made with it (a vendored bevy_render change if Bevy has no hook)
And a cold first frame of RR0's film, and of an exported game's first play, is at least 5x faster on the Mac
and on the Windows PC, measured with the OS's own shader cache cleared
And RR5's workers share it, so N workers don't compile N times
And RR1's cuts are timed again with it: the film's five cost 1.3-1.7 s together on 11-10, against 0.4 s with
one look (RR1 left preparing every look's pipelines before frame 0 to this cache, so the first frame isn't
made to pay for all of them)
@needs:RR0
Scenario: RR11. A draft tier, rendered small and upscaled
Given the plan
| crate | file | lines | job |
| raea-sys-upscale | systems/upscale/src/lib.rs | 100 | `--quality draft` (and the app's live preview, when asked): render at a lower scale, upscale with the platform's best |
| raea-sys-upscale | systems/upscale/src/metalfx.rs| 220 | MetalFX's temporal scaler on the Mac, on the shared device as raytrace/metalfx.rs runs its denoiser |
| raea-sys-upscale | systems/upscale/src/dlss.rs | 120 | DLSS on NVIDIA through Bevy's `dlss` feature, only after NVIDIA's SDK terms are checked (docs/render-thirdparty.md) |
| raea-sys-upscale | systems/upscale/src/resample.rs| 140 | the portable fallback: a WGSL upscale every GPU runs |
Then a draft of RR0's film renders at least 3x faster than `--quality high` on the Mac and on the Windows PC
And raea check and the render's findings flag the same problems on the draft as on the full render
And delivery quality stays the default; a draft says it's a draft in its manifest
@needs:RR0,RR9
Scenario: RR12. Our own kernels, written once for every platform
Given the plan
| crate | file | lines | job |
| raea-gpu-kernels | gpu/kernels/src/lib.rs | 160 | a kernel loaded as wgpu passthrough on the shared device: MSL on Metal, DXIL on DX12, SPIR-V on Vulkan, from the files below |
| raea-gpu-kernels | gpu/kernels/src/check.rs | 140 | each kernel against its reference (WGSL, or K's interpreter): exact where K demands it, a stated bound elsewhere |
| - | gpu/kernels/slang/README.md | 40 | the sources are Slang; the compiled files are committed and a test fails when a source changed without them |
| - | tools/kernels.sh | 80 | slangc to MSL, SPIR-V and DXIL for each kernel (Slang's licence checked first) |
Then the first kernel is the most expensive raea-owned pass in RR0's split (traced AO, the paint look, the composite or what the split names)
And it beats its WGSL reference by at least 1.5x on the Mac and on the Windows PC, or it's deleted and this
scenario says why
And K kernels stay WGSL: they already run everywhere
Rule: Proof, on the machines our users have
@needs:RR1,RR2,RR4,RR5,RR8a,RR10,RR11,RR12
Scenario: RR13. The film, end to end, against RR0
Then on the Mac and on the Windows PC, RR0's film renders as one composition with `raea render` alone
And getting the film again after change.sh's note costs shot 4's frames plus under 1 s
And a full render's wall time is at most half of RR0's chunked baseline on each machine
And each of the two biggest costs RR0 named is at least halved, or this scenario carries the measurement that
shows why it can't be, for Shane
And docs/lightspeed.feature's scoreboard gains the rows: one-shot re-render, full film, draft, cold first frame
@needs:RR7,RR13
Scenario: RR14. Agents stop stitching
Then the feed's agent (Kimi) and a Claude Code session with the raea skill each get the same brief three times:
a six-shot film with three looks and two cameras, then one note that changes one shot
And across all six runs no tool call runs ffmpeg or ffprobe on raea's own renders, no chunk composition is made,
and each note's render says "1 of 6 shots redrawn"
And spend is logged with antsy against the feed eval budget
@needs:RR8b,RR14
Scenario: RR15. It ships in v0.1.1
Then every RR scenario is @done on origin/main, L1 green
And a v0.1.1 rc's release run passes on macOS, Windows and Linux, RL3 included on the Windows PC
And the v0.1.1 launch thread (releases/0.1.1) has a post showing a one-shot change re-rendered in seconds
And the readiness list goes to Shane, who alone gives the release its go