code wiki / (root) / nx_sendcheck_gate.nx

nx_sendcheck_gate.nx

buildroot/runtime/nx_sendcheck_gate.nx

8557 B132 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_sendcheck_gate.nx -- LN6 (lang.plan): DATA-RACE TYPING AT THE THREAD-POOL BOUNDARY. End-to-end over the PROMOTED compiler: four fixtures are assembled at runtime in /tmp/<gate>/ (never a file a source census could mistake for an organ), the compiler is forked on each with stderr captured, and the teeth read the captured bytes. Each fixture declares its own nx_pool_submit stub (the check is keyed on the callee NAME, so the real pool and its threads are not needed): fx_unmarked `struct Job { .. }` handed as `j as i64` under --sendcheck -> MUST be refused, naming Job, with where (caret), why and fix (the teaching voice) fx_marked `struct Job send { .. }` the same call under --sendcheck -> MUST compile (the marker works) fx_int a plain integer ctx under --sendcheck -> MUST compile (declared abstention) fx_default fx_unmarked WITHOUT the flag -> MUST compile (default unchanged) The refusal is the LN6 contract; the three controls keep the gate from passing on a compiler that refuses everything, on one that ignores the marker, or on one that changed the default. Byte-identity of default builds is nx_cc_equiv_gate's job (10 rows + self-host), deliberately not duplicated here. nx_sendcheck_gate -- verdict in the exit code (gv_verdict) license_tier: ORIGINAL layer: lang module: nishi-core.lang.sendcheck_gate

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_sendcheck_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_mkdir sg_pick_cc sys_openat_rd sys_close sg_w sys_write ↻ sg_slen sg_write_file sys_openat_wr sg_slen ↻ sys_write ↻ sys_close ↻ gv_check gv_puts sys_write ↻ sg_compile sys_fork sys_openat_wr ↻ sys_dup3 sys_mmap ↻ sys_execve sys_exit_group sys_wait4

structs

none

consts

19const SG_DIR: *u8 = "/tmp/nx_sendcheck_gate\x00" as *u8
20const SG_UNMARKED: *u8 = "/tmp/nx_sendcheck_gate/fx_unmarked.nx\x00" as *u8
21const SG_MARKED: *u8 = "/tmp/nx_sendcheck_gate/fx_marked.nx\x00" as *u8
22const SG_INT: *u8 = "/tmp/nx_sendcheck_gate/fx_int.nx\x00" as *u8
23const SG_ERR_U: *u8 = "/tmp/nx_sendcheck_gate/fx_unmarked.err\x00" as *u8
24const SG_ERR_M: *u8 = "/tmp/nx_sendcheck_gate/fx_marked.err\x00" as *u8
25const SG_ERR_I: *u8 = "/tmp/nx_sendcheck_gate/fx_int.err\x00" as *u8
26const SG_ERR_D: *u8 = "/tmp/nx_sendcheck_gate/fx_default.err\x00" as *u8
27const SG_DEVNULL: *u8 = "/dev/null\x00" as *u8
28const SG_FLAG: *u8 = "--sendcheck\x00" as *u8
29const SG_CC_NAS: *u8 = "buildroot/_offc/nx_cc_sovereign.elf\x00" as *u8 // NAS gate CWD = nishihost root
30const SG_CC_LAP: *u8 = "_offc/nx_cc_sovereign.elf\x00" as *u8 // laptop CWD = nxc2 root
31const SG_CAP: i64 = 65536
32const SG_MODE: i64 = 420

functions

34func sg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
35func sg_w(s: *u8) -> i64 { sys_write(1, s, sg_slen(s)); return 0 }
called by 1: main calls 2: sys_writesg_slen
36func sg_find(b: *u8, n: i64, pat: *u8) -> i64
called by 1: main calls 1: sg_slen
48func sg_write_file(path: *u8, body: *u8) -> i64
57func sg_compile(cc: *u8, flag: *u8, src: *u8, errpath: *u8) -> i64
79func sg_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
90func sg_pick_cc() -> *u8
called by 1: main calls 2: sys_openat_rdsys_close
96func main() -> i64