code wiki / _hdl_build / nx_debtmine.nx
nx_debtmine.nx
buildroot/runtime/_hdl_build/nx_debtmine.nx
about
nx_debtmine.nx -- BUGS-CLASS MINER over the debt- plane (miner-sota F1009/MS06a, 2026-07-23).
The census (nx_minecov MC06) measured 661 debt rows COVERED but UNMINED: listed, never analysed.
This mines the management signals a list cannot give: WHERE debt concentrates (per-scope open
counts), WHICH lanes actually eat it (eat_permil = eaten/(open+eaten) per scope -- low eat-rate
with high open = rot), severity distribution, and AGE (ids ARE epochs, so open-debt age buckets
and oldest_open are derivable). Source is a seg-store plane loaded through the ALLOWLIST-RESOLVED
loader, or a FILE when loader is "-" (deterministic gate fixtures; live uses nx_store_put).
now is INJECTABLE so aging is bit-deterministic under test. Composes nx_sovjson_lib (sj_*).
Read-only. No hw writes (Rule 26).
mine <source> [loader] [minsup] [now] -> JSON: totals, by_scope ranked, sev dist, aging
selftest <scratch-prefix> -> gate T1..T8
plane row cols: id(epoch) TAB sev TAB scope TAB status(open|eaten) TAB desc
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
| 18 | const DM_MAGIC_1785000000: i64 = 1785000000 |
| 19 | const DM_MAGIC_4088: i64 = 4088 |
| 21 | const DM_CAP: i64 = 4194304 |
| 22 | const DM_OUT: i64 = 65536 |
| 23 | const DM_PATH: i64 = 512 |
| 24 | const DM_SCOPES: i64 = 256 |
| 25 | const DM_TOPN: i64 = 20 |
| 26 | const DM_ALLOW: i64 = 131072 |
| 27 | const DM_DAY: i64 = 86400 |
| 28 | const DM_PERMIL: i64 = 1000 |
| 29 | const DM_SEVN: i64 = 12 |
| 30 | const DM_NAME_MAX: i64 = 120 |
| 31 | const DM_MODE_644: i64 = 420 |
functions
| 33 | func dm_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 42 | func dm_find(q: *u8, n: i64, lit: *u8) -> i64 |
| 56 | func dm_allow_path(name: *u8, outp: *u8) -> i64 { return sj_allow_path(name, outp) } |
| 57 | func dm_key(d: *u8, o: i64, name: *u8) -> i64 |
| 67 | func dm_digits(q: *u8, s: i64, e: i64) -> i64 called by 1: dm_mine_json |
| 75 | func dm_load(src: *u8, loader: *u8, buf: *u8, scx: *i64) -> i64 |
| 101 | func dm_mine_json(src: *u8, loader: *u8, minsup: i64, now: i64, d: *u8) -> i64 |
| 299 | func dm_selftest(prefix: *u8) -> i64 |
| 363 | func main(argc: i64, argv: *i64) -> i64 |