code wiki / _hdl_build / nx_gate_roster_gate.nx
nx_gate_roster_gate.nx
buildroot/runtime/_hdl_build/nx_gate_roster_gate.nx
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
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
structs
| none |
consts
| 31 | const RG_DIR: *u8 = "/tmp/nx_gate_roster_gate/" |
| 32 | const RG_JRNL: *u8 = "/tmp/nx_gate_roster_gate/trial.jrnl" |
| 33 | const RG_CONF: *u8 = "/tmp/nx_gate_roster_gate/roster.conf" |
| 34 | const RG_SUSP: *u8 = "/tmp/nx_gate_roster_gate/roster.conf.suspect" |
| 35 | const RG_LIST: *u8 = "/tmp/nx_gate_roster_gate/trial.list" |
| 36 | const RG_TJRNL: *u8 = "/tmp/nx_gate_roster_gate/trial2.jrnl" |
| 37 | const RG_ELF1: *u8 = "_offc/nx_gate_roster_run.elf" |
| 38 | const RG_ELF2: *u8 = "nx_gate_roster_run.elf" |
| 39 | const RG_CAP: i64 = 65536 |
| 40 | const RG_DEADLINE: *u8 = "60000" |
| 41 | const RG_MS_TRIAL: *u8 = "5000" |
| 47 | const RG_PROD_JRNL: *u8 = "knowledge/status/gateroster.jrnl" |
| 48 | const RG_PROD_STAMP: *u8 = "knowledge/status/gateroster.stamp" |
| 49 | const RG_BCONF: *u8 = "/tmp/nx_gate_roster_gate/beat.conf" |
| 50 | const RG_BJRNL: *u8 = "/tmp/nx_gate_roster_gate/beat.jrnl" |
| 51 | const RG_BSTAMP: *u8 = "/tmp/nx_gate_roster_gate/beat.jrnl.stamp" |
| 52 | const RG_BEAT_ROW: *u8 = "nx_definitely_absent_fixture_gate" |
| 53 | const RG_ARGLESS_RC: i64 = 2 |
| 58 | const RG_LCONF: *u8 = "/tmp/nx_gate_roster_gate/lru.conf" |
| 59 | const RG_LJRNL: *u8 = "/tmp/nx_gate_roster_gate/lru.jrnl" |
| 60 | const RG_LSTAMP: *u8 = "/tmp/nx_gate_roster_gate/lru.jrnl.stamp" |
| 61 | const RG_NCONF: *u8 = "/tmp/nx_gate_roster_gate/nobudget.conf" |
| 62 | const RG_NJRNL: *u8 = "/tmp/nx_gate_roster_gate/nobudget.jrnl" |
| 63 | const RG_NSTAMP: *u8 = "/tmp/nx_gate_roster_gate/nobudget.jrnl.stamp" |
functions
| 65 | func rg_has_line(path: *u8, name: *u8) -> i64 |
| 92 | func main() -> i64 |