nx_inc_compile_gate.nx
buildroot/runtime/nx_inc_compile_gate.nx
about
nx_inc_compile_gate.nx -- VERDICT gate for rung LN10 of /compare/lang: the per-module incremental build
cache in nx_inc_compile (watch symbol inc_cache_lookup).
DONE-RULE UNDER TEST (lang.plan LN10, verbatim): "gate proves a one-file edit rebuilds only its
dependents and the output equals a full build".
EVERYTHING RUNS IN AN ISOLATED FIXTURE TREE under <buildroot>/_build/nx_inc_compile_gate/ -- its own
runtime/, its own _offc/ copy of the live toolchain AND of the closure ruler, its own _build/ and its own
knowledge/ -- so nothing here touches the estate's cache, its toolchain, its confs or its serving root.
The fixture is wiped at SETUP, never at teardown: a teardown does not run when a run crashes, and a gate
that is not idempotent reports on its first run and lies about every run after.
FIXTURE ROOT IS DERIVED, NOT /tmp: measured on this NAS, a byte-identical copy of the compiler placed
under /tmp returns execve 127 -- the mount refuses execution -- so every builder run would fail with an
empty .s and read as a compiler defect. Build-artifact territory is executable by construction.
THE ZERO-COMPILE WITNESS IS STATE, NOT A MESSAGE: nx_sov_build_run writes _build/<t>.s only inside its
compile loop. The gate deletes that file before a rebuild; if the artifact is still current and the .s is
still ABSENT, no compiler ran. A tooth asserts the .s IS present after a real build, so the absence
witness cannot pass vacuously.
THE FIXTURE'S OWN buildcache.conf SETS cache_enabled=0 so that B2's whole-target cache cannot serve the
hit this gate is attributing to LN10 -- without that, every "zero compile" tooth would measure B2.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_sha256.nxnx_gate_verdict.nxnx_gatekit_lib.nxnx_tool_run.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
| 29 | const IG_PATH: i64 = 4096 |
| 30 | const IG_OUT: i64 = 1048576 |
| 31 | const IG_SHA_HEX: i64 = 64 |
| 32 | const IG_MODE_X: i64 = 493 // 0755 |
| 33 | const IG_MODE_R: i64 = 420 // 0644 |
| 34 | const IG_TMO: i64 = 900000 // the builder's own SBR_BUILD_DEADLINE_MS, inherited not re-chosen |
| 35 | const IG_VAL_A: i64 = 11 // icfx_lib v1 return value |
| 36 | const IG_VAL_B: i64 = 19 // icfx_lib v2 -- ONE line differs |
| 37 | const IG_VAL_C: i64 = 23 // icfx_lib v3 |
| 38 | const IG_SHOW: i64 = 3000 // how much captured output to echo when a tooth fails |
functions
| 55 | func igp_mk(base: *u8, tail: *u8) -> i64 |
| 62 | func igp_init(buildroot: *u8) -> i64 |
| 79 | func igp(v: i64) -> *u8 { return v as *u8 } |
| 80 | func ig_p(s: *u8) -> i64 { sys_write(1, s, gk_len(s)); return 0 } |
| 81 | func ig_nl() -> i64 { let b: *u8 = sys_mmap(2); b[0] = 10 as u8; sys_write(1, b, 1); sys_munmap(b, 2); return 0 } |
| 82 | func ig_n(v: i64) -> i64 { gv_num(v); return 0 } calls 1: gv_num |
| 83 | func ig_sub(dir: i64, name: *u8) -> *u8 { return igp_mk(igp(dir), name) as *u8 } |
| 85 | func ig_sha(path: *u8, out: *u8) -> i64 |
| 105 | func ig_hexeq(a: *u8, b: *u8) -> i64 called by 1: main |
| 112 | func ig_copy(src: *u8, dst: *u8, mode: i64) -> i64 |
| 127 | func ig_append_byte(path: *u8) -> i64 |
| 140 | func ig_write_lib(v: i64) -> i64 |
| 153 | func ig_write_prog(name: *u8, letter: *u8, uses_lib: i64) -> i64 |
| 178 | func ig_run(subject: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, a6: *u8, out: *u8, ol: *i64) -> i64 |
| 192 | func ig_show(cond: i64, out: *u8, n: i64) -> i64 |
| 202 | func ig_after_key(out: *u8, n: i64, needle: *u8, keyout: *u8) -> i64 |
| 212 | func ig_wipe_index() -> i64 { return sys_unlinkat(igp(igp_idx)) } |
| 213 | func ig_rm_asm(name: *u8) -> i64 { return sys_unlinkat(igp_mk(igp(igp_bld), name) as *u8) } |
| 215 | func main(argc: i64, argv: *i64) -> i64 |