code wiki / _hdl_build / nx_express_lane.nx
nx_express_lane.nx
buildroot/runtime/_hdl_build/nx_express_lane.nx
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
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
structs
| none |
consts
| 22 | const K_MAGIC_1048576: i64 = 1048576 |
| 23 | const K_MAGIC_1048560: i64 = 1048560 |
| 24 | const K_MAGIC_262144: i64 = 262144 |
| 25 | const K_MAGIC_262128: i64 = 262128 |
| 26 | const K_MAGIC_16384: i64 = 16384 |
functions
| 27 | func _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 |
| 28 | func _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 } |
| 29 | func _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 } |
| 30 | func el_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 31 | func 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 } |
| 32 | func el_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 41 | func el_slice_has(hay: *u8, a: i64, b: i64, pat: *u8) -> i64 |
| 54 | func el_last_line_with(hay: *u8, n: i64, pat: *u8, out: *i64) -> i64 |
| 70 | func el_tok(buf: *u8, pos: i64, le: i64, pool: *u8, poff: *i64) -> i64 called by 1: main |
| 82 | func el_apply_mark(qp: *u8, ids: *u8, tin: *u8, pa: i64, pb: i64) -> i64 |
| 142 | func el_counts(qb: *u8, qn: i64, lfd: i64) -> i64 |
| 162 | func el_sitline(lfd: i64, path: *u8, anchor: *u8, lb: *u8) -> i64 |
| 179 | func main(argc: i64, argv: *i64) -> i64 |