nx_crew_roster_gate.nx
buildroot/runtime/nx_crew_roster_gate.nx
about
nx_crew_roster_gate.nx -- THE CREW-COMPLETENESS GUARD (operator 2026-07-10: "are you sure you have them all").
The canonical roster (knowledge/registry/crew_roster.tsv) and the machine RACI (knowledge/registry/nishi_raci.tsv)
MUST name the EXACT SAME SET of roles -- so a crew member can never again be RACI'd-but-off-roster or
on-roster-but-un-RACI'd (the drift that lost Analyst/Examiner/Auditor/Critic/Scribe/Arbiter until the operator
caught it). Reads both, extracts role = field 0 of every non-comment line, computes the symmetric difference,
and FAILS if either direction is non-empty. NEG-CONTROL with teeth: injects a synthetic role into each set and
confirms the detector's missing-count rises by exactly 1. NOTE: no '#'/'!' in string literals (nx_cc lexer trap).
license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 11 | const CR_CAP: i64 = 262144 |
| 12 | const CR_MAXR: i64 = 256 |
| 13 | const CR_STR: i64 = 48 |
functions
| 15 | func cr_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 16 | func cr_wn(v: i64) -> i64 { var m: i64=v; let t: *u8=sys_mmap(24); 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} let o: *u8=sys_mmap(24); var w: i64=0; var q: i64=k-1; while q>=0{o[w]=t[q];w=w+1;q=q-1} sys_write(1,o,w); return 0 } |
| 17 | func cr_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 23 | func cr_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8) { if a[i]!=b[i] {return 0} i=i+1 } if b[i]!=(0 as u8) {return 0} return 1 } called by 1: cr_has |
| 25 | func cr_field0(line: *u8, len: i64, out: *u8, outcap: i64) -> i64 called by 1: cr_parse |
| 30 | func cr_has(set: *u8, n: i64, name: *u8) -> i64 { var i: i64=0; while i<n { let off: i64=i*CR_STR; if cr_streq((set as i64 + off) as *u8, name)==1 {return 1} i=i+1 } return 0 } |
| 32 | func cr_parse(path: *u8, set: *u8, maxr: i64) -> i64 |
| 57 | func cr_count_missing(A: *u8, na: i64, B: *u8, nb: i64, label: *u8, verbose: i64) -> i64 |
| 64 | func cr_setadd_ghost(set: *u8, n: i64, name: *u8) -> i64 { let off: i64=n*CR_STR; var k: i64=0; while name[k]!=(0 as u8){ let d: *u8=(set as i64 + off + k) as *u8; d[0]=name[k]; k=k+1 } let z: *u8=(set as i64 + off + k) as *u8; z[0]=0 as u8; return n+1 } called by 1: main |
| 65 | func cr_scopy(dst: *u8, off: i64, src: *u8) -> i64 { var i: i64=0; while src[i]!=(0 as u8){ let d: *u8=(dst as i64 + off + i) as *u8; d[0]=src[i]; i=i+1 } return off+i } |
| 67 | func cr_organ_exists(noun: *u8, pathbuf: *u8) -> i64 |
| 76 | func cr_disk_scan(rset: *u8, rn: i64) -> i64 |
| 92 | func main() -> i64 |