code wiki / _hdl_build / nx_buildmode_gate.nx
nx_buildmode_gate.nx
buildroot/runtime/_hdl_build/nx_buildmode_gate.nx
about
nx_buildmode_gate.nx -- THE REFEREE for nx_buildmode_lib (LN44, 2026-09-03).
The subject decides which flags the build lane hands the compiler, so its failure modes are expensive in
both directions: too eager and it silently changes every artifact in the estate on adoption day; too
quiet and the estate keeps shipping its slowest mode. The load-bearing tooth here is therefore the
SAFETY property, not the feature: with NO conf present the reader must return ZERO flags and an EMPTY
cache-key token, so adopting the lib cannot change one byte of one artifact until somebody writes a row.
THE CACHE-KEY TOOTH IS NOT DECORATION. nx_sov_build_run caches artifacts under a key that today encodes
the compiler sha, the assembler sha and the debug flag. A mode that changes emitted code without
entering that key would serve an artifact compiled under the OTHER mode and present it as a cache hit --
silently correct-looking and wrong. So the gate asserts two different modes yield two different tokens,
and that no mode yields an empty one.
Fixture is PER-RUN via gk_fixture_dir, so two concurrent runs cannot clobber each other into a false
SKIP -- the defect measured on nx_bck_elide_gate the same day this shipped.
exit: 0 GREEN . 1 RED license_tier: ORIGINAL No hw writes.
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.nxnx_buildmode_lib.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
| 23 | const BG_PATH: i64 = 1024 |
| 24 | const BG_CAP: i64 = 512 |
| 25 | const BG_SLOTS: i64 = 16 |
functions
| 27 | func bg_write(path: *u8, text: *u8) -> i64 |
| 38 | func main(argc: i64, argv: *i64) -> i64 |