code wiki / _hdl_build / nx_seatresume_gate.nx
nx_seatresume_gate.nx
buildroot/runtime/_hdl_build/nx_seatresume_gate.nx
about
nx_seatresume_gate.nx -- referee for nx_seat resume_map (DM2 crash-resume map, /compare/devmgmt).
Fixtures are ASSEMBLED AT RUNTIME under /tmp/nx_seatresume_gate/<epoch>/ (never the live population,
never a source-embedded pattern -- the detector-finds-its-own-fixture trap), unique per run so the
gate is idempotent by construction. It forks the DEPLOYED subject elf (argv override for staged or
local builds) and judges only the subject's OUTPUT -- the same evidence a coordinator would read.
Teeth carry their strength in their NAME (gate law E7); both refusal directions are covered: a
mapper that misses a planted in-flight write fails the detection teeth, and a mapper that flags
EVERYTHING fails the clean-session neg-control (the guard-that-refuses-everything trap).
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_gate_verdict.nxnx_tool_run.nxnx_syscalls.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
| 14 | const GT_MODE_FILE: i64 = 0x1a4 // 0644, the estate's ST_MODE_RW spelling |
| 15 | const GT_MODE_DIR: i64 = 0x1ed // 0755 for fixture dirs |
| 16 | const GT_CAP: i64 = 262144 // capture buffer; the fixture report measures <20KB, tooth asserts TR_FIT so a silent cut cannot pass |
| 17 | const GT_TIMEOUT_MS: i64 = 30000 // mirrors the subject's own ST_FORK_TIMEOUT_MS bounded-exec rationale |
| 18 | const GT_WIN_HALF: i64 = 3600 // explicit fixture window half-width = the subject's ST_STALE_SEC/2; only needs to exceed the write-to-run gap |
| 19 | const GT_OLD_OFFSET: i64 = 100000 // pushes old1 outside BOTH the explicit window and latest-mode span (ST_STALE_SEC=7200) by >10x |
| 20 | const GT_NULPAD: i64 = 32 // NUL-fill length for the truncated-final-line fixture (real crashes measured 1700..26911B of garbage; any NUL run without a parseable type reproduces the class) |
| 21 | const GT_PATH: i64 = 4096 // PATH_MAX |
| 22 | const GT_ARGV: i64 = 96 // argv cell array: 12 slots x 8 |
| 23 | const GT_NUMBUF: i64 = 32 // one decimal epoch string |
| 25 | const GT_JWIN: i64 = 60 // journal-leg test window width (s): narrow enough that the fixture's own span brackets it, so COVERS/PARTIAL are decided by the fixture, not by wall-clock drift |
| 26 | const GT_JSEED: i64 = 3600 // how far back the fixture's span-min frame sits; only needs to precede the window start |
| 27 | const GT_JBUF: i64 = 4096 // journal fixture build buffer; the fixtures below measure a few hundred bytes |
functions
| 29 | func gt_slen(s: *u8) -> i64 { var sl_n: i64 = 0; while s[sl_n] != (0 as u8) { sl_n = sl_n + 1 } return sl_n } called by 1: main |
| 33 | func gt_frame(buf: *u8, off: i64, ts: i64, ws: *u8, tool: *u8, note: *u8) -> i64 |
| 50 | func gt_wf(path: *u8, content: *u8) -> i64 |
| 60 | func gt_path2(dst: *u8, a: *u8, b: *u8) -> i64 |
| 67 | func main(argc: i64, argv: *i64) -> i64 |