code wiki / (root) / nx_coindex_gate.nx

nx_coindex_gate.nx

buildroot/runtime/nx_coindex_gate.nx

3978 B81 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic coindex
docsdependenciesstructsconstsfunctions

about

nx_coindex_gate.nx -- liar-killed GATE for the conflict-free co-edited index (R-ORCH-2). Proves the append-and-derive property that KILLS the parallel-session merge-dance: many appends (the concurrent-writer stand-in -- concurrency safety itself is inherited from the flock floor, WMS R11 MEASURED 0/144-lost-vs-git-132) all land with NO loss; the reducer keeps LAST-write-wins per slug (a session re-banking its entry supersedes its own prior, never another's); a fresh slug is added, never colliding. Load-bearing neg-control: the superseded line MUST be absent from the derived index (proves last-wins actually drops the stale entry, not just appends). Exit 0 on 6/6. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_coindex_core.nx nx_coindex_gate.nx

imports: nx_syscalls.nxnx_coindex_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 sys_openat_wr sys_close ci_append ci_lock sys_openat_wr ↻ sys_flock sys_close ↻ sys_openat_append ci_unlock sys_flock ↻ sys_close ↻ sys_mmap ↻ ccz_cat_str sys_write sys_close ↻ g_bool g_puts sys_write ↻ g_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap ci_count sys_mmap ↻ ccz_read sys_openat_rd sys_read sys_close ↻ ci_emit sys_mmap ↻ ccz_read ↻ ci_slug_end ci_slug_eq g_lines ccz_slen

structs

none

consts

none

functions

12func 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
13func g_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 2: g_boolmain calls 1: nxi_out
14func g_bool(name: *u8, got: i64, want: i64, passp: *i64) -> i64
called by 1: main calls 2: g_putsg_putn
20func g_has(hay: *u8, needle: *u8) -> i64
called by 1: main calls 1: ccz_slen
34func g_lines(s: *u8) -> i64 { let n: i64 = ccz_slen(s); var c: i64 = 0; var i: i64 = 0; while i < n { if s[i] == (10 as u8) { c = c + 1 } i = i + 1 } return c }
called by 1: main calls 1: ccz_slen
36func main(argc: i64, argv: *i64) -> i64