code wiki / (root) / nx_memindex_put_gate.nx

nx_memindex_put_gate.nx

buildroot/runtime/nx_memindex_put_gate.nx

17125 B374 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic memindex
docsdependenciesstructsconstsfunctions

about

nx_memindex_put_gate.nx -- liar-killed GATE for the atomic slug-keyed curated upsert (F826). Forks the REAL built elf (_build/nx_memindex_put.sov.elf) against byte-exact fixtures and proves the properties that make it safe to point at the MOST-CONTENDED file in the ecosystem: - a NEW slug APPENDS inside the block; an EXISTING slug is REPLACED IN PLACE (position preserved, so the human thematic grouping survives a rewrite) - a sibling's unmarked line is NEVER touched (the clobber class this organ exists to kill) - IDEMPOTENT: putting identical text twice leaves the file byte-identical - FAIL-CLOSED: missing CURATED markers -> file byte-untouched (never guesses where to write) - DISJOINT OWNERSHIP: a put does not disturb the COINDEX block that nx_memindex_emit owns - NEG-CONTROL: a slug that does not appear is not matched (no accidental overwrite) usage: nx_memindex_put_gate [put_elf] Exit 0 only on 9/9. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_crashresume_census_core.nx nx_memindex_put_gate.nx

imports: nx_syscalls.nxnx_crashresume_census_core.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap g_write sys_openat_wr sys_write ccz_slen sys_close fixture g_write ↻ g_run sys_fork sys_execve sys_exit sys_mmap ↻ sys_wait4 wait_exit_code g_bool g_puts sys_write ↻ g_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap g_fhas sys_mmap ↻ ccz_read sys_openat_rd sys_read sys_close ↻ g_has ccz_slen ↻ g_foff sys_mmap ↻ ccz_read ↻ ccz_slen ↻ ccz_read ↻ g_same

structs

none

consts

none

functions

23func g_puts(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 2: g_boolmain calls 1: sys_write
24func g_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 2: g_boolmain calls 1: nxi_out
25func g_bool(name: *u8, got: i64, want: i64, passp: *i64) -> i64
called by 1: main calls 2: g_putsg_putn
30func g_write(path: *u8, s: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 420); if fd < 0 { return 0 - 1 } sys_write(fd, s, ccz_slen(s)); sys_close(fd); return 0 }
31func g_has(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: g_fhas calls 1: ccz_slen
44func g_fhas(p: *u8, needle: *u8) -> i64
called by 1: main calls 3: sys_mmapccz_readg_has
51func g_foff(p: *u8, needle: *u8) -> i64
called by 1: main calls 3: sys_mmapccz_readccz_slen
66func g_fsize(p: *u8) -> i64
called by 1: main calls 2: sys_mmapccz_read
71func g_same(p: *u8, q: *u8, qn: i64) -> i64
called by 1: main calls 2: sys_mmapccz_read
79func g_run() -> i64
93func fixture_ev(md: *u8) -> i64
called by 1: main calls 1: g_write
97func fixture_ovfl(ov: *u8) -> i64
called by 1: main calls 1: g_write
106func g_conc(n: i64) -> i64
144func fixture(md: *u8) -> i64
called by 1: main calls 1: g_write
149func main(argc: i64, argv: *i64) -> i64