code wiki / _hdl_build / nx_express_lane.nx

nx_express_lane.nx

buildroot/runtime/_hdl_build/nx_express_lane.nx

14451 B300 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_express_lane.nx -- X-XL-002 rung 1: the tutor<->team EXPRESS LANE consumer (operator 2026-06-12: the team must not be a BLACK BOX -- S-class communication everywhere including the command line; tutor tokens go to NOVEL work, not greps). PLAIN LANGUAGE: the tutor (any model) appends verb rows to tutor_in.tsv; THIS organ consumes them EXACTLY ONCE each beat, acts, ACKs every row to team_out.tsv, then writes a SITREP block -- the one-read picture (quantitative lines verbatim from the ledgers + queue counts). A tutor that still greps after this is measured: every legitimate read is a channel row; archaeology shows. verbs: MARKWIRE <id> <log::anchor::green> -> append ||MARK= to that row's gate column (idempotent: a row already carrying ||MARK= is never re-marked); ANSWER/ASK/VISIT-START/VISIT-END -> ACKed (consumption rungs follow: X-XL-004 joins ANSWERs to briefs) exactly-once: ACK key=<epoch>:<verb>:<id> in team_out is the cursor -- a row whose key exists is never re-dispatched (re-run = zero re-work). SITREP block: PULSE-VERDICT + EXAMINER-ARCS + AUTMETER + PAPERGEN-SUM lines VERBATIM (ledger-derived, refuse-to-paraphrase) + queue status counts. Durable: ACK + SITREP -> knowledge/channel/team_out.tsv. Exit 0 = lane duty done; exit 1 = could not read its world. argv[1]=tutor_in argv[2]=team_out argv[3]=queue (gates use scratch; live logs read at fixed paths only when argv absent). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_registry_lock.nx nx_express_lane.nx

imports: nx_registry_lock.nx

imported by: nobody (leaf or entry point)

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

main _p el_read sys_read el_cat rt_lock rt_writeint_fd sys_mmap sys_write rt_now sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real rt_readint sys_openat_rd sys_mmap ↻ sys_read ↻ sys_close rt_unlink sys_openat_append rt_unlock sys_close ↻ rt_unlink ↻ el_tok el_slice_has el_len el_apply_mark el_read ↻ el_len ↻ el_slice_has ↻ el_cat ↻ sys_openat_wr _fp sys_renameat _fp ↻ _fn sys_now_realtime_sec ↻ el_sitline el_read ↻ el_last_line_with

structs

none

consts

22const K_MAGIC_1048576: i64 = 1048576
23const K_MAGIC_1048560: i64 = 1048560
24const K_MAGIC_262144: i64 = 262144
25const K_MAGIC_262128: i64 = 262128
26const K_MAGIC_16384: i64 = 16384

functions

27func _p(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
28func _fp(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 }
29func _fn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 }
called by 2: el_countsmain
30func el_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
31func el_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
called by 2: el_apply_markmain
32func el_read(path: *u8, buf: *u8, cap: i64) -> i64
41func el_slice_has(hay: *u8, a: i64, b: i64, pat: *u8) -> i64
54func el_last_line_with(hay: *u8, n: i64, pat: *u8, out: *i64) -> i64
called by 1: el_sitline calls 1: el_slice_has
70func el_tok(buf: *u8, pos: i64, le: i64, pool: *u8, poff: *i64) -> i64
called by 1: main
82func el_apply_mark(qp: *u8, ids: *u8, tin: *u8, pa: i64, pb: i64) -> i64
142func el_counts(qb: *u8, qn: i64, lfd: i64) -> i64
called by 1: main calls 3: el_slice_has_fp_fn
162func el_sitline(lfd: i64, path: *u8, anchor: *u8, lb: *u8) -> i64
called by 1: main calls 3: el_readel_last_line_with_fp
179func main(argc: i64, argv: *i64) -> i64