code wiki / _hdl_build / nx_gate_baseline_sweep.nx

nx_gate_baseline_sweep.nx

buildroot/runtime/_hdl_build/nx_gate_baseline_sweep.nx

17000 B364 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind tooltopic gate
docsdependenciesstructsconstsfunctions

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

syscalls.nx runtime.nx nx_dirent.nx nx_fcntl.nx nx_handoff_gate.nx nx_gate_baseline_sweep.nx

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

main slen hg_parse_ints print strlen print_i64 itoa nx_openat nx_dirent_read nx_dirent_iter nx_dirent_name_len ends_nx byte_copy streqz read_src sys_read is_build_only find_ci slen ↻ lc is_alnum is_gate find_ci ↻ is_risky find_ci ↻ hg_evidence_file run_harness sys_fork sys_execve sys_wait4

structs

none

consts

26const K_MAGIC_16384: i64 = 16384
27const K_MAGIC_1024: i64 = 1024
28const K_MAGIC_1048576: i64 = 1048576

functions

31func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: find_cimain
33func lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c }
called by 1: find_ci
35func is_alnum(c: i64) -> i64
called by 1: find_ci
43func streqz(a: *u8, b: *u8) -> i64
called by 1: main
50func byte_copy(dst: *u8, src: *u8, n: i64) -> i64
called by 1: main
57func find_ci(buf: *u8, lo: i64, hi: i64, ndl: *u8, word: i64) -> i64
82func is_gate(buf: *u8, len: i64) -> i64
called by 1: main calls 1: find_ci
93func is_risky(name: *u8, nlen: i64, buf: *u8, len: i64) -> i64
called by 1: main calls 1: find_ci
112func is_build_only(buf: *u8, len: i64) -> i64
called by 1: main calls 1: find_ci
116func ends_nx(name: *u8, len: i64) -> i64
called by 1: main
125func read_src(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 1: sys_read
141func run_harness(gname: *u8, envp: *i64) -> i64
called by 1: main calls 3: sys_forksys_execvesys_wait4
159func main(argc: i64, argv: *i64) -> i64