code wiki / (root) / nx_srcdiverge_gate.nx

nx_srcdiverge_gate.nx

buildroot/runtime/nx_srcdiverge_gate.nx

5967 B129 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_srcdiverge_gate.nx -- BINARY-AHEAD-OF-SOURCE detector (seq1392 rung 2). license_tier: ORIGINAL THE CLASS IT KILLS: a deployed elf can SERVE a route whose handler no longer exists in source -- because a concurrent whole-file write or an /api/unpack tar reverted the source while the binary kept running. Nothing warns. The next /api/build by ANY session or cron then silently DELETES a live capability that other lanes may already depend on. This happened FOUR times in one session (seq1392/1445); the perf lane had already adopted /api/gate_run by the third. I only ever caught it by luck, when an unrelated anchored edit returned NOMATCH. Luck is not a control. HOW: extract every /api/<name> token from the DEPLOYED elf's string data, then assert each one also appears in the SOURCE. A route the binary advertises but the source cannot produce is DIVERGENCE = RED. ★NON-VACUITY IS THE WHOLE POINT (T0): a scanner that extracts ZERO routes would report GREEN forever while the tree burned. So the gate REFUSES unless it finds at least SD_MIN_ROUTES -- an instrument that cannot fail to find anything is an instrument that proves nothing.

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_gate.nx nx_srcdiverge_gate.nx

imports: nx_syscalls.nxnx_gate.nx

imported by: nobody (leaf or entry point)

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

main gw sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit sd_tok gn sys_write ↻ sys_mmap ↻ sd_find sys_write ↻

structs

none

consts

16const SD_ELF: *u8 = "/volume1/homes/elderwesto/nishihost/nx_mgmt_api.elf" as *u8
17const SD_SRC: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/runtime/_hdl_build/nx_mgmt_api.nx" as *u8
18const SD_MIN_ROUTES: i64 = 8
19const SD_MAXR: i64 = 128
20const SD_NAMEMAX: i64 = 48

functions

22func sd_slen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i }
24func sd_tok(c: i64) -> i64
called by 1: main
32func sd_find(hay: *u8, n: i64, pat: *u8, pl: i64) -> i64
called by 1: main
45func main() -> i64