code wiki / _hdl_build / nx_schemadrift_gate.nx

nx_schemadrift_gate.nx

buildroot/runtime/_hdl_build/nx_schemadrift_gate.nx

8331 B153 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

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

nx_toolsafety_lib.nx nx_gate_verdict.nx nx_syscalls.nx nx_schemadrift_gate.nx

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

main gv_head gv_puts sys_write 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 ↻ ts_load_markers sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close sys_free_file sys_munmap ↻ gv_check gv_puts ↻ ts_marker_count gv_subjects gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap ↻

structs

none

consts

25const GS_FIX: i64 = 2048
26const GS_PATH: i64 = 512
33const GS_DIVPROBE_CLOSURE: i64 = 3

functions

35func gs_cp(s: *u8, out: *u8) -> i64
called by 1: gs_probe
44func gs_probe(src: *u8, needle: *u8) -> i64
55func main() -> i64