code wiki / (root) / nx_mcu_fit_gate.nx

nx_mcu_fit_gate.nx

buildroot/runtime/nx_mcu_fit_gate.nx

7216 B135 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic mcu
docsdependenciesstructsconstsfunctions

about

nx_mcu_fit_gate.nx -- pins the MCU memory-hierarchy admission decision, using the REAL esp32-ai numbers so the gate is about a shipping workload rather than invented ones. Reference config (measured, esp32-ai RESULTS.md 2026-07-21, ESP32-S3 N16R8): 559K-param dense core at 4 bits = 279,500 B against 512 KB internal SRAM; a 14,912,332 B exported model against 16 MB flash; ~3 MB of KV+scratch against 8 MB PSRAM. That config MUST be admitted (T1) or the organ is useless. The two ways this logic goes wrong, both controlled for: - refusing everything (safe-looking, ships nothing): T1/T6/T7 are positive controls. - treating UNMEASURED as room (silently guessing): T5 refuses it, and T6 proves that refusal is SCOPED -- an unmeasured resource nobody asked for must not block a decidable verdict. T9 pins determinism: when two walls are hit at once the reported binding constraint must not wobble. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_mcu_fit.nx nx_mcu_fit_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_mcu_fit.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap gv_head gv_puts sys_write mf_admit gv_check gv_puts ↻ mf_core_bytes mfg_has mfg_len mf_reason gv_verdict gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_journal sys_openat_append sys_mmap ↻ gv_catn sys_mmap ↻ sys_munmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real gv_cat sys_write ↻ sys_close sys_munmap ↻

structs

none

consts

none

functions

18func mfg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: mfg_has
21func mfg_has(hay: *u8, needle: *u8) -> i64
called by 1: main calls 1: mfg_len
39func main() -> i64