code wiki / _hdl_build / nx_consol_apply.nx
nx_consol_apply.nx
buildroot/runtime/_hdl_build/nx_consol_apply.nx
about
nx_consol_apply.nx -- GATED CONSOLIDATION APPLIER (2026-07-20, closes the atlas-consolidation loop:
detect[nx_consolidate] -> classify[reachability] -> APPLY[here], behaviour-preserving BY CONSTRUCTION).
The never-brick proof for retiring a dup shadow: build the affected target (BEFORE), retire the shadow,
rebuild (AFTER). If AFTER == BEFORE byte-for-byte, the shadow was NEVER in the build -> retiring it is
PROVEN behaviour-neutral -> CONSOLIDATED. If it differs (or the build changes/breaks), the shadow WAS
live -> RESTORE it and REFUSE. Retire = MOVE (rule 13 additive: the shadow is relocated, never deleted;
rollback = move it back). No source is edited; a seat/PM points this at one proposal from the consolq- plane.
argv: <shadow-path> <retire-path> <buildelf> <buildarg> <artifact-path>
exit: 0 CONSOLIDATED | 1 REFUSED-live-shadow (restored) | 2 usage/shadow-absent | 3 build/move error (restored)
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 4 imports · 0 importers
imports: nx_seat_drive_lib.nxnx_seg_store.nxnx_deploy_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
structs
| none |
consts
| 16 | const CA_CAP: i64 = 2097152 |
functions
| 18 | func ca_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 27 | func ca_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd >= 0 { sys_close(fd); return 1 } return 0 } |
| 28 | func ca_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64 { if an != bn { return 0 } var i: i64 = 0; while i < an { if a[i] != b[i] { return 0 } i = i + 1 } return 1 } called by 1: main |
| 30 | func main(argc: i64, argv: *i64) -> i64 |