code wiki / (root) / nx_firstbyte_gate.nx

nx_firstbyte_gate.nx

buildroot/runtime/nx_firstbyte_gate.nx

16210 B277 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_firstbyte_gate.nx -- the first-byte-up analysis is DERIVED, its cap axis is MEASURED, its unsound links are RANKED BY ACTIONABILITY, it DISCRIMINATES, and it declares the axis it cannot see. Subject: ./nx_firstbyte.elf (the serving-root binary; e2e fork, never an in-process re-derive). PRE-DECLARED ACCEPT RULE: would this instrument have surfaced the five foundation defects of 2026-08-23 BEFORE the lane above hit them? Known ground truth, so a real validation set. Re-scored after the ranking landed -- published honestly, INCLUDING WHAT DID NOT MOVE: D2 nx_gsplat 512x384 CAUGHT, and now ATTRIBUTED. The splat rungs read NOT-READY with first_unsound=nx_gsplat.nx classed OWN -- the rung's own module, the lane that owns the rung owns the fix. D1 nx_skeleton SK_MAXB=32 MOVED: was CAUGHT-BUT-MASKED, now the mask is GONE and for the right reason -- nx_skeleton.nx reads verdict=CLEAN (capacity_population=0) since the rig-floor lane derived that bound away. It still sits in three chains, and it is named in NONE of them. The tooth below asserts exactly that consistency: A LINK THE CENSUS CALLS CLEAN MUST NEVER BE NAMED AS UNSOUND. (If the skeleton lane re-introduces a picked bound this tooth goes RED -- that is a foundation regression, and it SHOULD be visible here. Named so the next reader knows why.) D3 PF_NB=48 MISS, structural and UNCHANGED: a DATA prior read at runtime is not an import. AN IMPORT GRAPH CANNOT SEE A DATA DEPENDENCY. Asserted. D4 no vector types MISS, UNCHANGED: a LANGUAGE gap has no module to point at. D5 no mesh->skeleton binder MISS, UNCHANGED: no row declared it. EMPTY-CHAIN is the nearest observable proxy and is checked as its own bucket, even at zero. WHY THE RANKING NEEDED ITS OWN TEETH: ranking is a claim about ORDER, and an order can be wrong while every count is right. The load-bearing tooth parses EVERY ranked list and asserts class order (own, then rare, then ubiquitous) with ascending fan-in inside a class -- because the whole point is that A CAP IN A LEAF EVERYONE SHARES MUST NEVER OUTRANK A CAP IN YOUR OWN MODULE. It also counts what it parsed, so a run that parsed nothing cannot pass as a run that found nothing out of order. license_tier: ORIGINAL Read-only. No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_firstbyte_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_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_puts sys_write ↻ sys_mmap ↻ gk_run_capture gk_run_cap2 gk_run_cap3 sys_mmap ↻ sys_pipe2 sys_fork sys_close sys_setpgid sys_openat_rd sys_dup3 sys_execve sys_exit ↻ sys_sleep_ms sys_mmap ↻ sys_munmap nx_kill sys_now_realtime_ms sys_mmap ↻ sys_clock_gettime_real sys_poll

structs

none

consts

36const FBG_ELF: *u8 = "./nx_firstbyte.elf" as *u8
40const FBG_CAPTURE_BUDGET: i64 = 262144
41const FBG_RANKED_TAG: *u8 = "|ranked=" as *u8
42const FBG_RANKED_TAGLEN: i64 = 8
43const FBG_FANIN_TAGLEN: i64 = 6

functions

48func fbg_find_from(b: *u8, n: i64, pat: *u8, start: i64) -> i64
66func fbg_find(b: *u8, n: i64, pat: *u8) -> i64 { return fbg_find_from(b, n, pat, 0) }
called by 2: fbg_hasfbg_num_after calls 1: fbg_find_from
68func fbg_has(b: *u8, n: i64, pat: *u8) -> i64
called by 1: main calls 1: fbg_find
73func fbg_digits_at(b: *u8, n: i64, start: i64) -> i64
92func fbg_num_after(b: *u8, n: i64, key: *u8) -> i64
called by 1: main calls 2: fbg_findfbg_digits_at
105func fbg_rank_order_ok(b: *u8, n: i64) -> i64
called by 1: main calls 2: fbg_find_fromfbg_digits_at
153func main(argc: i64, argv: *i64) -> i64