code wiki / _hdl_build / nx_debt_hygiene.nx
nx_debt_hygiene.nx
buildroot/runtime/_hdl_build/nx_debt_hygiene.nx
about
nx_debt_hygiene.nx -- debt-plane hygiene/stats organ (2026-07-19, sess claude_f749ee6c).
THE nishi debt-management tool: reads knowledge/store/debt- (mixed legacy 5-col + v2 7-col rows)
and emits total/open/eaten, open sev>=6 (gate-relevant), open-by-severity histogram.
Row schema detect: col0 all-digits & len>=8 = legacy (sev@1 status@3); else v2 (sev@2 status@3).
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_sovjson_lib.nxnx_store_seed_lib.nxnx_syscalls.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
| 10 | const DH_MAGIC_65535: i64 = 65535 |
| 11 | const DH_MAGIC_60000: i64 = 60000 |
| 12 | const DH_MAGIC_65534: i64 = 65534 |
| 13 | const DH_MAGIC_65536: i64 = 65536 |
| 14 | const DH_MAGIC_2048: i64 = 2048 |
| 24 | const DH_CAP: i64 = 33554432 |
| 25 | const DH_TAB: i64 = 9 |
| 26 | const DH_NL: i64 = 10 |
functions
| 28 | func dh_puts(s: *u8) -> i64 { return sj_puts(s) } |
| 29 | func dh_cat(d: *u8, o: i64, s: *u8) -> i64 { return sj_cat(d, o, s) } |
| 30 | func dh_catn(d: *u8, o: i64, v: i64) -> i64 { return sj_catn(d, o, v) } |
| 31 | func dh_le(q: *u8, i: i64, n: i64) -> i64 { var e: i64 = i; var s: i64 = 1; while s == 1 { if e >= n { s = 0 } else { if q[e] == (DH_NL as u8) { s = 0 } else { e = e + 1 } } } return e } called by 1: main |
| 32 | func dh_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64 called by 1: main |
| 48 | func dh_span_lit(q: *u8, s: i64, e: i64, lit: *u8) -> i64 called by 1: main |
| 55 | func dh_find_lit(q: *u8, s: i64, e: i64, lit: *u8) -> i64 |
| 73 | func dh_done_marker(q: *u8, s: i64, e: i64) -> i64 |
| 90 | func dh_residual_marker(q: *u8, s: i64, e: i64) -> i64 |
| 115 | func dh_marker_name(m: i64) -> *u8 called by 1: main |
| 123 | func dh_legacy(q: *u8, s: i64, e: i64) -> i64 called by 1: main |
| 129 | func dh_atoi(q: *u8, s: i64, e: i64) -> i64 { var v: i64 = 0; var i: i64 = s; while i < e { let c: i64 = q[i] as i64; if c >= 48 { if c <= 57 { v = v * 10 + (c - 48) } } i = i + 1 } return v } called by 1: main |
| 138 | func dh_ishex(c: i64) -> i64 called by 1: dh_sha_at |
| 144 | func dh_sha_at(q: *u8, s: i64, e: i64, out: *i64) -> i64 |
| 172 | func dh_organ_before(q: *u8, s: i64, at: i64, ob: *u8) -> i64 called by 1: main |
| 210 | func dh_bytes_before(q: *u8, s: i64, at: i64, bb: *u8) -> i64 called by 1: main |
| 267 | func dh_dc_check(organ: *u8, sha: *u8, byt: *u8, out: *u8) -> i64 |
| 286 | func dh_dc_scope(rowfile: *u8, out: *u8) -> i64 |
| 303 | func dh_write_tmp(q: *u8, s: i64, e: i64) -> i64 |
| 311 | func main(argc: i64, argv: *i64) -> i64 |