code wiki / _hdl_build / nx_gate_baseline_sweep.nx
nx_gate_baseline_sweep.nx
buildroot/runtime/_hdl_build/nx_gate_baseline_sweep.nx
about
nx_gate_baseline_sweep.nx -- MASS-WRAP orchestrator: roll nx_gate_baseline_harness across the whole
gate universe in bounded, resumable batches (the rollout engine for the 87%-no-baseline blind spot,
[[project-nishi-sensor-gap-census-2026-07-14]]).
usage: nx_gate_baseline_sweep <budget> budget = max gates to wrap this run; 0 = DRY RUN (list only)
Walks runtime/_hdl_build/*.nx and classifies each file:
NON-GATE -- no verdict marker (libs/specs) -> never wrapped (running a lib = rc-102 noise)
INFRA -- the builder / the harness / this sweep itself -> skipped by name
RISKY -- name has daemon|serve|bench|monitor|watch OR source touches sockets/https:
blind-running those can HANG (listeners), hit the network, or run for minutes.
SKIPPED BY POLICY and PRINTED (no silent caps) -- they need supervised wrapping.
DONE -- ledger knowledge/status/gatebase_<gate>.tsv already exists (resume for free)
WRAP -- safe + unwrapped: fork _offc/nx_gate_baseline_harness.elf <gate> (which itself forks
the sovereign lane, captures rc+telemetry, banks the baseline). Harness rc!=0 =>
REFUSED (a broken gate can't become a baseline) -> reported: the sweep doubles as a
live BROKEN-GATES census.
Never-brick: the sweep itself writes NOTHING (all writes happen inside the harness: /tmp captures +
new gatebase_*.tsv ledgers, atomic). Deterministic classification; bounded loops; budget-bounded forks.
Sovereign nx_cc->nxasm; run with CWD=nxc2 root. license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: syscalls.nxruntime.nxnx_dirent.nxnx_fcntl.nxnx_handoff_gate.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
| 26 | const K_MAGIC_16384: i64 = 16384 |
| 27 | const K_MAGIC_1024: i64 = 1024 |
| 28 | const K_MAGIC_1048576: i64 = 1048576 |
functions
| 31 | func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 33 | func lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c } called by 1: find_ci |
| 35 | func is_alnum(c: i64) -> i64 called by 1: find_ci |
| 43 | func streqz(a: *u8, b: *u8) -> i64 called by 1: main |
| 50 | func byte_copy(dst: *u8, src: *u8, n: i64) -> i64 called by 1: main |
| 57 | func find_ci(buf: *u8, lo: i64, hi: i64, ndl: *u8, word: i64) -> i64 |
| 82 | func is_gate(buf: *u8, len: i64) -> i64 |
| 93 | func is_risky(name: *u8, nlen: i64, buf: *u8, len: i64) -> i64 |
| 112 | func is_build_only(buf: *u8, len: i64) -> i64 |
| 116 | func ends_nx(name: *u8, len: i64) -> i64 called by 1: main |
| 125 | func read_src(path: *u8, buf: *u8, cap: i64) -> i64 |
| 141 | func run_harness(gname: *u8, envp: *i64) -> i64 |
| 159 | func main(argc: i64, argv: *i64) -> i64 |