code wiki / _hdl_build / nx_arch_board.nx
nx_arch_board.nx
buildroot/runtime/_hdl_build/nx_arch_board.nx
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
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
structs
| none |
consts
| 22 | const AB_MAGIC_2166136261: i64 = 2166136261 |
| 23 | const AB_MAGIC_16777619: i64 = 16777619 |
| 24 | const AB_MAGIC_4611686018427387903: i64 = 4611686018427387903 |
| 25 | const AB_MAGIC_4294967295: i64 = 4294967295 |
| 26 | const AB_MAGIC_65536: i64 = 65536 |
| 27 | const AB_MAGIC_12345: i64 = 12345 |
| 28 | const AB_MAGIC_99999: i64 = 99999 |
| 29 | const AB_MAGIC_262144: i64 = 262144 |
| 30 | const AB_MAGIC_1000003: i64 = 1000003 |
| 31 | const AB_MAGIC_131072: i64 = 131072 |
| 32 | const AB_MAGIC_16384: i64 = 16384 |
| 33 | const AB_MAGIC_1048576: i64 = 1048576 |
| 35 | const AB_ZSLOTS: i64 = 65536 |
| 36 | const AB_ZARENA: i64 = 2097152 |
| 37 | const AB_OUTCAP: i64 = 1048576 |
| 38 | const AB_MAXROW: i64 = 32 |
| 40 | const AB_PASS: i64 = 1 |
| 41 | const AB_RED: i64 = 2 |
| 42 | const AB_NOTICE: i64 = 3 |
| 44 | const MV_CYCLES: i64 = 0 |
| 45 | const MV_AVGDEP: i64 = 1 |
| 46 | const MV_FANIN: i64 = 2 |
| 47 | const MV_VIS: i64 = 3 |
| 48 | const MV_VAL: i64 = 4 |
| 49 | const MV_ISL: i64 = 5 |
| 50 | const MV_DUP: i64 = 6 |
| 51 | const MV_PLACE: i64 = 7 |
| 52 | const MV_BASEH: i64 = 8 |
| 53 | const MV_ISLU: i64 = 9 |
| 54 | const MV_DP: i64 = 10 |
| 55 | const MV_N: i64 = 11 |
functions
| 57 | func 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 } |
| 58 | func ab_pn(v: i64) -> i64 |
| 65 | func ab_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 66 | func 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 |
| 68 | func ab_memeq_s(a: *u8, ao: i64, al: i64, b: *u8) -> i64 called by 1: ab_resolve |
| 75 | func ab_ends(a: *u8, o: i64, l: i64, suf: *u8) -> i64 |
| 83 | func 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 } |
| 84 | func ab_bappn(b: *u8, pos: i64, v: i64) -> i64 |
| 93 | func 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 } |
| 95 | func ab_read_small(path: *u8, buf: *u8, cap: i64) -> i64 |
| 104 | func ab_write_file(path: *u8, buf: *u8, len: i64) -> i64 |
| 112 | func ab_fnv(buf: *u8, len: i64) -> i64 called by 1: ab_run |
| 119 | func ab_find(buf: *u8, blen: i64, key: *u8) -> i64 |
| 133 | func ab_num_at(buf: *u8, blen: i64, pos: i64) -> i64 |
| 146 | func ab_num_after(buf: *u8, blen: i64, key: *u8) -> i64 { return ab_num_at(buf, blen, ab_find(buf, blen, key)) } |
| 150 | func ab_store_get(key: *u8, lenout: *i64) -> *u8 |
| 158 | func ab_store_put(key: *u8, val: *u8, vlen: i64) -> i64 |
| 166 | func ab_contains(hay: *u8, ho: i64, hl: i64, pat: *u8, po: i64, pl: i64) -> i64 called by 1: ab_islands_unexplained |
| 180 | func ab_islands_unexplained(ibuf: *u8, ilen: i64, tbuf: *u8, tlen: i64) -> i64 |
| 233 | func ab_exec_capture(bin: *u8, a1: *u8, a2: *u8, outpath: *u8) -> i64 |
| 260 | func 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 } |
| 262 | func abz_insert(zoff: *i64, zzone: *i64, zlen: *i64, arena: *u8, aused: *i64, src: *u8, so: i64, sl: i64, zone: i64) -> i64 |
| 287 | func abz_get(zoff: *i64, zzone: *i64, zlen: *i64, arena: *u8, src: *u8, so: i64, sl: i64) -> i64 |
| 305 | func ab_scan_dir(dir: *u8, zone: i64, zoff: *i64, zzone: *i64, zlen: *i64, arena: *u8, aused: *i64, ambig: *i64) -> i64 called by 2: ab_runab_worklist calls 7: sys_openat_rdsys_mmapsys_getdents64ab_endsabz_insertsys_close+1 |
| 342 | func ab_verdict(dir: i64, tgt: i64, hasbl: i64, bl: i64, cur: i64) -> i64 |
| 350 | func ab_limit(dir: i64, tgt: i64, hasbl: i64, bl: i64) -> i64 called by 1: ab_run |
| 356 | func ab_gate() -> i64 |
| 386 | func ab_resolve(name: *u8, no: i64, nl: i64) -> i64 |
| 400 | func 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 |
| 403 | func ab_bl_get(bbuf: *u8, blen: i64, name: *u8, no: i64, nl: i64, out: *i64) -> i64 |
| 430 | func ab_run(store: *u8, coredir: *u8, organdir: *u8, do_bank: i64) -> i64 |
| 748 | func ab_worklist(store: *u8, coredir: *u8, organdir: *u8) -> i64 |
| 817 | func main(argc: i64, argv: *i64) -> i64 |