code wiki / (root) / nx_avail_map_gate.nx

nx_avail_map_gate.nx

buildroot/runtime/nx_avail_map_gate.nx

6230 B132 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_avail_map_gate.nx -- KAT + negative controls for the shared cross-peer availability map. Native sovereign lane; exit 0 = all pass, N = assertion N failed. Prints every MEASURED value (no self-grading -- the raw counts/picks are the evidence). T1 cross-peer count aggregation is exact T2 rarest-first picks the globally-rarest piece the peer HAS T3 rarest-first advances to the next-rarest once a piece is done T4 NEG-CONTROL: a peer that LACKS the rarest pieces is never told to fetch them T5 a HAVE message bumps a single piece's availability T6 NEG-CONTROL: the lock is load-bearing -- 8 procs x 20 locked increments == exact, the same UNLOCKED loses counts (torn read-modify-write)

dependencies 2 imports · 0 importers

nx_avail_map.nx nx_assert.nx nx_avail_map_gate.nx

imports: nx_avail_map.nxnx_assert.nx

imported by: nobody (leaf or entry point)

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

main gset am_init am_open am_add_bitfield am_open ↻ sys_flock sys_read nx_pw_bitfield_has am_load am_open ↻ sys_read ↻ nx_puts_err sys_write nx_puti_err sys_mmap sys_write ↻ am_pick_rarest am_load ↻ nx_pw_bitfield_has ↻ nx_pm_rarest am_add_have am_open ↻ sys_flock ↻ sys_read ↻ sys_fork sys_wait4 am_add_bitfield_unlocked am_open ↻ sys_read ↻ nx_pw_bitfield_has ↻

structs

none

consts

none

functions

17func gset(bits: *u8, p: i64) -> i64
called by 1: main
24func main() -> i64