ReviewOS

also looking at this

stacks/drone

fix: separate native runtime builds from test deadlines

#69
Merged chris wants to merge codex/runtime-cold-build-setup into main
10 files +399 -14
docs/runtime.mdmodified+29-0
Changes to docs/runtime.md
@@ -28,6 +28,35 @@ stream. Native Stacks process capture drains stdout and stderr concurrently and
2828cleans up the owned process group on POSIX before reporting failure. This also
2929applies to SDK inspection and Pico 2 builds; it does not install firmware.
3030
31Native runtime and sensor tests await build initialization before their test timers
32start. An unrelated setup hook must not interrupt the build API's owned command
33cleanup. Runtime response and test deadlines are unchanged. Build failures identify
34the configure, compile, contracts or SDK inspection stage.
35
36CI also compiles a fresh disposable source copy whose real CMake configure takes
37at least 21 seconds, crossing the former 20-second setup hook. It then runs the
38original Linux full-input FIFO case, retains real tool exit observations and checks
39that no owned tool groups remain. Run the same qualification locally with a new
40evidence directory:
41
42```sh
43bun scripts/qualify-runtime-cold-build.ts /absolute/path/to/new-cold-build-evidence
44```
45
46On macOS the qualification uses the native boot/clean-exit case; the kernel FIFO
47case is Linux-only. The qualification retains its owned source and logs, including
48failures. It does not access a board or measure flight timing.
49
50The qualification supervisor derives its aggregate budget from the three separate
51120-second build commands, their settlement allowance, the selected test's existing
52deadline and startup allowance. It captures at most 2 MB per stream concurrently,
53retains failed output and checks both parent and recorded tool process groups.
54This test-only aggregate budget does not extend the build API or runtime deadlines.
55CI separately interrupts the actual test parent while CMake is active and makes
56the early capture receipt path a directory. That expected reporting refusal must
57still retain its error and settle the recorded detached tool group. Run it with
58`--interrupt-before-capture-report` after a new evidence directory argument.
59
3160```sh
3261./buddy runtime:build
3362./buddy runtime:bench --ticks 1000