code wiki / _hdl_build / nx_debtcluster.nx

nx_debtcluster.nx

buildroot/runtime/_hdl_build/nx_debtcluster.nx

102026 B1726 linesdepth 5pulls 10 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_store_seed_lib.nx nx_ppmi_lib.nx nx_debtcluster.nx

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

main ic_puts ic_len ic_atoi ic_cat sts_load_honest ss_open_cached ssc_init sys_mmap ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_cat ↻ ss_loadfile sys_map_file ss_readall ss_load_aux2 sys_mmap ↻ ss_cat ↻ ss_loadfile ↻ ss_r32 sys_munmap ssl_total_keys ss_r32 ↻ ssl_pow2 ssl_build ss_r32 ↻ ssl_hash_entry ssl_key_eq ss_r32 ↻ ssl_lookup ssl_hash_entry ↻ ssl_key_eq ↻ ss_manifest_free

structs

none

consts

76const IC_MAGIC_1784947125: i64 = 1784947125
77const IC_MAGIC_1784947134: i64 = 1784947134
78const IC_MAGIC_1784947786: i64 = 1784947786
79const IC_MAGIC_1784951793: i64 = 1784951793
80const IC_MAGIC_1784952157: i64 = 1784952157
81const IC_MAGIC_1784954507: i64 = 1784954507
82const IC_MAGIC_1784955224: i64 = 1784955224
83const IC_MAGIC_1784955875: i64 = 1784955875
84const IC_MAGIC_1784956205: i64 = 1784956205
85const IC_MAGIC_1784995126: i64 = 1784995126
86const IC_MAGIC_1784995721: i64 = 1784995721
87const IC_MAGIC_1784995947: i64 = 1784995947
88const IC_MAGIC_1784996406: i64 = 1784996406
89const IC_MAGIC_1784996558: i64 = 1784996558
90const IC_MAGIC_1785000800: i64 = 1785000800
91const IC_MAGIC_1784925304: i64 = 1784925304
92const IC_MAGIC_1784927702: i64 = 1784927702
93const IC_MAGIC_1784958766: i64 = 1784958766
94const IC_MAGIC_1784978119: i64 = 1784978119
95const IC_MAGIC_1784999221: i64 = 1784999221
96const IC_MAGIC_1785001189: i64 = 1785001189
97const IC_MAGIC_1785002038: i64 = 1785002038
98const IC_MAGIC_1024: i64 = 1024
99const IC_MAGIC_1784856230: i64 = 1784856230
100const IC_MAGIC_1784857155: i64 = 1784857155
101const IC_MAGIC_1784480242: i64 = 1784480242
102const IC_MAGIC_1784856346: i64 = 1784856346
103const IC_MAGIC_1785030820: i64 = 1785030820
104const IC_MAGIC_1785031111: i64 = 1785031111
105const IC_MAGIC_1784995429: i64 = 1784995429
106const IC_MAGIC_1784995511: i64 = 1784995511
107const IC_MAGIC_1784996221: i64 = 1784996221
108const IC_MAGIC_1785002845: i64 = 1785002845
109const IC_MAGIC_1785002909: i64 = 1785002909
110const IC_MAGIC_1785003511: i64 = 1785003511
111const IC_MAGIC_1785003779: i64 = 1785003779
112const IC_MAGIC_1785003935: i64 = 1785003935
113const IC_MAGIC_1785027945: i64 = 1785027945
114const IC_MAGIC_1784661149: i64 = 1784661149
115const IC_MAGIC_1784661346: i64 = 1784661346
116const IC_MAGIC_1784664001: i64 = 1784664001
117const IC_MAGIC_1785027242: i64 = 1785027242
118const IC_MAGIC_1784908046: i64 = 1784908046
119const IC_MAGIC_2048: i64 = 2048
120const IC_MAGIC_16384: i64 = 16384
124const IC_CAP: i64 = 4194304
127const IC_MAXROWS: i64 = 8192
128const IC_MAXTOK: i64 = 48 // tokens retained per row; long rows are informative in the head
129const IC_DICT: i64 = 65536 // open-addressed dict slots; ~8x expected distinct tokens keeps probes short
130const IC_POSTCAP: i64 = 393216 // IC_MAXROWS * IC_MAXTOK
131const IC_TOKMIN: i64 = 3 // 1-2 char tokens carry no discriminative signal
132const IC_TOKMAX: i64 = 64
133const IC_HMOD: i64 = 1000003 // keeps the rolling hash bounded and positive (no overflow reliance)
137const IC_DF_PERMIL: i64 = 125
140const IC_SIM_JOIN: i64 = 380
141const IC_BAND_LO: i64 = 250
142const IC_BAND_HI: i64 = 500
154const IC_MINPTS: i64 = 1
166const IC_ANCHOR_DF_PERMIL: i64 = 80
167const IC_MINFAM: i64 = 2
191const IC_OVERLAP: i64 = 1
192const IC_ORGAN_CLAIM: i64 = 0
193const IC_SCOPE_FIRST: i64 = 0
194const IC_DENSE_ENABLED: i64 = 0
195const IC_DENSE_MIN: i64 = 700
196const IC_DENSE_TOPF: i64 = 64
197const IC_MERGE_PERMIL: i64 = 500
213const IC_MERGE_ENABLED: i64 = 0 // two rows describing one thing is already a family worth naming
214const IC_MAXFAM: i64 = 8192 // <= IC_MAXROWS so the ranking array can always index every family
217const IC_URGENT_BOOST: i64 = 1000000
220const IC_URGENT_SEV: i64 = 9
222const IC_EMIT: i64 = 8
223const IC_LABEL_TOKENS: i64 = 3
224const IC_IDS_PER_CLUSTER: i64 = 12
225const IC_OUTCAP: i64 = 262144
226const IC_LBUF: i64 = 512 // one cluster label ("tok|tok|tok"), reused per emitted family
227const IC_WRMODE: i64 = 420 // 0644
228const IC_TAB: i64 = 9
229const IC_NL: i64 = 10
230const IC_DAY: i64 = 86400
231const IC_MODE_RUN: i64 = 0
232const IC_MODE_SELFTEST: i64 = 1
233const IC_MODE_PAGE: i64 = 2
234const IC_MODE_EVAL: i64 = 3
235const IC_GTMAX: i64 = 64

