code wiki / _hdl_build / nx_bootmine.nx

nx_bootmine.nx

buildroot/runtime/_hdl_build/nx_bootmine.nx

21669 B455 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_bootmine.nx -- BOOT/PROCESS-STABILITY MINER over the sovereign supervisor log (miner-sota, 2026-07-24, operator 'go SOTA from the FIRST BYTE up'). The miner suite reaches the LOWEST layer: the system's own process lifecycle. A SOTA boot is STABLE from the first byte -- services come up and STAY up. A CRASH LOOP (a subsystem spawn->die->respawn without end) burns fork bandwidth continuously and hides the real fault. This mines the supervisor.log for exactly that: per-[tag] respawn counts, and any tag whose respawns exceed minloop is flagged CRASH-LOOPING. Auto-detects the reader-keep loop (debt seq699). Composes nx_sovjson_lib (sj_*). Read-only. No hw writes (Rule 26). mine <logfile> [minloop] -> JSON: totals, by_tag ranked, crash_looping, stability selftest <scratch-prefix> -> gate T1..T7 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_sovjson_lib.nx nx_syscalls.nx nx_gate_verdict.nx nx_bootmine.nx

imports: nx_sovjson_lib.nxnx_syscalls.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main sj_puts sys_write sys_exit sj_vlen sj_lit_eq bm_selftest gv_ctr sys_mmap gv_head gv_puts sys_write ↻ sys_mmap ↻ sj_cat sj_catn sys_mmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_openat_wr sys_write ↻ sys_close bm_mine_json sys_mmap ↻ bm_read sys_openat_rd sys_read sys_close ↻ sj_le bm_has sj_vlen ↻ bm_tag bm_intern bm_key sj_cat ↻ sj_catn ↻ sj_cat ↻ sj_cat_esc sj_vlen ↻ gv_check

structs

none

consts

14const BM_MAGIC_8192: i64 = 8192
16const BM_WIN: i64 = 8388608
17const BM_OUT: i64 = 65536
18const BM_PATH: i64 = 512
19const BM_TAGS: i64 = 128
20const BM_TOPN: i64 = 20
21const BM_MINLOOP: i64 = 10
22const BM_NAME_MAX: i64 = 120
23const BM_MODE_644: i64 = 420
24const BM_LBRK: i64 = 91
25const BM_RBRK: i64 = 93

functions

27func bm_read(path: *u8, buf: *u8, cap: i64) -> i64
37func bm_has(q: *u8, s: i64, e: i64, lit: *u8) -> i64
50func bm_find(q: *u8, n: i64, lit: *u8) -> i64 { return bm_has(q, 0, n, lit) }
called by 1: bm_selftest calls 1: bm_has
52func bm_tag(q: *u8, s: i64, e: i64, tp: *i64) -> i64
called by 1: bm_mine_json
61func bm_intern(q: *u8, cs: i64, ce: i64, ts: *i64, te: *i64, np: *i64) -> i64
78func bm_key(d: *u8, o: i64, name: *u8) -> i64
called by 2: bm_mine_jsonbm_fleet_json calls 1: sj_cat
88func bm_mine_json(logf: *u8, minloop: i64, d: *u8) -> i64
213func bm_word_after(q: *u8, s: i64, e: i64, lit: *u8, dp: *i64) -> i64
called by 1: bm_fleet_json calls 1: sj_vlen
239func bm_fleet_json(logf: *u8, minfail: i64, d: *u8) -> i64
343func bm_selftest(prefix: *u8) -> i64
423func main(argc: i64, argv: *i64) -> i64