code wiki / (root) / nx_buildpath_gate.nx

nx_buildpath_gate.nx

buildroot/runtime/nx_buildpath_gate.nx

7138 B120 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_buildpath_gate.nx -- PROVES nx_buildpath_lib AGREES WITH THE BUILDER THAT ACTUALLY RAN. WHY THIS GATE IS THE POINT OF THE LIB. Extracting the resolver removes 15 hand-rolled copies, but it creates a NEW risk: one more place that BELIEVES it knows where nx_sov_build_run writes. A second copy of a fact is only safe if something FAILS when the two disagree -- otherwise this lib becomes the sixteenth stale copy, and the most authoritative one. *TWO GUARDS FOR ONE INVARIANT IS THE DUPLICATE-RULER DEFECT UNLESS ONE OF THEM IS PROVEN AGAINST THE OTHER ON EVERY RUN. THE BINDING TOOTH COSTS NOTHING AND CANNOT BE FAKED: this gate is itself a build target, so the runner wrote _build/nx_buildpath_gate.sov.elf in order to execute the very process asking the question. Its own artifact IS the builder's answer. No fork, no fixture, no timeout risk -- and if the builder ever moves its output, THIS GATE GOES RED FIRST, which is exactly the alarm the estate did not have when nx_drift_watch drifted for 32h while reporting GREEN. gv_need guards it honestly: run this gate from somewhere the artifact is not, and it SKIPs rather than reporting RED about an environment rather than about the code (the third-state law). BITE-PROVEN 2026-08-16 with three mutants, each killing exactly one tooth and no other: drop-primary-probe-restore -> T4 FAIL | outcap-guard-never-fires -> T2 FAIL | collapse-legacy-into-success -> T6 FAIL. Restored -> 7/7 GREEN. license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_gate_verdict.nx nx_buildpath_lib.nx nx_syscalls.nx nx_buildpath_gate.nx

imports: nx_gate_verdict.nxnx_buildpath_lib.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_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 ↻ gv_head gv_puts sys_write ↻ bg_self bp_needed bp_slen bp_root_build bp_root_buildroot bp_root_tmp bp_suffix bg_absent bg_tmpfix sys_mmap ↻ bp_compose bp_cat bp_suffix ↻ bp_root_buildroot ↻ gv_check gv_puts ↻ bp_artifact bp_needed ↻ bp_compose ↻ bp_root_build ↻

structs

none

consts

none

functions

28func bg_self() -> *u8 { return "nx_buildpath_gate" as *u8 }
called by 1: main
30func bg_absent() -> *u8 { return "nx_buildpath_gate_absent_negative_control" as *u8 }
called by 1: main
32func bg_tmpfix() -> *u8 { return "nx_buildpath_gate_legacyfixture" as *u8 }
called by 1: main
34func bg_starts(s: *u8, pre: *u8) -> i64
called by 1: main
43func main() -> i64