code wiki / _hdl_build / nx_arch_board.nx

nx_arch_board.nx

buildroot/runtime/_hdl_build/nx_arch_board.nx

45843 B870 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_arch_board.nx -- THE TEAM'S STANDING JUDGMENT OF THE FAMILY TREE (operator 2026-07-16: "get the nishi team and architect and builder and pm and all that logically evaluating our family tree and making sure we are doing state of the art architecture"). This is the ARCH DRIFT RATCHET rung (mom 13) of the ecosystem-design review, built as a COMPOSER: it fork+execs the existing sovereign instruments (small sharp tools -> curated capability, per the mcp-coverage doctrine) and adds the two metrics no instrument carried (visibility violations = rung mom-29; validation depth = rung mom-22; base-change advisory = rung mom-3). Every metric row is DATA-DRIVEN (knowledge/registry/arch_policy.data: metric|role|weight| direction|target) and RATCHETED against a banked baseline (knowledge/registry/arch_baseline.data): improvements tighten the limit automatically, so erosion can never be silent -- limit = min(target, baseline) for `le` metrics, max for `ge`. Each row is attributed to the accountable ROLE (architect/ janitor/examiner/...), and the failing rows sorted by momentum-weight ARE the PM's ranked worklist. Composes (never rebuilds): nx_eco_graph_arch (cycles/propagation/fan-in) + nx_dup_detect (fused dup clusters) + nx_eco_rooted_set (islands) + nx_capability_placement (RACI placement violations). nx_arch_board gate -- adversarial self-test of the ratchet verdict nx_arch_board run <store-prefix> [core-dir] [organ-dir] -- judge; exit 0 GREEN / 1 RED nx_arch_board bank <store-prefix> [core-dir] [organ-dir] -- judge + bank baseline (refuses on any instrument failure -- never bank a broken measurement) license_tier: ORIGINAL module: nishi-core.architect.arch_board

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_eco_graph.nx nx_seg_store.nx nx_arch_board.nx

imports: nx_syscalls.nxnx_eco_graph.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap sys_readlinkat sys_mmap ↻ sys_munmap sys_chdir sys_mmap ↻ ab_gate ab_p sys_write ab_verdict ab_store_put ss_begin ss_begin_cap sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ss_next_segid sys_mmap ↻ ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ss_segid_ok ss_commit ss_segid_ok ↻ sys_mmap ↻ ss_cat ↻ ss_catn sys_mmap ↻ sys_write ↻ ss_write_seg ss_segid_ok ↻ sys_mmap ↻ ss_cat ↻

structs

none

consts

22const AB_MAGIC_2166136261: i64 = 2166136261
23const AB_MAGIC_16777619: i64 = 16777619
24const AB_MAGIC_4611686018427387903: i64 = 4611686018427387903
25const AB_MAGIC_4294967295: i64 = 4294967295
26const AB_MAGIC_65536: i64 = 65536
27const AB_MAGIC_12345: i64 = 12345
28const AB_MAGIC_99999: i64 = 99999
29const AB_MAGIC_262144: i64 = 262144
30const AB_MAGIC_1000003: i64 = 1000003
31const AB_MAGIC_131072: i64 = 131072
32const AB_MAGIC_16384: i64 = 16384
33const AB_MAGIC_1048576: i64 = 1048576
35const AB_ZSLOTS: i64 = 65536
36const AB_ZARENA: i64 = 2097152
37const AB_OUTCAP: i64 = 1048576
38const AB_MAXROW: i64 = 32
40const AB_PASS: i64 = 1
41const AB_RED: i64 = 2
42const AB_NOTICE: i64 = 3
44const MV_CYCLES: i64 = 0
45const MV_AVGDEP: i64 = 1
46const MV_FANIN: i64 = 2
47const MV_VIS: i64 = 3
48const MV_VAL: i64 = 4
49const MV_ISL: i64 = 5
50const MV_DUP: i64 = 6
51const MV_PLACE: i64 = 7
52const MV_BASEH: i64 = 8
53const MV_ISLU: i64 = 9
54const MV_DP: i64 = 10
55const MV_N: i64 = 11

functions

