code wiki / _hdl_build / nx_fence_gate.nx
nx_fence_gate.nx
buildroot/runtime/_hdl_build/nx_fence_gate.nx
about
nx_fence_gate.nx -- END-TO-END verifier for nx_fence, the monotonic fence token (2026-08-09).
WHY A SEPARATE ORGAN: /api/gate_run REFUSES any target whose name does not end in gate/test/kat --
"executes VERIFIERS ONLY -- that bound is what makes this route never-brick: it cannot reach a
daemon, promoter or deployer." nx_fence's in-process selftest could therefore only ever be run by
ssh break-glass, and gating must PRECEDE promotion. **** A GATE THAT CANNOT BE RUN BY THE ROUTE THE
ESTATE USES TO RUN GATES IS A GATE NOBODY WILL RUN.
This is END-TO-END on purpose, not a second copy of the in-process teeth: it FORKS the deployed
nx_fence.elf with real fixture journals and asserts EXIT CODES and OUTPUT. That is the half the
in-process selftest structurally cannot reach -- argv parsing, the nx_claims fork, and the exit code
itself. Emitted through nx_gate_verdict so the exit code CARRIES the verdict: **** A GATE WHOSE EXIT
CODE DOES NOT CARRY ITS VERDICT SILENTLY BLESSES EVERY FAILURE IT FINDS (and /api/build's admission
guard refuses a gate without the anchor -- it refused THIS file's first draft, correctly).
Fixtures are assembled AT RUNTIME under /tmp/nx_fence_gate/: a detector that scans source will find
its own fixture, and a teardown does not run when a run crashes.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_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
| 23 | const FG_BUF: i64 = 65536 |
| 24 | const FG_SPAN: i64 = 64 |
functions
| 26 | func main(argc: i64, argv: *i64) -> i64 |