code wiki / _hdl_build / nx_presubmit_lib.nx
nx_presubmit_lib.nx
buildroot/runtime/_hdl_build/nx_presubmit_lib.nx
about
nx_presubmit_lib.nx -- PRE-SUBMIT correctness guard (stage 1 of the 3-stage lifecycle: catch BEFORE a
build cycle is spent, to save token waste). The at-submit dup_shadow warning (seq207) fires AFTER a build;
this fires BEFORE, so a session/agent never spends a build+revert on a name collision (the nx_emit landmine
2026-07-21 was caught at-submit and cost a full cycle -- this makes it a one-call pre-check).
Composes: nx_build_admit = the RESOURCE pre-submit gate (headroom); this = the CORRECTNESS pre-submit gate
(name/collision). Dogfoods the nx_estr shared base (2nd adopter). ZERO deps beyond nx_syscalls+nx_estr so a
preflight can never itself be the heavy thing that fails. license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_estr.nx
imported by: nx_presubmit.nxnx_presubmit_gate.nx
structs
| none |
consts
| 11 | const PS_DIRBUF: i64 = 65536 // getdents read buffer (rule 11: named, not an inline magic number) |
functions
| 14 | func ps_has(dir: *u8, name: *u8) -> i64 |
| 49 | func ps_check(name: *u8, hdl: *u8, rt: *u8, out: *u8) -> i64 |