code wiki / (root) / nx_gendiff.nx

nx_gendiff.nx

buildroot/runtime/nx_gendiff.nx

8465 B177 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_gendiff.nx -- the GENERATION DIFF that nx_plane_repair names and does not have. WHY. knowledge/store/debt- reads declared_qn=3696 beyond_qn=1: ONE key is reachable past the declared count, and that single key fails every nx_debt add/eat CLOSED, because add/eat re-seed the whole plane from the loaded buffer and committing would orphan it. nx_plane_repair refuses for exactly the right reason -- "reseeding would revive eaten rows and duplicate live ones -- that needs a generation diff, not a reconcile." Both organs failing closed is the system working. What is missing is the ability to SAY WHAT THE EXTRA ROW ACTUALLY IS. (STAR)A REFUSAL THAT NAMES THE MISSING CAPABILITY IS A SPECIFICATION -- BUILD THE THING IT NAMED, DO NOT WEAKEN THE REFUSAL. THE AMBIGUITY, STATED PRECISELY. A key past q:n is one of three things, needing opposite actions: SUPERSEDED byte-identical to a loaded row -> already represented, safe to leave behind REVIVED an id an earlier eat deliberately closed -> must NOT come back LOST-APPEND a DISTINCT row never counted -> real filed work; discarding it is silent data loss The estate's loader documents only the SUPERSEDED story because it was reasoned about for a plane that SHRANK. This plane GREW (3,621 -> 3,696 today), which makes LOST-APPEND the leading hypothesis and the exact case where reconciling q:n downward destroys evidence. (STAR)A STORE'S DOCUMENTED FAILURE MODE IS THE ONE ITS AUTHOR HAPPENED TO MEET; THE OPPOSITE DIRECTION GETS THE SAME SYMPTOM AND THE OPPOSITE REMEDY. THIS ORGAN WRITES NOTHING. It classifies and prints; deciding is a separate deliberate act. license_tier: ORIGINAL No hw writes. Read-only.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_store_seed_lib.nx nx_seg_store.nx nx_gendiff.nx

imports: nx_syscalls.nxnx_store_seed_lib.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gd_puts sys_write 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 ↻ sts_load_honest sts_gen_note sts_pfxhash ss_max_segid sys_mmap ↻ ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ss_segid_ok ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat ↻ sys_fstatat ssc_streq ss_open ss_open2

structs

none

consts

28const GD_CAP: i64 = 16777216
29const GD_PROBE: i64 = 4096
30const GD_MISSRUN: i64 = 512
31const GD_SHOW: i64 = 240

functions

38func main(argc: i64, argv: *i64) -> i64
112func gd_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
113func gd_putn(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
124func gd_id_present(buf: *u8, n: i64, p: *u8, ln: i64) -> i64
called by 1: main
148func gd_line_present(buf: *u8, n: i64, p: *u8, ln: i64) -> i64
called by 1: main
167func gd_rowkey(seq: i64, out: *u8) -> i64
called by 1: main calls 1: sys_mmap