nx_eval_queue.nx
buildroot/runtime/nx_eval_queue.nx
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
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
structs
| none |
consts
| 24 | const K_MAGIC_65536: i64 = 65536 |
| 25 | const K_MAGIC_2048: i64 = 2048 |
functions
| 27 | func EQ_PREFIX() -> *u8 { return "knowledge/store/eval-gaps-\x00" as *u8 } |
| 29 | func 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 } |
| 34 | func eq_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 35 | func eq_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 36 | func 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 |
| 40 | func eq_seg_next(prefix: *u8) -> i64 |
| 47 | func eq_put(prefix: *u8, key: *u8, val: *u8) -> i64 called by 2: nx_eval_queue_emitnx_eval_queue_close calls 7: sys_mmapeq_lenss_getss_beginss_addeq_seg_next+1 |
| 66 | func eq_member(list: *u8, llen: i64, tok: *u8) -> i64 |
| 85 | func nx_eval_queue_emit(rung: *u8, file: *u8, code: *u8, detail: *u8) -> i64 |
| 119 | func nx_eval_queue_count() -> i64 |
| 130 | func nx_eval_queue_key(n: i64, out: *u8) -> i64 |
| 145 | func nx_eval_queue_status(key: *u8, out: *u8) -> i64 |
| 160 | func nx_eval_queue_close(key: *u8, new_status: *u8) -> i64 |
| 187 | func main() -> i64 |