code wiki / _hdl_build / nx_schemadrift_gate.nx
nx_schemadrift_gate.nx
buildroot/runtime/_hdl_build/nx_schemadrift_gate.nx
about
nx_schemadrift_gate.nx -- proves the safety-flag ruler DISCRIMINATES (2026-08-25).
The defect under test is a deriver that fails PERMISSIVE: it publishes readOnly=1 for an organ that
reaches a write syscall through an imported helper. A gate for that ruler must therefore prove BOTH
directions on EVERY axis it claims, because a scanner that answers "writer" to everything passes every
permissive test while destroying all the information, and a scanner that answers "read-only" to
everything passes every conservative test while destroying all the safety.
THE LOAD-BEARING TOOTH IS T6. It runs the ruler at two depths over ONE REAL SUBJECT that ships in this
estate -- nx_divprobe, which writes nothing itself and imports nx_gate_verdict.nx, whose gv_journal
appends to knowledge/status/harness.jrnl. Depth 0 must say read-only and the transitive closure must
say writer. A single-file scanner CANNOT pass it, which is the whole point: an anti-vacuity tooth the
trivially wrong implementation fails by construction.
T7 is the negative control that stops the opposite cheat. nx_syscalls.nx is imported by essentially
every organ in the estate and it DEFINES every write syscall there is; if the ruler counted those
definitions the entire estate would read as writers and the derivation would buy nothing. Its two
occurrences of the mkdir marker are one COMMENT and one DEFINITION, so the shim alone must measure
clean. Get this wrong and T6 still passes -- which is exactly why both are here.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_toolsafety_lib.nxnx_gate_verdict.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
| 25 | const GS_FIX: i64 = 2048 |
| 26 | const GS_PATH: i64 = 512 |
| 33 | const GS_DIVPROBE_CLOSURE: i64 = 3 |
functions
| 35 | func gs_cp(s: *u8, out: *u8) -> i64 called by 1: gs_probe |
| 44 | func gs_probe(src: *u8, needle: *u8) -> i64 |
| 55 | func main() -> i64 |