code wiki / _hdl_build / nx_gate_roster_gate.nx

nx_gate_roster_gate.nx

buildroot/runtime/_hdl_build/nx_gate_roster_gate.nx

15487 B249 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic gate
docsdependenciesstructsconstsfunctions

about

nx_gate_roster_gate.nx -- END-TO-END GATE for nx_gate_roster_run's ADMIT contract (journal -> roster conf). WHY: the roster is the estate's wiring vehicle for deployed-dark gates (lane B, 2026-08-18: 602 gates admitted from trial journals). If `admit` mis-reads a journal, gates are wired blind or silently dropped -- so the bridge itself needs teeth. Every tooth is a FIXTURE built at runtime under /tmp/<gate>/ (a gate must never share its fixture with a production beat), fed to the DEPLOYED runner (`_offc` twin first, then the estate root, resolved once and printed), and judged on the CONF/SUSPECT files it wrote and the receipt it printed. gv_verdict base class: exit carries the verdict, teeth counted by construction. TEETH T1 admit: partition line reconciles (admitted+already+suspects+rejected == gates) T2 latest-row-wins: a gate whose rows go RED then GREEN is ADMITTED T3 suspect: a GREEN row with ms >= deadline is written to the suspect list and NOT admitted T4 additive merge: a gate already in the conf is counted already_in_conf and not duplicated T5 reject: RED / ABSENT / TIMEOUT latest rows are rejected (absent from conf and suspects) T6 neg-control: deadline 0 is REFUSED (rc 2) and touches neither file T7 trial verb: a list naming a gate with no ./<name>.elf journals ABSENT exit=127 (never a pass) T8 BITE: T3 fires on the at-deadline row and stays silent on a fast GREEN row T9 argless mutates NOTHING: rc 2, and the production journal AND the cron-watched heartbeat are byte-unchanged across the call. Asserted as STATE, not as a message -- a perfect usage string proves nothing about whether the beat also ran, and this organ's argless default WAS the full production beat until 2026-08-20, which is what made it unprovable by every argless probe T10 a NAMED beat still does the real pass on a fixture roster (the fix must not disarm the beat) T11 neg-control: that fixture beat stamps BESIDE its own journal and CANNOT forge the production heartbeat. GRR_STAMP was a CONSTANT path, so any caller passing a fixture conf wrote it -- a liveness signal any caller can write is a dead-man's switch any caller can hold down license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_gatekit_lib.nx nx_gate_verdict.nx nx_gate_roster_gate.nx

imports: nx_gatekit_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 ↻ gk_exists sys_openat_rd sys_close gv_need gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_puts ↻ gv_num ↻ gv_journal sys_openat_append

structs

none

consts

31const RG_DIR: *u8 = "/tmp/nx_gate_roster_gate/"
32const RG_JRNL: *u8 = "/tmp/nx_gate_roster_gate/trial.jrnl"
33const RG_CONF: *u8 = "/tmp/nx_gate_roster_gate/roster.conf"
34const RG_SUSP: *u8 = "/tmp/nx_gate_roster_gate/roster.conf.suspect"
35const RG_LIST: *u8 = "/tmp/nx_gate_roster_gate/trial.list"
36const RG_TJRNL: *u8 = "/tmp/nx_gate_roster_gate/trial2.jrnl"
37const RG_ELF1: *u8 = "_offc/nx_gate_roster_run.elf"
38const RG_ELF2: *u8 = "nx_gate_roster_run.elf"
39const RG_CAP: i64 = 65536
40const RG_DEADLINE: *u8 = "60000"
41const RG_MS_TRIAL: *u8 = "5000"
47const RG_PROD_JRNL: *u8 = "knowledge/status/gateroster.jrnl"
48const RG_PROD_STAMP: *u8 = "knowledge/status/gateroster.stamp"
49const RG_BCONF: *u8 = "/tmp/nx_gate_roster_gate/beat.conf"
50const RG_BJRNL: *u8 = "/tmp/nx_gate_roster_gate/beat.jrnl"
51const RG_BSTAMP: *u8 = "/tmp/nx_gate_roster_gate/beat.jrnl.stamp"
52const RG_BEAT_ROW: *u8 = "nx_definitely_absent_fixture_gate"
53const RG_ARGLESS_RC: i64 = 2
58const RG_LCONF: *u8 = "/tmp/nx_gate_roster_gate/lru.conf"
59const RG_LJRNL: *u8 = "/tmp/nx_gate_roster_gate/lru.jrnl"
60const RG_LSTAMP: *u8 = "/tmp/nx_gate_roster_gate/lru.jrnl.stamp"
61const RG_NCONF: *u8 = "/tmp/nx_gate_roster_gate/nobudget.conf"
62const RG_NJRNL: *u8 = "/tmp/nx_gate_roster_gate/nobudget.jrnl"
63const RG_NSTAMP: *u8 = "/tmp/nx_gate_roster_gate/nobudget.jrnl.stamp"

functions

65func rg_has_line(path: *u8, name: *u8) -> i64
called by 1: main calls 2: gk_readgk_len
92func main() -> i64