code wiki / (root) / nx_compare_gw_gate.nx

nx_compare_gw_gate.nx

buildroot/runtime/nx_compare_gw_gate.nx

18116 B229 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic compare
docsdependenciesstructsconstsfunctions

about

nx_compare_gw_gate.nx -- GATE for the /compare gateway decision core (nx_compare_gw_lib). THE LOAD-BEARING TEETH ARE THE NO-LEAK ONES: a board a viewer may not see is NOT in the bytes of the index rendered for that viewer (not-even-listed), and a request for it returns the SAME answer as a request for a board that does not exist (NOTFOUND, never DENY, for an anonymous visitor). Everything else checks a shape; those check the property the operator asked for -- the owner sees all, a client sees a subset, and the subset boundary does not leak the existence of what is above it. Every function is exercised IN-PROCESS so a mutation bite reaches it; the conf and requests are built IN MEMORY so no live file can change what this gate measures. The comment character in a fixture conf is CONSTRUCTED (35) -- a literal hash inside a string is an nx_cc lexer trap. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_compare_gw_lib.nx nx_gate_verdict.nx nx_compare_gw_gate.nx

imports: nx_syscalls.nxnx_compare_gw_lib.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 ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ cg_cat gv_check gv_puts ↻ cg_access_level cg_sl_eq cg_slen gv_bite gv_puts ↻ cg_required sys_mmap ↻ cg_eol cg_row_fields cg_sl_eq ↻ cg_access_level ↻ sys_munmap cg_decide cg_split cg_slen ↻ cgg_streq

structs

none

consts

17const CGG_BUF: i64 = 65536
18const CGG_SMALL: i64 = 256
19const CGG_WORD: i64 = 8

functions

21func cgg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: cgg_has
22func cgg_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
called by 1: main
24func cgg_has(hay: *u8, needle: *u8) -> i64
called by 1: main calls 1: cgg_slen
39func main() -> i64