code wiki / _hdl_build / nx_epic_rollup.nx

nx_epic_rollup.nx

buildroot/runtime/_hdl_build/nx_epic_rollup.nx

8350 B196 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_epic_rollup.nx -- EPIC/UMBRELLA CLOSURE capability (operator 2026-06-13: build the team's capabilities self-sufficient, no gaps). nx_reconcile closes only TODO/WIP rows that carry a ||MARK= log-evidence pointer; dep-only EPIC rows (umbrellas decomposed into child rows, e.g. K-R2-001 = a+b+c) have NO gate of their own and so could never close without a tutor hand-flip = a no-cheat hole. This organ closes them MECHANICALLY: gate cell suffix ...||ROLLUP=child1,child2,... (the row's OWN declared closure) -> flip status TODO->DONE iff EVERY listed child row is already DONE (its own gate already proved it). Aggregation of verified children, NOT self-grading. Fixpoint loop closes nested umbrellas (a parent whose child is itself an umbrella). SELF-VALIDATING (no false-green): a baked pos control (child DONE -> parent flips) and neg control (child TODO -> parent must NOT flip) run on synthetic in-memory rows BEFORE the real queue is touched; controls fail -> RED, queue untouched. Backs up the queue (original bytes) before mutating. Only ever overwrites TODO(4)->DONE(4) in place, so length is preserved. Evidence -> knowledge/status/epic_rollup.log. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_epic_rollup.nx

imports: nx_syscalls.nxnx_itoa_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 rr_setup rr_pass rr_at rr_id_done rr_field0_eq rr_at ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real rr_emit rr_w sys_write rr_wn nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_openat_append sys_close rr_read sys_openat_rd sys_read sys_close ↻ rr_w ↻ sys_openat_wr sys_write ↻

structs

none

consts

19const ER_MAGIC_4096: i64 = 4096
20const ER_MAGIC_2097152: i64 = 2097152
22const ER_QUEUE: *u8 = "knowledge/registry/assignment_queue.tsv"
23const ER_BAK: *u8 = "knowledge/registry/assignment_queue.tsv.bak.preRollup"
24const ER_LOG: *u8 = "knowledge/status/epic_rollup.log"

functions

26func rr_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 2: rr_emitmain calls 1: sys_write
31func rr_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 1: rr_emit calls 1: nxi_fd
33func rr_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
43func rr_at(buf: *u8, n: i64, i: i64, pat: *u8, pl: i64) -> i64
called by 2: rr_id_donerr_pass
51func rr_setup(dst: *u8, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[i] = s[i]; i = i + 1 } return i }
called by 1: main
54func rr_field0_eq(buf: *u8, n: i64, ls: i64, target: *u8, tlen: i64) -> i64
called by 1: rr_id_done
63func rr_id_done(buf: *u8, n: i64, target: *u8, tlen: i64) -> i64
called by 1: rr_pass calls 2: rr_field0_eqrr_at
84func rr_pass(buf: *u8, n: i64) -> i64
called by 1: main calls 2: rr_atrr_id_done
142func rr_emit(fd: i64, cpos: i64, cneg: i64, flipped: i64, epoch: i64, ok: i64) -> i64
called by 1: main calls 2: rr_wrr_wn
151func main() -> i64