Files
shinyobjectz bbd7369548 One loop, raea goal: every rule in TypeScript, held at edit, render, publish and done; raea make is the asset tools
The rules are raea/goal's (sdk/goal), run by `raea goal check` at four moments: the hook after a save, every
render's end, raea cloud's publish, and the Stop hook. Rust's cut and goal gates and the box's word, sound, frame and
place checks are packs (MK30-MK39); runtime/cut-plan, runtime/goal-plan, raea make status and the box's check code
are gone with no alias (MK41).

brief.ts is the one registered root (MK43): raea runs it, and every file that imports raea must be reached from it
(the registered check, an error at publish and done). Its tasks are its `plan` (MK44), read from its run and written
back where each is written by `raea goal tasks`, the one path for the app, agents and the box. Its `goal` is one
goal or a workflow of several (MK46), each with its step, after and rules, checked and reported alone. Taste lines
and signed asks run inside the loop (MK47).

`raea goal check|tasks|seen|judge|gates|next` is the loop; `raea make clothes|motion|solid|wear|splat|physics|bake|
sao|tokensynth|sounds|component|blockout|...` the asset tools (MK45). Old names are refused with where they went.
docs/make.feature is docs/goal.feature; tools/legacy-names.sh holds the old names out.

raea's Node mode on JavaScriptCore now gives a CommonJS package's names as named exports (React's jsx), loads a
file a tool imports by URL, keeps process.exit's code from a promise callback, and reads stdin as fd 0, so the goal
runner runs on the shipped binary.
2026-11-29 16:02:31 -08:00

2.6 KiB

title, summary, order, sources
title summary order sources
raea traces List the sessions raea apps left, newest first, with how each ended and its glitches, or tell one in full. 53
engine/cli/src/cli.rs
io/trace/src

Every raea app records its session: how it ended, its glitches and errors, its slowest frames and its memory. raea traces lists the last 40, newest first. raea traces show tells one in full, such as why it crashed. Attach it to a bug report.

raea traces
raea traces show            # the newest
raea traces show 3          # the fourth in the list

What a run measures

A run can also time each of Bevy's render passes, count what the engine does, and turn on raea's own traces. Each of these is a stat channel, and you choose channels from your composition, so you don't need a rebuild or a variable. Choose them at the file's top level, so they're on before the engine opens:

import { native } from "@raea/app/native";

native("stats.on", { channels: ["bevy_passes", "trace"] });   // or ["all"]

bevy_passes times every render pass Bevy runs. Every other channel is one of raea's RAEA_*_TRACE or *_STATS switches, named without RAEA_ and in lower case: bake_trace, seedling_trace, media_stats. Setting the variable itself still works and overrides the composition, and RAEA_STATS=bevy_passes,trace chooses channels for a run without touching the file.

Debug views are channels too, and a view that takes a value takes it after =:

native("stats.on", { channels: ["pass=depth"] });        // the depth pass instead of the picture (or normal, albedo, sun, sky)
native("stats.on", { channels: ["lod_debug", "fog_debug", "volume_debug"] });

While the run goes, native("stats.read", {}) gives what it has measured so far: each timed pass's runs and its mean and worst milliseconds, and the counters (engine/draws, engine/updates; two updates a draw means each frame was drawn twice). A render works out its frames ahead of the engine, so a frame's code can read the totals from before that frame was drawn. When a run that chose any channel ends, it prints the table and keeps it as stats.json in its session folder, which is the folder raea traces show reads.

Usage

raea traces [show [N|last|DIR]]   (the sessions raea left, newest first: how each ended, its glitches; show tells one in full)

Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.