nx_regbatch_gate.nx
buildroot/runtime/nx_regbatch_gate.nx
about
nx_regbatch_gate.nx -- INDEPENDENT GATE: batched durability in reg_put. Correctness FIRST, speed second.
INHERITS nx_gate_verdict (D001).
A speedup that loses rows is not a speedup, so this gate proves the SAFETY properties before it
looks at the clock:
u2605VISIBILITY IS NOT DEFERRED. reg_put_deferred writes the segment and renames the manifest exactly
as reg_put does -- only the power-loss barrier waits. A row must be readable IMMEDIATELY, before
any sync. If that were false the batch would be a lie, so it is asserted first.
u2605THE TWO PATHS MUST AGREE BYTE-FOR-BYTE. Same body, two entry points -- proven by writing the same
record both ways and comparing what comes back. This is the anti-fork tooth: nx_gate_verdict once
forked between trees and an identical migration bought different capability depending on where it
ran. One body cannot fork; this check is what keeps it honest.
u2605THE INDEX SURVIVES. A batched put must still land in the enumeration index, or a fast write that
nothing can find is worse than a slow one.
Only then: u2605the batch must actually be faster, or the whole change is unjustified complexity.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_registry.nxnx_gate_verdict.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
| none |
functions
| 21 | func rb_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } called by 1: main |
| 22 | func rb_catn(dst: *u8, off: i64, v: i64) -> i64 called by 1: main |
| 34 | func main(argc: i64, argv: *i64) -> i64 |