code wiki / (root) / nx_content_put_gate.nx

nx_content_put_gate.nx

buildroot/runtime/nx_content_put_gate.nx

47484 B930 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic content
docsdependenciesstructsconstsfunctions

about

nx_content_put_gate.nx -- THE GATE FOR THE CHUNKED UPLOAD DOOR: a real multi-MB payload round-trips byte-identically, and every refusal the protocol promises actually fires. Subject: the DEPLOYED nx_content_put binary (fork-style e2e; argv[1] overrides the subject path so a bite can point at a staged mutant without touching live). Fixture: REAL corpus bytes -- five concatenations of knowledge/rigcorpus/human.nxmesh (517,832 B each, durable since 2026-08-23), so the sha teeth exercise real entropy, never zeros. Scratch lives in /tmp/nx_content_put_gate/ (the gate-fixture law) and destinations use the organ's /tmp allowlist lane. NOT ROSTER-ADMITTED: this gate forks the subject ~120 times and assembles megabytes -- a multi-second subject (the voxchunk precedent); run it via nx_job_run, never on the 1.8s beat. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_base64.nx nx_sha256.nx nx_cdc_lib.nx nx_content_put_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_base64.nxnx_sha256.nxnx_cdc_lib.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 ↻ gv_head gv_puts sys_write ↻ gv_puts ↻ g_mkdir sys_mmap ↻ sys_munmap sys_unlinkat sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap ↻ sys_close gv_check gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n

structs

none

consts

20const G_SUBJECT_DEFAULT: *u8 = "./nx_content_put.elf" as *u8
21const G_CORPUS: *u8 = "knowledge/rigcorpus/human.nxmesh" as *u8
22const G_NCOPIES: i64 = 5
24const G_MULTI_MB: i64 = 2097152
25const G_SCRATCH: *u8 = "/tmp/nx_content_put_gate" as *u8
26const G_OUT: *u8 = "/tmp/nx_content_put_gate/out.txt" as *u8
27const G_DEST1: *u8 = "/tmp/nx_content_put_gate/dest1.bin" as *u8
28const G_DEST2: *u8 = "/tmp/nx_content_put_gate/dest2.bin" as *u8
29const G_DEST3: *u8 = "/tmp/nx_content_put_gate/dest3.bin" as *u8
30const G_DEST4: *u8 = "/tmp/nx_content_put_gate/dest4.bin" as *u8
31const G_DEST5: *u8 = "/tmp/nx_content_put_gate/dest5.bin" as *u8
32const G_SHAHEX: i64 = 64
33const G_DIGEST: i64 = 32
34const G_PATHCAP: i64 = 512

functions

36func g_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: g_findg_num_after
37func g_mkdir(path: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_munmap
44func g_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
called by 1: main calls 2: sys_openat_rdsys_close
45func g_itoa(v: i64, out: *u8) -> i64
called by 1: main calls 1: sys_mmap
59func g_find(hay: *u8, n: i64, needle: *u8) -> i64
called by 2: g_num_aftermain calls 1: g_slen
72func g_num_after(hay: *u8, n: i64, key: *u8) -> i64
called by 1: main calls 2: g_findg_slen
87func g_hex_into(d: *u8, out: *u8) -> i64
called by 1: main
101func g_run(subject: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, nargs: i64) -> i64
124func g_read_out(lp: *i64) -> *u8
called by 1: main calls 2: sys_read_filesys_mmap
130func main(argc: i64, argv: *i64) -> i64