code wiki / (root) / nx_commons_ledger_e2e_gate.nx

nx_commons_ledger_e2e_gate.nx

buildroot/runtime/nx_commons_ledger_e2e_gate.nx

5840 B114 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic commons
docsdependenciesstructsconstsfunctions

about

nx_commons_ledger_e2e_gate.nx -- PERSIST -> RELOAD -> AGGREGATE against the real seg-store. WHY THIS EXISTS: nx_commons_ledger_gate proved the aggregator over rows held in memory. That is NOT evidence that the ledger survives a restart, and I nearly let "the ledger persists" stand on it. AN AGGREGATOR PROVEN OVER AN IN-MEMORY FIXTURE HAS PROVEN NOTHING ABOUT DURABILITY. Here the rows go through sts_seed / sts_append_row into a real plane, and come back through sts_load_honest into a FRESH buffer that never saw the write side. sts_load_honest, not sts_load: it reports truncation. A bounded read that silently returns a prefix is how this estate once served a log's HEAD as its TAIL and declared a live guard dead for 12.5 days. If the plane outgrows the buffer this gate must say so, not quietly aggregate half a ledger. ⚠ sts_seed RETURNS A COUNT -- positive is success, not failure. Throwaway prefix by construction; it never touches a production plane. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_gate_verdict.nx nx_store_seed_lib.nx nx_commons_ledger.nx nx_commons_ledger_e2e_gate.nx

imports: nx_gate_verdict.nxnx_store_seed_lib.nxnx_commons_ledger.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 ↻ gv_head gv_puts sys_write ↻ sts_mm sys_mmap ↻ sts_werr sys_write ↻ sys_exit ↻ cl_emit_row cl_putn cl_ndigits sts_seed sts_pfxhash ss_begin_cap sys_mmap ↻ sts_mm ↻ sts_rowkey ss_catn sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len

structs

none

consts

20const E2_CAP: i64 = 65536
21const E2_MAXROWS: i64 = 32
22const E2_M: i64 = 3

functions

24func main() -> i64