code wiki / (root) / nx_eval_queue.nx

nx_eval_queue.nx

buildroot/runtime/nx_eval_queue.nx

12515 B225 linesdepth 3pulls 4 transitivereach 2 importersview sourcekind tooltopic eval
docsdependenciesstructsconstsfunctions

about

nx_eval_queue.nx -- THE REPORT -> LOG-NEXT BRIDGE of the autonomy loop: turn an evaluator/scanner finding (a rung gap, an anti-pattern hit, an ORPHANED skeleton) into a WMS WORK-SIGNAL queued for completion. Operator's loop: DO -> TEST+EVIDENCE -> REPORT(gaps) -> RESEARCH -> GROW -> LOG-NEXT -> REPEAT. nx_loop_census measured the "QUEUE" link as the gap (the live conductor self-ticks DO+TEST+GATE+LEARN but does not yet pull dynamic work). THIS is that link, built composably: nx_rung_eval / nx_antipattern_catalog find a gap -> this emits it as a work-item the conductor/WMS can pull -> DO. So a detected flaw becomes queued work AUTOMATICALLY, and (Cardinal 25) an orphaned skeleton is ROUTED TO COMPLETION, never deleted. SAFE BY CONSTRUCTION (Cardinal 13 additive): writes ONLY to a DEDICATED, ISOLATED namespace (knowledge/store/eval-gaps-) over the SAME ss_* substrate the WMS uses -- the live 1265-stream production board (prefix "knowledge/store/ws-") is a DIFFERENT store, never opened/read/written here. Idempotent (re-emit of an identical gap re-states the same key, no dup) with fresh-max+1 segids (the "never recommit a segid" discipline). The record is the EXACT WMS TAB contract so a production daemon can adopt these unchanged. COMPOSES nx_seg_store directly (Cardinal 15) -- mirrors the proven nx_asset_signals as_emit pattern for CODE gaps instead of asset signals. Each work-item carries its RUNG (family-tree anchor -- ties the gap to where it lives in the dependency-graph lineage). license_tier: ORIGINAL genealogy_id: operator-2026-07-03-ultimate-loop + nx_asset_signals-wms-contract lineage_id: nishi_eval_queue_v1 expect_exit: 0

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_itoa_lib.nx nx_seg_store.nx nx_eval_queue.nx nx_queue_drain.nx nx_unified_conductor.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_seg_store.nx

imported by: nx_queue_drain.nxnx_unified_conductor.nx

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

main eq_puts sys_write nx_eval_queue_count sys_mmap ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn sys_mmap ↻ ss_cat ss_readall sys_munmap ss_scan_seglist ss_len sys_mmap ↻ ss_cat ↻ ss_readall ↻ ss_r32 EQ_PREFIX eq_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap ↻ nx_eval_queue_emit EQ_PREFIX ↻ sys_mmap ↻ eq_len eq_cat eq_put sys_mmap ↻ eq_len ↻ ss_get ↻ ss_begin ss_begin_cap

structs

none

consts

24const K_MAGIC_65536: i64 = 65536
25const K_MAGIC_2048: i64 = 2048

functions

27func EQ_PREFIX() -> *u8 { return "knowledge/store/eval-gaps-\x00" as *u8 }
29func eq_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
34func eq_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
35func eq_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
36func eq_cat(dst: *u8, off: i64, src: *u8) -> i64 { var i: i64 = 0; while src[i] != (0 as u8) { dst[off + i] = src[i]; i = i + 1 } dst[off + i] = 0 as u8; return off + i }
called by 1: nx_eval_queue_emit
40func eq_seg_next(prefix: *u8) -> i64
called by 1: eq_put calls 1: ss_next_segid
47func eq_put(prefix: *u8, key: *u8, val: *u8) -> i64
66func eq_member(list: *u8, llen: i64, tok: *u8) -> i64
called by 1: nx_eval_queue_emit calls 1: eq_len
85func nx_eval_queue_emit(rung: *u8, file: *u8, code: *u8, detail: *u8) -> i64
119func nx_eval_queue_count() -> i64
130func nx_eval_queue_key(n: i64, out: *u8) -> i64
called by 1: main calls 3: sys_mmapss_getEQ_PREFIX
145func nx_eval_queue_status(key: *u8, out: *u8) -> i64
called by 1: main calls 3: sys_mmapss_getEQ_PREFIX
160func nx_eval_queue_close(key: *u8, new_status: *u8) -> i64
called by 1: main calls 4: sys_mmapss_getEQ_PREFIXeq_put
187func main() -> i64