code wiki / _hdl_build / nx_debtmine.nx

nx_debtmine.nx

buildroot/runtime/_hdl_build/nx_debtmine.nx

27929 B526 linesdepth 5pulls 8 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 5 imports · 0 importers

nx_sovjson_lib.nx nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_debt_recurrence_lib.nx nx_debtmine.nx

imports: nx_sovjson_lib.nxnx_syscalls.nxnx_gate_verdict.nxnx_tool_run.nxnx_debt_recurrence_lib.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 nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ 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 ↻

structs

none

consts

19const DM_MAGIC_1785000000: i64 = 1785000000
20const DM_MAGIC_4088: i64 = 4088
35const DM_CAP: i64 = 33554432
36const DM_OUT: i64 = 65536
37const DM_PATH: i64 = 512
39const DM_TOPN: i64 = 20
40const DM_ALLOW: i64 = 131072
41const DM_DAY: i64 = 86400
42const DM_PERMIL: i64 = 1000
43const DM_SEVN: i64 = 12
44const DM_NAME_MAX: i64 = 120
45const DM_MODE_644: i64 = 420

functions

47func dm_read(path: *u8, buf: *u8, cap: i64) -> i64
56func dm_find(q: *u8, n: i64, lit: *u8) -> i64
called by 2: dm_selftestmain calls 1: sj_vlen
70func dm_allow_path(name: *u8, outp: *u8) -> i64 { return sj_allow_path(name, outp) }
called by 1: dm_load calls 1: sj_allow_path
71func dm_key(d: *u8, o: i64, name: *u8) -> i64
called by 2: dm_mine_jsonce_recurrence calls 1: sj_cat
81func dm_digits(q: *u8, s: i64, e: i64) -> i64
called by 1: dm_mine_json
89func dm_load(src: *u8, loader: *u8, buf: *u8, scx: *i64) -> i64
124func dm_mine_json(src: *u8, loader: *u8, minsup: i64, now: i64, d: *u8) -> i64
352func ce_recurrence(src: *u8, loader: *u8, now: i64, d: *u8) -> i64
384func dm_selftest(prefix: *u8) -> i64
479func main(argc: i64, argv: *i64) -> i64