code wiki / _hdl_build / nx_frontier_board.nx

nx_frontier_board.nx

buildroot/runtime/_hdl_build/nx_frontier_board.nx

22717 B491 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tooltopic frontier
docsdependenciesstructsconstsfunctions

about

nx_frontier_board.nx -- F-202: the FRONTIER BOARD / CPM engine (operator 2026-07-17: "get us to mcp and api and workstreams and tools and agents ... we should use tsv"; TSV col3 = dur -> "computes ES/EF/LS/LF, total float, and the critical path FROM this single source; float is DERIVED, never stored"). Reads the 9-col frontier_queue.tsv (id title w dur owner status deps milestone lane), runs a forward/backward CPM pass over the dependency DAG, derives DONE/READY/BLOCKED/ EXTERNAL, and EMITS machine-readable JSON (the interchange for the API route, the MCP tool, and agents) or an HTML board -- big-rocks-first. argv[1] = queue path (default knowledge/registry/frontier_queue.tsv) argv[FB_IDX_MODE] = mode "json"(default->stdout) | "html"(->argv[FB_IDX_OUT] or stdout) Column/dep semantics MIRROR nx_frontier.nx byte-for-byte so the board never disagrees. INPUT (store-law): reads the SOVEREIGN seg-store (knowledge/store/frontier-) by default via frs_load; a .tsv path may be passed as argv[1] for staging/gate fixtures only. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_frontier_store.nx nx_syscalls.nx nx_frontier_board.nx

imports: nx_frontier_store.nxnx_syscalls.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 frs_load sts_load 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_cat ↻ ss_loadfile ss_load_aux2 ssl_total_keys ssl_pow2 ssl_build ss_r32 ssl_lookup ss_manifest_free sys_munmap ssc_retire_handle sts_mm sys_mmap ↻ sts_werr sys_write sys_exit ss_hget sys_mmap ↻ ss_idx_find ss_r32 ↻ ss_len ss_kcmp sts_atoi sts_rowkey ss_catn

structs

none

consts

18const FB_TAB: i64 = 9
19const FB_NL: i64 = 10
20const FB_HASH: i64 = 35
21const FB_DASH: i64 = 45
22const FB_COMMA: i64 = 44
23const FB_D: i64 = 68
24const FB_X: i64 = 88
25const FB_ZERO: i64 = 48
26const FB_NINE: i64 = 57
27const FB_HTMLH: i64 = 104
28const FB_S: i64 = 115 // 's' of "store" -- argv[1] source selector
29const FB_QCAP: i64 = 1048576
30const FB_OUTCAP: i64 = 262144
31const FB_MAXN: i64 = 1024 // envelope: raised 256->1024 (seq639; store was 491 rows and the old cap silently dropped 235)
32const FB_EMIT_READY: i64 = 80 // DECLARED emit envelope: top-N ready by weight
33const FB_EMIT_BLK: i64 = 80 // DECLARED emit envelope: blocked rows
34const FB_EMIT_TASKS: i64 = 260 // DECLARED emit envelope: CPM task rows
35const FB_TITLE_MAX: i64 = 140 // per-title emit bound -- long titles blew the 64KiB tools/call cap
36const FB_I64: i64 = 8 // sizeof(i64) -- array element / pointer-slot stride
37const FB_NCOL: i64 = 9 // the TSV has exactly 9 tab-separated columns
38const FB_PAIR: i64 = 2 // fb_cols stores each column as a (start,end) pair
39const FB_SP_BYTES: i64 = 160 // scratch for the 9 (start,end) column pairs
40const FB_TMP_BYTES: i64 = 28 // fb_puti decimal scratch
41const FB_U_BYTES: i64 = 16 // first-unmet (start,end) out slot
42const FB_WMAX: i64 = 9 // top weight bucket (big-rocks-first scan)
43const FB_MODE: i64 = 0x1a4 // 0644 -- html output file perms
44const FB_QSLACK: i64 = 16 // read cap headroom under FB_QCAP
45const FB_STDERR: i64 = 2 // stderr fd
46const FB_BASE10: i64 = 10 // decimal base for int<->string
48const FB_EXT: i64 = 0 // external-blocked (status X)
49const FB_DONE: i64 = 1 // done (status D)
50const FB_READY: i64 = 2 // todo, all deps done
51const FB_BLK: i64 = 3 // todo, a dep unmet
53const FB_IDX_MODE: i64 = 2 // argv[FB_IDX_MODE] = mode
54const FB_IDX_OUT: i64 = 3 // argv[FB_IDX_OUT] = html out path
55const FB_ARGC_MODE: i64 = 3 // >= this -> mode arg present
56const FB_ARGC_OUT: i64 = 4 // >= this -> out-path arg present
58const COL_ID_A: i64 = 0
59const COL_ID_B: i64 = 1
60const COL_TITLE_A: i64 = 2
61const COL_TITLE_B: i64 = 3
62const COL_W_A: i64 = 4
63const COL_W_B: i64 = 5
64const COL_DUR_A: i64 = 6
65const COL_DUR_B: i64 = 7
66const COL_OWN_A: i64 = 8
67const COL_OWN_B: i64 = 9
68const COL_STAT_A: i64 = 10
69const COL_DEP_A: i64 = 12
70const COL_DEP_B: i64 = 13
71const COL_LANE_A: i64 = 16
72const COL_LANE_B: i64 = 17

functions

74func fb_puts(buf: *u8, off: i64, s: *u8) -> i64
called by 1: main
80func fb_werr(s: *u8) -> i64
called by 1: main calls 1: sys_write
86func fb_putsl(buf: *u8, off: i64, q: *u8, a: i64, b: i64) -> i64
called by 2: fb_puttitlemain
92func fb_puttitle(buf: *u8, off: i64, q: *u8, a: i64, b: i64) -> i64
called by 1: main calls 1: fb_putsl
97func fb_puti(buf: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
109func fb_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
123func fb_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64
called by 1: main
138func fb_slice_eq(q: *u8, s: i64, e: i64, bs: i64, be: i64) -> i64
called by 1: fb_resolve
144func fb_slice_int(q: *u8, a: i64, b: i64) -> i64
called by 1: main
155func fb_resolve(q: *u8, ida: *i64, idb: *i64, n: i64, da: i64, db: i64) -> i64
161func fb_dep_maxef(q: *u8, a: i64, b: i64, ida: *i64, idb: *i64, n: i64, efv: *i64) -> i64
called by 1: main calls 1: fb_resolve
175func fb_has_dep_on(q: *u8, a: i64, b: i64, ida: *i64, idb: *i64, n: i64, target: i64) -> i64
called by 1: main calls 1: fb_resolve
188func fb_first_unmet(q: *u8, a: i64, b: i64, ida: *i64, idb: *i64, n: i64, statv: *i64, u: *i64) -> i64
called by 2: fb_classmain calls 1: fb_resolve
205func fb_class(q: *u8, i: i64, depa: *i64, depb: *i64, ida: *i64, idb: *i64, n: i64, statv: *i64) -> i64
called by 1: main calls 2: sys_mmapfb_first_unmet
214func main(argc: i64, argv: *i64) -> i64