57func ab_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
58func ab_pn(v: i64) -> i64
65func ab_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: ab_endsab_find
66func ab_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
called by 1: main
68func ab_memeq_s(a: *u8, ao: i64, al: i64, b: *u8) -> i64
called by 1: ab_resolve
75func ab_ends(a: *u8, o: i64, l: i64, suf: *u8) -> i64
83func ab_bapp(b: *u8, pos: i64, s: *u8) -> i64 { var p: i64 = pos; var i: i64 = 0; while s[i] != (0 as u8) { b[p] = s[i]; p = p + 1; i = i + 1 } return p }
called by 2: ab_runab_worklist
84func ab_bappn(b: *u8, pos: i64, v: i64) -> i64
93func ab_bappb(b: *u8, pos: i64, src: *u8, o: i64, l: i64) -> i64 { var p: i64 = pos; var i: i64 = 0; while i < l { b[p] = src[o+i]; p = p + 1; i = i + 1 } return p }
called by 2: ab_runab_worklist
95func ab_read_small(path: *u8, buf: *u8, cap: i64) -> i64
104func ab_write_file(path: *u8, buf: *u8, len: i64) -> i64
112func ab_fnv(buf: *u8, len: i64) -> i64
called by 1: ab_run
119func ab_find(buf: *u8, blen: i64, key: *u8) -> i64
called by 2: ab_num_afterab_run calls 1: ab_slen
133func ab_num_at(buf: *u8, blen: i64, pos: i64) -> i64
146func ab_num_after(buf: *u8, blen: i64, key: *u8) -> i64 { return ab_num_at(buf, blen, ab_find(buf, blen, key)) }
called by 1: ab_run calls 2: ab_num_atab_find
150func ab_store_get(key: *u8, lenout: *i64) -> *u8
called by 3: ab_gateab_runmain calls 2: sys_mmapss_get
158func ab_store_put(key: *u8, val: *u8, vlen: i64) -> i64
166func ab_contains(hay: *u8, ho: i64, hl: i64, pat: *u8, po: i64, pl: i64) -> i64
180func ab_islands_unexplained(ibuf: *u8, ilen: i64, tbuf: *u8, tlen: i64) -> i64
called by 1: ab_run calls 3: ab_containsab_psys_write
233func ab_exec_capture(bin: *u8, a1: *u8, a2: *u8, outpath: *u8) -> i64
260func abz_hash(s: *u8, o: i64, l: i64) -> i64 { var h: i64 = AB_MAGIC_2166136261; var i: i64 = 0; while i < l { h = h ^ (s[o+i] as i64); h = (h * AB_MAGIC_16777619) & AB_MAGIC_4294967295; i = i + 1 } return h }
called by 2: abz_insertabz_get
262func abz_insert(zoff: *i64, zzone: *i64, zlen: *i64, arena: *u8, aused: *i64, src: *u8, so: i64, sl: i64, zone: i64) -> i64
called by 1: ab_scan_dir calls 1: abz_hash
287func abz_get(zoff: *i64, zzone: *i64, zlen: *i64, arena: *u8, src: *u8, so: i64, sl: i64) -> i64
called by 2: ab_runab_worklist calls 1: abz_hash
305func ab_scan_dir(dir: *u8, zone: i64, zoff: *i64, zzone: *i64, zlen: *i64, arena: *u8, aused: *i64, ambig: *i64) -> i64
342func ab_verdict(dir: i64, tgt: i64, hasbl: i64, bl: i64, cur: i64) -> i64
called by 2: ab_gateab_run
350func ab_limit(dir: i64, tgt: i64, hasbl: i64, bl: i64) -> i64
called by 1: ab_run
356func ab_gate() -> i64
386func ab_resolve(name: *u8, no: i64, nl: i64) -> i64
called by 1: ab_run calls 1: ab_memeq_s
400func ab_vname(v: i64) -> *u8 { if v == AB_PASS { return "PASS" as *u8 } if v == AB_NOTICE { return "NOTICE" as *u8 } return "RED" as *u8 }
called by 1: ab_run
403func ab_bl_get(bbuf: *u8, blen: i64, name: *u8, no: i64, nl: i64, out: *i64) -> i64
called by 1: ab_run calls 1: ab_num_at
430func ab_run(store: *u8, coredir: *u8, organdir: *u8, do_bank: i64) -> i64
748func ab_worklist(store: *u8, coredir: *u8, organdir: *u8) -> i64
817func main(argc: i64, argv: *i64) -> i64