code wiki / _hdl_build / nx_minerhub.nx

nx_minerhub.nx

buildroot/runtime/_hdl_build/nx_minerhub.nx

24396 B508 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_minerhub.nx -- MINER SYNTHESIS HUB (miner-sota, 2026-07-23). The measurement layer's FRONT DOOR. The 8 miners each emit JSON; nobody COMPOSED them. This forks each declared miner (allowlist-resolved via the SHARED sj_allow_path), extracts its ONE headline metric, classifies it against DATA-DRIVEN thresholds (GOOD/WATCH/BAD), and emits a single ecosystem-health index + a page. OO by construction: it READS the miners, duplicates none of them; a new miner = ONE conf row, zero code. now-free/pure at the parser (gate); the fork-compose path runs live. Composes nx_sovjson_lib. Read-only. Rule 26. mine <sourceconf> -> JSON: per-source value+status + health_index_permil page <sourceconf> <outfile> -> HTML board selftest <scratch-prefix> -> gate T1..T9 (metric extract + classify + index math, deterministic) conf cols: id TAB dir(hi|lo) TAB good TAB warn TAB metric TAB miner TAB arg1 TAB arg2 ... dir hi = higher is better (coverage, green, done); lo = lower is better (unowned, eroded, dangling) license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_sovjson_lib.nx nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_minerhub.nx

imports: nx_sovjson_lib.nxnx_syscalls.nxnx_gate_verdict.nxnx_tool_run.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 mh_selftest gv_ctr sys_mmap gv_head gv_puts sys_write ↻ sys_mmap ↻ sj_cat mh_extract sys_mmap ↻ sj_cat ↻ mh_find_from sj_vlen ↻ gv_check gv_puts ↻ mh_class sj_catn sys_mmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_openat_wr sys_write ↻ sys_close mh_emit sys_mmap ↻ mh_read sys_openat_rd sys_read sys_close ↻ mh_key sj_cat ↻ sj_catn ↻ sj_cat ↻

structs

none

consts

17const MH_MAGIC_1024: i64 = 1024
19const MH_CONF: i64 = 65536
20const MH_CAP: i64 = 262144
21const MH_OUT: i64 = 65536
22const MH_PATH: i64 = 512
23const MH_ARENA: i64 = 8192
24const MH_ARGS: i64 = 24
25const MH_ROWS: i64 = 64
26const MH_PERMIL: i64 = 1000
27const MH_NAME_MAX: i64 = 120
28const MH_MODE_644: i64 = 420
29const MH_SENT: i64 = -999999

functions

31func mh_read(path: *u8, buf: *u8, cap: i64) -> i64
40func mh_find_from(q: *u8, from: i64, n: i64, lit: *u8) -> i64
called by 2: mh_findmh_extract calls 1: sj_vlen
53func mh_find(q: *u8, n: i64, lit: *u8) -> i64
called by 2: mh_flagmh_selftest calls 1: mh_find_from
58func mh_extract(q: *u8, n: i64, key: *u8, foundp: *i64) -> i64
82func mh_class(val: i64, dir: i64, good: i64, warn: i64) -> i64
86func mh_key(d: *u8, o: i64, name: *u8) -> i64
called by 2: mh_emitmh_flag calls 1: sj_cat
96func mh_status_str(d: *u8, o: i64, score: i64) -> i64
called by 1: mh_emit calls 1: sj_cat
104func mh_run(cq: *u8, ls: i64, le: i64, valp: *i64, ranp: *i64) -> i64
150func mh_emit(conf: *u8, wantpage: i64, outp: *u8, d: *u8) -> i64
280func mh_flag(conf: *u8, ipath: *u8, filer: *u8, d: *u8) -> i64
375func mh_selftest(prefix: *u8) -> i64
466func main(argc: i64, argv: *i64) -> i64