code wiki / _hdl_build / nx_ecomat_seed_clobber_gate.nx

nx_ecomat_seed_clobber_gate.nx

buildroot/runtime/_hdl_build/nx_ecomat_seed_clobber_gate.nx

9135 B175 linesdepth 9pulls 19 transitivereach 0 importersview sourcekind gate/prooftopic ecomat
docsdependenciesstructsconstsfunctions

about

nx_ecomat_seed_clobber_gate.nx -- proves the ANTI-CLOBBER guard in nx_ecomat_seed BITES. ★WHY (measured 2026-08-07). ss_commit REPLACES a plane with the write-set handed to it (nx_ecomat_put.nx:66, gate-proven). nx_ecomat_seed authors its domains from SOURCE and never reloads, so the moment the live plane carries a domain the source does not author, running the seeder DELETES it. Measured that day: the live plane held 26 domains, the laptop source authored 23 and the NAS source 22 -- so either one destroyed 3-4 domains AND REPORTED GREEN, because the success check was a hardcoded `ver == N` equality that had been hand-edited down to match. ★THE GUARD IS KEYED ON IDENTITY, AND THIS GATE'S JOB IS TO PROVE THAT DISTINCTION IS REAL. A count-based shrink refusal was built in the SHARED PRIMITIVE on 2026-08-02 and reverted before promote (nx_store_seed_lib.nx:207) because it broke legitimate whole-plane rewriters. Debt 1785710884 concluded such a guard belongs at the PLANE-WRITER layer. T5 below is the anti-vacuity tooth for exactly that: a plane whose ROW COUNT SHRINKS but whose every NAME survives must still be ALLOWED. A naive count-based reimplementation passes T1-T4 and FAILS T5, which is the point -- a tooth the trivial wrong implementation can also pass proves nothing. Forks the REAL resolved nx_ecomat_seed.elf via ar_resolve (never a hardcoded path -- the 127-vacuous lesson), so what is proven is the artifact that actually runs. T0 asserts the subject was FOUND, because an absent artifact (exit 127) is indistinguishable from a passing refusal. license_tier: ORIGINAL expect_exit: 0

dependencies 4 imports · 0 importers

nx_ecomat_lib.nx nx_artifact_root.nx nx_gate_verdict.nx nx_syscalls.nx nx_ecomat_seed_clobber_gate.nx

imports: nx_ecomat_lib.nxnx_artifact_root.nxnx_gate_verdict.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 ↻ _p el_len sys_write ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_mmap ↻ eg_pfx _fn sys_mmap ↻ sys_write ↻ eg_make ss_begin ss_begin_cap sys_mmap ↻ ec_seed_one sys_mmap ↻ ec_key sys_mmap ↻ ec_reclen el_len ↻ ec_pack ss_w32

structs

none

consts

27const EG_EXIT_REFUSED: i64 = 4
28const EG_EXIT_NOTFOUND: i64 = 127
29const EG_AUTHORED: i64 = 23 // rows the seeder authors from source; T5 needs a fixture ABOVE this
30const EG_SHRINK_ROWS: i64 = 26 // > EG_AUTHORED so T5 is a genuine count-shrink
31const EG_MODE: i64 = 420

functions

34func eg_count(prefix: *u8) -> i64
called by 1: main calls 4: ss_opensys_mmapec_keyss_hget
49func eg_has(prefix: *u8, name: *u8) -> i64
70func eg_make(prefix: *u8, rows: i64, name: *u8) -> i64
82func eg_run(prefix: *u8) -> i64
110func eg_pfx(out: *u8, ep: i64, tag: *u8) -> i64
called by 1: main
120func main() -> i64