code wiki / _hdl_build / nx_debtmine.nx

nx_debtmine.nx

buildroot/runtime/_hdl_build/nx_debtmine.nx

18127 B393 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_sovjson_lib.nx nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_debtmine.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 dm_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 dm_mine_json sys_mmap ↻ dm_load sj_lit_eq ↻ sj_vlen ↻ dm_read sys_openat_rd sys_read sys_close ↻ sys_mmap ↻ dm_allow_path sj_allow_path sys_mmap ↻ sys_openat_rd ↻ sys_read ↻ sys_close ↻ sj_le sj_col

structs

none

consts

18const DM_MAGIC_1785000000: i64 = 1785000000
19const DM_MAGIC_4088: i64 = 4088
21const DM_CAP: i64 = 4194304
22const DM_OUT: i64 = 65536
23const DM_PATH: i64 = 512
24const DM_SCOPES: i64 = 256
25const DM_TOPN: i64 = 20
26const DM_ALLOW: i64 = 131072
27const DM_DAY: i64 = 86400
28const DM_PERMIL: i64 = 1000
29const DM_SEVN: i64 = 12
30const DM_NAME_MAX: i64 = 120
31const DM_MODE_644: i64 = 420

functions

33func dm_read(path: *u8, buf: *u8, cap: i64) -> i64
42func dm_find(q: *u8, n: i64, lit: *u8) -> i64
called by 1: dm_selftest calls 1: sj_vlen
56func dm_allow_path(name: *u8, outp: *u8) -> i64 { return sj_allow_path(name, outp) }
called by 1: dm_load calls 1: sj_allow_path
57func dm_key(d: *u8, o: i64, name: *u8) -> i64
called by 1: dm_mine_json calls 1: sj_cat
67func dm_digits(q: *u8, s: i64, e: i64) -> i64
called by 1: dm_mine_json
75func dm_load(src: *u8, loader: *u8, buf: *u8, scx: *i64) -> i64
101func dm_mine_json(src: *u8, loader: *u8, minsup: i64, now: i64, d: *u8) -> i64
299func dm_selftest(prefix: *u8) -> i64
363func main(argc: i64, argv: *i64) -> i64