functions

237func 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
238func ic_puts(s: *u8) -> i64 { sys_write(1, s, ic_len(s)); return 0 }
called by 1: main calls 1: ic_len
239func 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 }
called by 2: ic_trymain
240func ic_catn(d: *u8, o: i64, v: i64) -> i64 {
called by 1: main
254func ic_catsl(d: *u8, o: i64, src: *u8, off: i64, len: i64) -> i64 {
called by 1: main
260func ic_atoi(s: *u8) -> i64 {
called by 1: main
271func ic_slice_num(q: *u8, off: i64, len: i64) -> i64 {
called by 1: ic_parse
287func ic_log2q(x: i64) -> i64 {
called by 1: main
311func ic_is_ident(q: *u8, off: i64, len: i64) -> i64 {
called by 1: ic_intern
333func ic_file_exists(path: *u8) -> i64 {
called by 1: ic_try
339func ic_try(pre: *u8, q: *u8, off: i64, len: i64, suf: *u8, scratch: *u8) -> i64 {
called by 1: ic_is_organ calls 2: ic_catic_file_exists
353func ic_is_organ(q: *u8, off: i64, len: i64, scratch: *u8) -> i64 {
called by 1: main calls 1: ic_try
364func ic_all_digits(q: *u8, off: i64, len: i64) -> i64 {
called by 2: ic_parsemain
374func ic_tokchar(c: i64) -> i64 {
called by 1: ic_parse
382func ic_alnum(c: i64) -> i64 {
called by 1: ic_parse
389func ic_slice_eq(q: *u8, a: i64, al: i64, b: i64, bl: i64) -> i64 {
called by 2: ic_internmain
403func ic_hash(q: *u8, off: i64, len: i64) -> i64 {
called by 1: ic_intern
416func ic_intern(q: *u8, off: i64, len: i64, dh: *i64) -> i64 {
463func ic_gt_load(gtid: *i64, gtfam: *i64) -> i64 {
called by 1: main
515func ic_in_fam(as1: *i64, as2: *i64, r: i64, c: i64) -> i64 {
called by 2: ic_share_fammain
520func ic_share_fam(as1: *i64, as2: *i64, a: i64, b: i64) -> i64 {
called by 1: main calls 1: ic_in_fam
525func ic_find(par: *i64, x: i64) -> i64 {
called by 1: ic_union
532func ic_union(par: *i64, a: i64, b: i64) -> i64 {
calls 1: ic_find
551func ic_parse(q: *u8, n: i64, rmeta: *i64, rtok: *i64, dh: *i64, st: *i64) -> i64 {
693func main(argc: i64, argv: *i64) -> i64 {