code wiki / _hdl_build / nx_harnessmine.nx
nx_harnessmine.nx
buildroot/runtime/_hdl_build/nx_harnessmine.nx
about
nx_harnessmine.nx -- HARNESS-CLASS MINER over the gate-outcome journal (miner-sota F1012, 2026-07-23).
The census (nx_minecov MC09) measured the harness class at ZERO evidence: 953+ gates run constantly
and NOTHING recorded an outcome, so flake and erosion were structurally invisible. nx_gate_verdict
now self-records one actlog-grammar frame per verdict (fail-soft); this mines that history for the
two signals a pass/fail count cannot give:
FLAKE = the same gate has produced BOTH outcomes (non-determinism -- the gate cannot be trusted)
EROSION = a gate that was GREEN later went RED (a BANKED WIN LOST -- the ratchet law's RED). A gate
that went RED then GREEN is a FIX, explicitly NOT erosion; the distinction is the point.
Order matters, so frames are walked in journal order per gate. now INJECTABLE for deterministic tests.
Composes nx_sovjson_lib (sj_*). Read-only. No hw writes (Rule 26).
mine <journal> [minruns] [now] -> JSON per-gate + totals (green_permil, flaky, eroded)
selftest <scratch-prefix> -> gate T1..T8
frame cols: ts TAB ws TAB gate TAB verb TAB outcome(GREEN|RED) TAB passed/total
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
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
structs
| none |
consts
| 18 | const HM_MAGIC_1785000000: i64 = 1785000000 |
| 19 | const HM_MAGIC_4088: i64 = 4088 |
| 21 | const HM_WIN: i64 = 4194304 |
| 22 | const HM_OUT: i64 = 65536 |
| 23 | const HM_PATH: i64 = 512 |
| 24 | const HM_GATES: i64 = 512 |
| 25 | const HM_TOPN: i64 = 30 |
| 26 | const HM_PERMIL: i64 = 1000 |
| 27 | const HM_DAY: i64 = 86400 |
| 28 | const HM_NAME_MAX: i64 = 120 |
| 29 | const HM_MODE_644: i64 = 420 |
functions
| 31 | func hm_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 40 | func hm_find(q: *u8, n: i64, lit: *u8) -> i64 |
| 53 | func hm_key(d: *u8, o: i64, name: *u8) -> i64 |
| 63 | func hm_digits(q: *u8, s: i64, e: i64) -> i64 called by 1: hm_mine_json |
| 69 | func hm_mine_json(jpath: *u8, minruns: i64, now: i64, d: *u8) -> i64 |
| 238 | func hm_selftest(prefix: *u8) -> i64 |
| 300 | func main(argc: i64, argv: *i64) -> i64 |