nx_substrate_compose_test.nx
buildroot/runtime/nx_substrate_compose_test.nx
about
nx_substrate_compose_test.nx -- end-to-end compose demo.
Exercises ALL 11 optimization-layer primitives together to verify
they compose. Per cardinal real-playtest-loop, the per-primitive
smokes don't catch composition bugs (one primitive can pass its
own test while violating an invariant another primitive depends
on). This smoke is the substrate's whole-cloth verification.
Scenario: an "iridium voxel world" cell hosts a 32x32x32 tissue
at 3 bits per voxel (12 KiB = ESP32-feasible). The cell declares:
- foreground game attention class (frame budget pressure)
- LOCAL_GPU tropism preference
- PTX ribosome target
- 16 KiB RAM ceiling (tissue + some scratch)
We then simulate the lifecycle:
1. Construct the tissue, fill it half-air half-stone
2. Wrap the cell in a pathway
3. Profile a "raycast" call site through metabolism
4. Apply budget pressure
5. Ask homeostasis for a signal
6. Resolve tropism for the signal
7. Pick ribosome target for the destination tier
8. Log eviction journal entry for the migration
Every step asserts the expected outcome from a foreground-game cell
under realistic resource pressure.
dependencies 13 imports · 0 importers
diagram shows first 10 each side; +3 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_tier.nxnx_budget.nxnx_attention_class.nxnx_yield.nxnx_evict_journal.nxnx_metabolism.nxnx_homeostasis.nxnx_palette.nxnx_tropism.nxnx_ribosome.nxnx_pathway.nxnx_tissue.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 44 | func _spec(cell_id: nx_int, ac: nx_int, tr: nx_int, rb: nx_int, |
| 57 | func main() -> i64 |