mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 06:53:19 -10:00
Dropped CSS: stylo drops what it can't parse silently unless a ParseErrorReporter is passed, and blitz-dom passed none, so a render printed APPLIED over a picture missing some of its code. vendor/blitz-dom/src/not_applied.rs is that reporter, passed at every author parse (stylesheets and @imports in net.rs, <style> in document.rs, style attributes in node/element.rs, CSSOM in cssom.rs; never the user-agent sheet). It keeps each drop once per property and selector, never its value ("-webkit-text-stroke in .outline", "... in a style attribute"), since a style attribute is parsed again on every frame it changes. FileNet's loads that fail join the list ("the file ... (it didn't load)"). The render prints it once after APPLIED (engine/cli for TSX, apps/media for HTML) as "NOTE the page didn't apply N things, and is drawn without them:", one per line, at most 20, and --manifest gets it as not_applied. RAEA_NOT_APPLIED=0 parses as before (docs/settings.md), for measuring.
Vendored stylo change, to upstream later: report_one_css_error (properties/declaration_block.rs) returned before reporting any unknown property with a -webkit-, -ms- or -o- prefix, which hid the reporter's main case, -webkit-text-stroke (Gecko-only in stylo, drawn as nothing). It reports them now, and raea's reporter skips the prefixed properties that change nothing in a picture (text-size-adjust, tap-highlight-color, font-smoothing, appearance, user-select and the like), so Tailwind's preflight adds no lines (a Tailwind page with gradients, rings, blur and truncate printed no NOTE). A value error is also named by the property stylo parsed, with the value after it. vendor.toml says both.
Noise: Bevy's bevy_asset::io::web and io::source warnings (printed by every render) and fontdb's skipped faces (system fonts it can't parse, which the reporter saw on Windows; a missing @font-face file, which the NOTE names) are filtered at both LogPlugins (engine/page motion.rs, engine/render open.rs). io/trace's `log` logger, which every third-party `log` record goes through, prints only warnings and errors now, and not fontdb's (Bevy's Ctrl+C handler printed two INFO lines on every render); every record still goes to the trace's events.jsonl.
Check: bench/dropped-css/check.sh renders the reporter's page as TSX (30 frames, its outline moving so its style attribute is parsed each frame) and as HTML. Each must exit 0 and print one NOTE naming -webkit-text-stroke and the missing font once each, with no INFO line and no bevy_asset or fontdb warning, and the TSX render's manifest must list both under not_applied. It fails on the raea before this (no NOTE) and passes on this one.
fps, one build with the reporter on and off (RAEA_NOT_APPLIED), seven alternating rounds on a shared, busy machine: the worst case (bench/dropped-css's page at 600 frames, dropping a declaration on every frame) median 516 on vs 479 off; bench/html-repeat median 202 on vs 172 off. No cost shows above the noise (min to max spans 315 to 620). (closes #34)
3.2 KiB
3.2 KiB
Settings
raea reads each setting from the environment first, then from ~/.raea/env (or the file RAEA_ENV_FILE names):
one KEY=value per line, # for comments. Nothing has a hidden default host: a feature that needs a service says
which setting is missing.
mkdir -p ~/.raea && touch ~/.raea/env && chmod 600 ~/.raea/env
Network
| Setting | What |
|---|---|
RAEA_OFFLINE=1 |
raea makes no network requests: a remote URL not already in raea's cache, a model or sample library not yet installed, a composition's own fetch() or WebSocket, Bevy's http asset source and every raea gen step are refused with what wanted out. What's on disk keeps working |
Generation (raea gen, optional)
| Setting | What |
|---|---|
FISH_API_KEY |
Your Fish Audio key, for an audio.speech step on fish:<model> (fish: alone is s2.1-pro); a plan quotes Fish's price for the words first |
Local audio models
Two models make sound on your Mac, free, with no account. Each installs itself the first time a composition or a
command asks for it (a few minutes, once), or ahead of time with raea setup-audio.
| Setting | What |
|---|---|
RAEA_TOKENSYNTH |
Where TokenSynth lives (default ~/.cache/raea-tokensynth, about 6 GB): an instrument described in words, one note at a time, for a Tone.js Sampler |
RAEA_SAO |
Where Stable Audio Open Small lives (default ~/.cache/raea-sao, about 2 GB, Core ML): foley and sound effects |
RAEA_AUDIO_AUTOSETUP=0 |
Don't install on first use; a missing model's error names the command (tools/sao/setup.sh, tools/tokensynth/setup.sh) |
From the command line, raea sao "PROMPT" -o hit.wav and raea tokensynth "TIMBRE" --notes C3,C4 -o notes/ make sounds through the same cache a composition's render uses, and raea sounds searches open sample
libraries (pianos, General MIDI instruments, orchestral and percussion samples, each with its licence).
Checks and guides (optional)
| Setting | What |
|---|---|
CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN |
The checks' judge model (clef-omni on Workers AI) |
RAEA_GUIDES |
A folder of craft references for the agent's guide tool (captions.md, motion-rules.md, ...) |
Rendering
| Setting | What |
|---|---|
RAEA_VELLO_BUMP=full |
Pages are drawn with Vello's own buffer sizes from the first frame, instead of raea's smaller ones (about 100 MB less GPU memory). A page past raea's sizes is found and drawn again at Vello's anyway, with a line on stderr, so this only saves that redraw |
RAEA_PAGE_DRAWN_CHECK=0 |
Pages are drawn without checking that Vello drew them. For measuring what the check costs (about 2% in one test): a page past Vello's buffers then shows the frame before it again, or nothing |
RAEA_NOT_APPLIED=0 |
A page's CSS is parsed without noting what stylo drops, so a render ends without its NOTE of what the page didn't apply (and its manifest's not_applied lists only loads that failed). For measuring what the note costs |
RAEA_PANIC_FAULT=N |
A panic while frame N draws, for checking what a failing render keeps (bench/frame-panic). The render then ends with an error naming the frame and the panic, and keeps the frames drawn before it |