code wiki / _hdl_build / nx_pm_board.nx

nx_pm_board.nx

buildroot/runtime/_hdl_build/nx_pm_board.nx

37707 B697 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind tooltopic pm
docsdependenciesstructsconstsfunctions

about

nx_pm_board.nx -- THE PM DASHBOARD (operator 2026-07-18: "the pm to give us based on my executive, management, and operations layer a dashboard and feedback ... oversight into what work is happening and the return on investment ... with non fake numbers but real estimates"). THREE LAYERS, all DERIVED from the sovereign planes (never asserted): executive : frontier done/total + open-debt posture + sev>=7 incidents + maturity permil (read from the rollup's durable log; unreadable -> -1 flagged, never invented) management: per RACI lane (raci- plane): open debts / open work / ready frontier rows owned by R operations: mutation activity per plane (hist row counts = provenanced writes = the real work log) roi : NON-FAKE BY CONSTRUCTION -- measured counts (debts closed, work closed, frontier done, plane mutations) + assumption rows from the roi- plane {id metric value basis note}; derived figures computed ONLY from rows whose basis != SET-ME; SET-ME rows are emitted under needs_decision (feedback TO the executive) instead of being faked. nx_pm_board [frontierpfx] [debtpfx] [workpfx] [racipfx] [roipfx] -> JSON on stdout Debt rows are schema-aware per row (legacy epoch 5-col sev@1 vs v2 7-col sev@2/status@3/owner@4). ROI rows are schema-aware the SAME way (legacy 5-col value@2/basis@3 vs v2 6-col qty@3*cents@4/basis@5). Fixed 2026-08-06 per debt 1786036195: v2 rows read on the legacy ordinals parsed the src STRING as the value, so this board reported the entire ROI floor as 0 while nx_pm_cockpit read the same plane right. The plane holds BOTH shapes; discriminate per row by column count, never by a global assumption. Fail-closed: unseeded frontier or debt plane -> error exit (no dashboard over missing data). license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 5 imports · 0 importers

nx_store_seed_lib.nx nx_seg_store.nx nx_deploy_lib.nx nx_syscalls.nx nx_evprofile_lib.nx nx_pm_board.nx

imports: nx_store_seed_lib.nxnx_seg_store.nxnx_deploy_lib.nxnx_syscalls.nxnx_evprofile_lib.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 nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sts_load_fit sts_mm sys_mmap ↻ sts_werr sys_write ↻ sys_exit ↻ sts_load sts_gen_note sts_pfxhash ss_max_segid sys_mmap ↻ ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ss_segid_ok ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat ↻

structs

none

consts

36const PB_SLACK_PAGE: i64 = 4096
37const PB_ID_PUNCT: i64 = 3 // an emitted id costs at most: open quote + close quote + separating comma
39const PB_CAP: i64 = 33554432 // 2026-08-06 MEASURED by nx_planefit: knowledge/store/debt- loads to 4,396,892B. At the old 1 MiB this organ silently lost 3,348,316B = 76% of the board, and because AN APPEND-ONLY PLANE PAST A PREFIX CAP LOSES ITS NEWEST ROWS FIRST it was reporting on the OLDEST quarter -- degrading exactly as new work arrived. 32 MiB matches nx_debt DB_CAP sizing. Re-verify: nx_planefit knowledge/store/debt- 33554432
40const PB_OUT: i64 = 262144
41const PB_NL: i64 = 10
42const PB_TAB: i64 = 9
43const PB_MAXCOL: i64 = 16
44const PB_PAIR: i64 = 2
45const PB_SPB: i64 = 256
46const PB_STDERR: i64 = 2
47const PB_EXIT_IO: i64 = 1
48const PB_ZERO: i64 = 48
49const PB_NINE: i64 = 57
50const PB_B10: i64 = 10
51const PB_MAXLANE: i64 = 24
52const PB_INCSEV: i64 = 7
159const PB_CMP_LIST: *u8 = "buildroot/knowledge/compare/regen.list"
160const PB_CMP_LISTCAP: i64 = 262144 // regen.list measures under 1 KB; brim ANNOUNCES rather than truncating
161const PB_CMP_PATHCAP: i64 = 512
162const PB_CMP_DOMCAP: i64 = 128
163const PB_CMP_BUCKETS: i64 = 11
183const PB_CB_CLAIM: i64 = 0 // gates_ran == 0 -> WRITE a .gates map for this domain
184const PB_CB_GATEFAIL: i64 = 1 // ran-green-skipped > 0 -> FIX the gate the map already names
185const PB_CB_UNGROUNDED: i64 = 2 // ungrounded > 0 -> REPOINT a row whose symbol is absent
186const PB_CB_FLIP: i64 = 3 // landed > 0 -> free: a pure data edit flips the cell
187const PB_CB_UNNAMED: i64 = 4 // absent_bare > 0 -> a gap that names no build contract
188const PB_CB_VACUOUS: i64 = 5 // vacuous > 0 -> a GREEN on a zero denominator
189const PB_CB_STALE: i64 = 6 // epoch older than the evidence TTL
190const PB_CB_LEAK: i64 = 7 // the stamp's AXIS partition does not sum
191const PB_CB_GATESKIP: i64 = 8 // skipped > 0 -> a gate ABSTAINED: READ why, do not fix
192const PB_CB_GATEUNK: i64 = 9 // green<ran, skipped absent -> the stamp cannot say which; go look
193const PB_CB_GATELEAK: i64 = 10 // the stamp's GATE partition does not sum (green+skipped > ran)

functions

54func pb_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
55func pb_werr(s: *u8) -> i64 { sys_write(PB_STDERR, s, pb_slen(s)); return 0 }
called by 1: main calls 2: sys_writepb_slen
56func pb_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64
called by 2: pb_legacymain
71func pb_int(q: *u8, a: i64, b: i64) -> i64
called by 2: pb_maturitymain
77func pb_sl_eq(q: *u8, a: i64, b: i64, s: *u8) -> i64
called by 1: main calls 1: pb_slen
84func pb_sl_eq2(q: *u8, a: i64, b: i64, r: *u8, c: i64, d: i64) -> i64
called by 1: main
90func pb_legacy(q: *u8, ls: i64, le: i64, sp: *i64) -> i64
called by 1: main calls 1: pb_cols
97func pb_lines(q: *u8, n: i64) -> i64 { var k: i64 = 0; var i: i64 = 0; while i < n { if q[i] == (PB_NL as u8) { k = k + 1 } i = i + 1 } return k }
called by 2: pb_comparemain
99func pb_raw(d: *u8, o: i64, q: *u8, a: i64, b: i64) -> i64
called by 2: pb_cmp_emitmain
105func pb_esc(d: *u8, o: i64, q: *u8, a: i64, b: i64) -> i64
called by 1: main
120func pb_maturity() -> i64
called by 1: main calls 4: sys_mmapdp_readpb_slenpb_int
195func pb_cmp_push(b: *u8, off: *i64, cnt: *i64, k: i64, slice: i64, dom: *u8) -> i64
called by 1: pb_compare
208func pb_cmp_emit(out: *u8, o0: i64, key: *u8, b: *u8, off: *i64, k: i64, slice: i64) -> i64
called by 1: pb_compare calls 2: ss_catpb_raw
217func pb_compare(out: *u8, o0: i64) -> i64
399func main(argc: i64, argv: *i64) -> i64