code wiki / _hdl_build / nx_minerhub.nx
nx_minerhub.nx
buildroot/runtime/_hdl_build/nx_minerhub.nx
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
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
structs
| none |
consts
| 17 | const MH_MAGIC_1024: i64 = 1024 |
| 19 | const MH_CONF: i64 = 65536 |
| 20 | const MH_CAP: i64 = 262144 |
| 21 | const MH_OUT: i64 = 65536 |
| 22 | const MH_PATH: i64 = 512 |
| 23 | const MH_ARENA: i64 = 8192 |
| 24 | const MH_ARGS: i64 = 24 |
| 25 | const MH_ROWS: i64 = 64 |
| 26 | const MH_PERMIL: i64 = 1000 |
| 27 | const MH_NAME_MAX: i64 = 120 |
| 28 | const MH_MODE_644: i64 = 420 |
| 29 | const MH_SENT: i64 = -999999 |
functions
| 31 | func mh_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 40 | func mh_find_from(q: *u8, from: i64, n: i64, lit: *u8) -> i64 |
| 53 | func mh_find(q: *u8, n: i64, lit: *u8) -> i64 |
| 58 | func mh_extract(q: *u8, n: i64, key: *u8, foundp: *i64) -> i64 |
| 82 | func mh_class(val: i64, dir: i64, good: i64, warn: i64) -> i64 |
| 86 | func mh_key(d: *u8, o: i64, name: *u8) -> i64 |
| 96 | func mh_status_str(d: *u8, o: i64, score: i64) -> i64 |
| 104 | func mh_run(cq: *u8, ls: i64, le: i64, valp: *i64, ranp: *i64) -> i64 |
| 150 | func mh_emit(conf: *u8, wantpage: i64, outp: *u8, d: *u8) -> i64 |
| 280 | func mh_flag(conf: *u8, ipath: *u8, filer: *u8, d: *u8) -> i64 |
| 375 | func mh_selftest(prefix: *u8) -> i64 |
| 466 | func main(argc: i64, argv: *i64) -> i64 |