code wiki / _hdl_build / nx_seat_drive_gate.nx

nx_seat_drive_gate.nx

buildroot/runtime/_hdl_build/nx_seat_drive_gate.nx

9225 B217 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic seat
docsdependenciesstructsconstsfunctions

about

nx_seat_drive_gate.nx -- GATE for the S2 seat-protocol driver (6 teeth, 3 negative controls). PREREQ: stage the elfs first (banked /tmp-wipe + fork-budget laws): nx_sov_build_run nx_seat_drive / nx_fix_ok / nx_fix_fail -> cp /tmp/<n>.sov.elf _offc/<n>.elf Run from nxc2 root. SELF-EXEC CHAIN (one driver fork per process, counters ride argv -- the proven WSL fork-budget pattern): argv = [self] [stage] [pass]. Teeth: T1 happy e2e (DONE frame + both artifacts) | T2 NEG work-fail refused | T3 NEG lane-gate RED refused | T4 NEG checkin refused fail-closed (work never ran) | T5 NEG artifact-lie refused (rc0 work without its declared artifact) | T6 journal is append-only across reruns (DONE x2). Verdict: NX-SEAT-DRIVE-GATE pass=N/6 verdict=GREEN|RED (exit 0 iff 6/6). license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_seg_store.nx nx_deploy_lib.nx nx_syscalls.nx nx_seat_drive_gate.nx

imports: nx_seg_store.nxnx_deploy_lib.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sg_atoi sys_unlinkat ss_writefile sys_openat_wr sys_write sys_close sys_fsync sg_len sg_drive sys_mmap dep_run_capture sys_fork sys_openat_wr ↻ sys_dup3 sys_mmap ↻ sys_execve_clean sys_close ↻ sys_execve sys_exit sys_wait4 sg_jcount sys_mmap ↻ dp_read sys_openat_rd sys_read sys_close ↻ sg_count sg_nonempty sys_mmap ↻ dp_read ↻ sg_w sys_write ↻ sys_mmap ↻ sg_itoa sys_mmap ↻ sys_exit ↻ sys_execve ↻

structs

none

consts

15const SG_JCAP: i64 = 65536

functions

17func sg_w(s: *u8) -> i64
called by 1: main calls 1: sys_write
24func sg_len(s: *u8) -> i64
called by 1: main
30func sg_atoi(s: *u8) -> i64
called by 1: main
41func sg_itoa(dst: *u8, v: i64) -> i64
called by 1: main calls 1: sys_mmap
53func sg_count(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: sg_jcount
75func sg_jcount(path: *u8, needle: *u8) -> i64
called by 1: main calls 3: sys_mmapdp_readsg_count
82func sg_nonempty(path: *u8) -> i64
called by 1: main calls 2: sys_mmapdp_read
90func sg_drive(lanep: *u8, outp: *u8) -> i64
called by 1: main calls 2: sys_mmapdep_run_capture
96func main(argc: i64, argv: *i64) -> i64