code wiki / _hdl_build / nx_debtcluster.nx
nx_debtcluster.nx
buildroot/runtime/_hdl_build/nx_debtcluster.nx
about
nx_debtcluster.nx -- THE LEDGER STOPS BEING A LIST AND BECOMES A RECOMMENDATION.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
─── THE DEFECT THIS EXISTS TO KILL ────────────────────────────────────────────────────────────────────
MEASURED 2026-07-31: the debt plane holds 2068 rows, 905 open, 281 open at sev>=8, and it is FLAT. Every
seat reads it top-down by severity and picks a row. But the rows are not independent -- in the first FORTY
sev>=8 rows alone there are at least five families, each one incident wearing many row numbers:
mgmt_api availability seq698 crash-loop · seq710 hang · the live sev-9 :18098 outage
resource exhaustion seq883 23.6GiB alloc-without-free · seq774 20,440 respawns · seq783 · seq727 · seq975
dup-source seq207 · seq701 · seq945 · seq965 · seq974 (965/974 report GREEN divergent=0
WHILE THE PARENTS STAY OPEN)
law-warden magic nums seq274 L001 (_hdl_build, 2348) · seq315 L006 (core, 3476) -- same rule, same
detector, two corpora, filed as two unrelated problems
gx-body seq804·805·808·819·820·824·826·828·900 = NINE rows, ONE skull-architecture arc
A seat that fixes the top row by severity fixes ONE MEMBER of a family and leaves the family. The ledger
is sorted by how loud a row is, never by how much work a single act would close.
★LAW: A LEDGER SORTED BY SEVERITY ANSWERS "WHAT SCREAMS LOUDEST", NEVER "WHAT SHOULD I BUILD".
─── WHAT SOTA SAYS (researched 2026-07-31, and what we deliberately DID NOT copy) ─────────────────────
1. NORMALIZE BEFORE YOU EMBED. LLM-augmented ticket clustering (FLAIRS 2026, ABCD) beats raw-text
embedding on silhouette AND human-rated coherence purely by extracting a canonical statement first.
GPTrace (ICSE'26, arXiv 2512.01609) does the same for crash dedup: normalize -> embed -> HDBSCAN,
scored on silhouette + DBCV + P/R/F1, beating CrashWalk and Igor.
2. DENSITY-BASED, NOT PARTITIONAL. HDBSCAN is chosen in that literature precisely because it DECLINES to
cluster outliers. A debt ledger is mostly singletons; a partitional method (k-means, plain
agglomerative) has nowhere to put them and pollutes every cluster with noise. We implement the
principle, not the library: a core-density test with an EXPLICIT noise class that is always reported.
3. TOPOLOGY BEATS TEXT SIMILARITY FOR CAUSALITY. TopoEvo (arXiv 2605.15611) is unambiguous -- correlation
is constrained by the ACTUAL dependency graph, and topology-agnostic baselines manufacture spurious
links by treating all relations as equivalent. TWO ROWS BOTH SAYING "LEAK" IN UNCONNECTED ORGANS ARE
TWO PROBLEMS. This is the ic_ident_gate below, and it is the single most important line in the organ.
4. RANK BY RISK-REDUCTION OVER EFFORT, and cap the recommendation list at 5-8 (postmortem practice).
5. ★DO NOT BUILD THE AGENTIC RCA TIER. ITBench-AA (Artificial Analysis + IBM Research, launched
2026-05-27, 59 live Kubernetes SRE tasks): EVERY frontier model scores below 50% -- Claude Opus 4.7
47%, GPT-5.5 46%; IBM's own ITBench reports best-agent 13.8% SRE / 25.2% CISO / 0% FinOps. Meanwhile
the plain correlate-and-rank layer delivers a reliable 80-85% noise reduction in production. So we
build the deterministic layer that demonstrably works and refuse the one that demonstrably does not.
6. GRADE ORDINALLY. Arvo's AI Investigation Capability Ladder (May 2026, upd. July 2026): L0 manual ·
L1 correlation · L2 summarized timeline · L3 single-shot diagnosis · L4 agentic · L5 closed-loop.
THIS ORGAN IS L2, EVIDENCE-CAPPED, AND SAYS SO IN ITS OWN OUTPUT. Claiming L4 would be the banked
dependencies 2 imports · 0 importers
imports: nx_store_seed_lib.nxnx_ppmi_lib.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
| 76 | const IC_MAGIC_1784947125: i64 = 1784947125 |
| 77 | const IC_MAGIC_1784947134: i64 = 1784947134 |
| 78 | const IC_MAGIC_1784947786: i64 = 1784947786 |
| 79 | const IC_MAGIC_1784951793: i64 = 1784951793 |
| 80 | const IC_MAGIC_1784952157: i64 = 1784952157 |
| 81 | const IC_MAGIC_1784954507: i64 = 1784954507 |
| 82 | const IC_MAGIC_1784955224: i64 = 1784955224 |
| 83 | const IC_MAGIC_1784955875: i64 = 1784955875 |
| 84 | const IC_MAGIC_1784956205: i64 = 1784956205 |
| 85 | const IC_MAGIC_1784995126: i64 = 1784995126 |
| 86 | const IC_MAGIC_1784995721: i64 = 1784995721 |
| 87 | const IC_MAGIC_1784995947: i64 = 1784995947 |
| 88 | const IC_MAGIC_1784996406: i64 = 1784996406 |
| 89 | const IC_MAGIC_1784996558: i64 = 1784996558 |
| 90 | const IC_MAGIC_1785000800: i64 = 1785000800 |
| 91 | const IC_MAGIC_1784925304: i64 = 1784925304 |
| 92 | const IC_MAGIC_1784927702: i64 = 1784927702 |
| 93 | const IC_MAGIC_1784958766: i64 = 1784958766 |
| 94 | const IC_MAGIC_1784978119: i64 = 1784978119 |
| 95 | const IC_MAGIC_1784999221: i64 = 1784999221 |
| 96 | const IC_MAGIC_1785001189: i64 = 1785001189 |
| 97 | const IC_MAGIC_1785002038: i64 = 1785002038 |
| 98 | const IC_MAGIC_1024: i64 = 1024 |
| 99 | const IC_MAGIC_1784856230: i64 = 1784856230 |
| 100 | const IC_MAGIC_1784857155: i64 = 1784857155 |
| 101 | const IC_MAGIC_1784480242: i64 = 1784480242 |
| 102 | const IC_MAGIC_1784856346: i64 = 1784856346 |
| 103 | const IC_MAGIC_1785030820: i64 = 1785030820 |
| 104 | const IC_MAGIC_1785031111: i64 = 1785031111 |
| 105 | const IC_MAGIC_1784995429: i64 = 1784995429 |
| 106 | const IC_MAGIC_1784995511: i64 = 1784995511 |
| 107 | const IC_MAGIC_1784996221: i64 = 1784996221 |
| 108 | const IC_MAGIC_1785002845: i64 = 1785002845 |
| 109 | const IC_MAGIC_1785002909: i64 = 1785002909 |
| 110 | const IC_MAGIC_1785003511: i64 = 1785003511 |
| 111 | const IC_MAGIC_1785003779: i64 = 1785003779 |
| 112 | const IC_MAGIC_1785003935: i64 = 1785003935 |
| 113 | const IC_MAGIC_1785027945: i64 = 1785027945 |
| 114 | const IC_MAGIC_1784661149: i64 = 1784661149 |
| 115 | const IC_MAGIC_1784661346: i64 = 1784661346 |
| 116 | const IC_MAGIC_1784664001: i64 = 1784664001 |
| 117 | const IC_MAGIC_1785027242: i64 = 1785027242 |
| 118 | const IC_MAGIC_1784908046: i64 = 1784908046 |
| 119 | const IC_MAGIC_2048: i64 = 2048 |
| 120 | const IC_MAGIC_16384: i64 = 16384 |
| 124 | const IC_CAP: i64 = 4194304 |
| 127 | const IC_MAXROWS: i64 = 8192 |
| 128 | const IC_MAXTOK: i64 = 48 // tokens retained per row; long rows are informative in the head |
| 129 | const IC_DICT: i64 = 65536 // open-addressed dict slots; ~8x expected distinct tokens keeps probes short |
| 130 | const IC_POSTCAP: i64 = 393216 // IC_MAXROWS * IC_MAXTOK |
| 131 | const IC_TOKMIN: i64 = 3 // 1-2 char tokens carry no discriminative signal |
| 132 | const IC_TOKMAX: i64 = 64 |
| 133 | const IC_HMOD: i64 = 1000003 // keeps the rolling hash bounded and positive (no overflow reliance) |
| 137 | const IC_DF_PERMIL: i64 = 125 |
| 140 | const IC_SIM_JOIN: i64 = 380 |
| 141 | const IC_BAND_LO: i64 = 250 |
| 142 | const IC_BAND_HI: i64 = 500 |
| 154 | const IC_MINPTS: i64 = 1 |
| 166 | const IC_ANCHOR_DF_PERMIL: i64 = 80 |
| 167 | const IC_MINFAM: i64 = 2 |
| 191 | const IC_OVERLAP: i64 = 1 |
| 192 | const IC_ORGAN_CLAIM: i64 = 0 |
| 193 | const IC_SCOPE_FIRST: i64 = 0 |
| 194 | const IC_DENSE_ENABLED: i64 = 0 |
| 195 | const IC_DENSE_MIN: i64 = 700 |
| 196 | const IC_DENSE_TOPF: i64 = 64 |
| 197 | const IC_MERGE_PERMIL: i64 = 500 |
| 213 | const IC_MERGE_ENABLED: i64 = 0 // two rows describing one thing is already a family worth naming |
| 214 | const IC_MAXFAM: i64 = 8192 // <= IC_MAXROWS so the ranking array can always index every family |
| 217 | const IC_URGENT_BOOST: i64 = 1000000 |
| 220 | const IC_URGENT_SEV: i64 = 9 |
| 222 | const IC_EMIT: i64 = 8 |
| 223 | const IC_LABEL_TOKENS: i64 = 3 |
| 224 | const IC_IDS_PER_CLUSTER: i64 = 12 |
| 225 | const IC_OUTCAP: i64 = 262144 |
| 226 | const IC_LBUF: i64 = 512 // one cluster label ("tok|tok|tok"), reused per emitted family |
| 227 | const IC_WRMODE: i64 = 420 // 0644 |
| 228 | const IC_TAB: i64 = 9 |
| 229 | const IC_NL: i64 = 10 |
| 230 | const IC_DAY: i64 = 86400 |
| 231 | const IC_MODE_RUN: i64 = 0 |
| 232 | const IC_MODE_SELFTEST: i64 = 1 |
| 233 | const IC_MODE_PAGE: i64 = 2 |
| 234 | const IC_MODE_EVAL: i64 = 3 |
| 235 | const IC_GTMAX: i64 = 64 |
functions
| 237 | func ic_len(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i }
called by 1: ic_puts |
| 238 | func ic_puts(s: *u8) -> i64 { sys_write(1, s, ic_len(s)); return 0 } |
| 239 | func ic_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var o2: i64 = o; while s[i] != (0 as u8) { d[o2] = s[i]; o2 = o2 + 1; i = i + 1 } return o2 } |
| 240 | func ic_catn(d: *u8, o: i64, v: i64) -> i64 {
called by 1: main |
| 254 | func ic_catsl(d: *u8, o: i64, src: *u8, off: i64, len: i64) -> i64 {
called by 1: main |
| 260 | func ic_atoi(s: *u8) -> i64 {
called by 1: main |
| 271 | func ic_slice_num(q: *u8, off: i64, len: i64) -> i64 {
called by 1: ic_parse |
| 287 | func ic_log2q(x: i64) -> i64 {
called by 1: main |
| 311 | func ic_is_ident(q: *u8, off: i64, len: i64) -> i64 {
called by 1: ic_intern |
| 333 | func ic_file_exists(path: *u8) -> i64 {
called by 1: ic_try |
| 339 | func ic_try(pre: *u8, q: *u8, off: i64, len: i64, suf: *u8, scratch: *u8) -> i64 { |
| 353 | func ic_is_organ(q: *u8, off: i64, len: i64, scratch: *u8) -> i64 { |
| 364 | func ic_all_digits(q: *u8, off: i64, len: i64) -> i64 { |
| 374 | func ic_tokchar(c: i64) -> i64 {
called by 1: ic_parse |
| 382 | func ic_alnum(c: i64) -> i64 {
called by 1: ic_parse |
| 389 | func ic_slice_eq(q: *u8, a: i64, al: i64, b: i64, bl: i64) -> i64 { |
| 403 | func ic_hash(q: *u8, off: i64, len: i64) -> i64 {
called by 1: ic_intern |
| 416 | func ic_intern(q: *u8, off: i64, len: i64, dh: *i64) -> i64 { |
| 463 | func ic_gt_load(gtid: *i64, gtfam: *i64) -> i64 {
called by 1: main |
| 515 | func ic_in_fam(as1: *i64, as2: *i64, r: i64, c: i64) -> i64 { |
| 520 | func ic_share_fam(as1: *i64, as2: *i64, a: i64, b: i64) -> i64 { |
| 525 | func ic_find(par: *i64, x: i64) -> i64 {
called by 1: ic_union |
| 532 | func ic_union(par: *i64, a: i64, b: i64) -> i64 {
calls 1: ic_find |
| 551 | func ic_parse(q: *u8, n: i64, rmeta: *i64, rtok: *i64, dh: *i64, st: *i64) -> i64 { |
| 693 | func main(argc: i64, argv: *i64) -> i64 { |