code wiki / _hdl_build / nx_ws_active_board.nx

nx_ws_active_board.nx

buildroot/runtime/_hdl_build/nx_ws_active_board.nx

11236 B262 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic ws
docsdependenciesstructsconstsfunctions

about

nx_ws_active_board.nx -- the HONEST live workstream board, re-derived from the WORKLOG. WHY: nx_ws_board renders the WMS-R1 registry SSOT, whose per-stream `state` was frozen at populate-time and was never wired to live work -- so it reports active=3 while the real work touched ~70 workstreams in the last days. The registry is also a DIFFERENT id-space (queue ids) than the live project-*.md workstreams, so it cannot see them at all. The LIVE source of truth for "what are we actually working on" is the worklog: every tool action appends one line <epoch>\t<event>\t<tool>\t<target> where <target> for a workstream edit is .../project-<NAME>.md. This organ derives the active set straight from that log: distinct workstreams, last-touch epoch, edit count, ALIVE within a window. ADDITIVE + SAFE: it READS the worklog and the registry SSOT is NEVER touched (no ws_put, no rewrite) -- this is a new truthful VIEW beside the registry board, not a mutation of it. NEGATIVE CONTROL: a built-in self-test runs the same parser over a synthetic fixture (2 real project lines + a duplicate + 2 non-project lines) and asserts distinct=2 / dedup / non-project ignored -- so GREEN means the parser discriminates, never a rubber stamp. Sovereign: imports only nx_syscalls. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_ws_active_board.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main ab_p ab_len sys_write ab_selftest sys_mmap ab_cat ab_scan ab_find ab_len ↻ ab_eqrange sys_mmap ↻ ab_streq sys_exit sys_mmap ↻ ab_read sys_openat_rd sys_read sys_close ab_scan ↻ ab_sort ab_pn sys_mmap ↻ sys_write ↻

structs

none

consts

19const WL_MAGIC_4096: i64 = 4096
21const WL_PATH: *u8 = "/mnt/c/Users/elder/.claude/projects/C--Users-elder/memory/worklog/worklog.tsv"
22const WL_FBUF: i64 = 8388608 // 8MB: read the whole append-only worklog (~1MB today; headroom)
23const AB_MAXW: i64 = 4096 // max distinct workstreams
24const AB_SLOT: i64 = 256 // per-name byte slot
25const AB_WINDOW: i64 = 172800 // 2 days: "ALIVE" if touched within this of the latest log epoch
26const AB_TOPN: i64 = 50 // how many rows to list

functions

28func ab_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: ab_pab_find
29func ab_p(s: *u8) -> i64 { let n: i64 = ab_len(s); sys_write(1, s, n); return 0 }
called by 1: main calls 2: ab_lensys_write
30func ab_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
41func ab_streq(a: *u8, b: *u8) -> i64
called by 1: ab_selftest
49func ab_cat(buf: *u8, off: i64, s: *u8) -> i64
called by 1: ab_selftest
56func ab_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
70func ab_find(buf: *u8, from: i64, to: i64, pat: *u8) -> i64
called by 1: ab_scan calls 1: ab_len
84func ab_eqrange(buf: *u8, s: i64, e: i64, str: *u8) -> i64
called by 1: ab_scan
94func ab_scan(buf: *u8, n: i64, names: *i64, epochs: *i64, counts: *i64, cap: i64, nowp: *i64) -> i64
161func ab_sort(names: *i64, epochs: *i64, counts: *i64, cnt: i64) -> i64
called by 1: main
183func ab_selftest() -> i64
called by 1: main calls 4: sys_mmapab_catab_scanab_streq
213func main() -> i64