code wiki / (root) / nx_library_exceed.nx

nx_library_exceed.nx

buildroot/runtime/nx_library_exceed.nx

18874 B317 linesdepth 8pulls 11 transitivereach 0 importersview sourcekind tooltopic library
docsdependenciesstructsconstsfunctions

about

nx_library_exceed.nx -- MEASURED exceed benchmark for the public publication library (nishifamily.com/library). Two halves, both honest: A) DATA-DRIVEN CENSUS -- reads knowledge/registry/library_sclass_capability_target.tsv and counts HAVE / PARTIAL / MISSING (coverage permil = (have*1000 + partial*500)/total). Self-assessment vs the sourced best-practice target, NOT an exceed claim. Re-runs as the TSV evolves. B) PROOF-BY-RUN of the genuine FORMAT-MOAT exceed axes -- the cells where incumbents (Calibre-Web, Kavita, Komga, Internet Archive) have NOTHING and we PROVE the capability by RUNNING the real UXF organs (no cell asserted true without a passing run): P1 LIB02 publication record round-trips through the envelope -> CID byte-stable P2 LIB02 the CID self-describes as the DOC profile (no out-of-band schema) P3 LIB04 tampering one byte CHANGES the CID (tamper-evident integrity by construction) P4 LIB04 same record, fields in different insertion order -> SAME CID (dedupe/determinism) P5 LIB09 tolerant-reader preserves an UNKNOWN field + known key still resolves == Dublin Core's own "Dumb-Down Principle" (lib_dublin.txt:158), proven in OUR format NO-FABRICATION negative controls (must come out NEGATIVE, proving the metric is not rigged): N1 two DIFFERENT publications -> DISTINCT CIDs (a collision would fail) N2 an absent capability stays absent: LIB01 (OPDS) MUST read MISSING in the TSV VERDICT GREEN iff census parsed rows AND every P1..P5 passed AND every neg-control held. This is the measured-exceed discipline (no self-grade, no fabrication); it is NOT a beats-Wikipedia-on-scale claim. No hardware writes, no network, no production side effects (Rule 26). license_tier: ORIGINAL

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_canon_cid.nx nx_uxf_cid.nx nx_uxf_decode.nx nx_native_config.nx nx_library_exceed.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_canon_cid.nxnx_uxf_cid.nxnx_uxf_decode.nxnx_native_config.nx

imported by: nobody (leaf or entry point)

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

main lx_p sys_write sys_mmap lib_fresh_prefix sys_now_ms sys_mmap ↻ sys_clock_gettime_mono sys_mmap ↻ lib_census_seed ncfg_begin ss_begin ss_begin_cap sys_mmap ↻ lib_row sys_mmap ↻ ncfg_add_row sys_mmap ↻ canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap ncfg_key ss_add ss_add2 ss_w32 ss_len ncfg_set_count sys_mmap ↻ ncfg_count_key ncfg_itoa sys_mmap ↻ ss_add ↻ ncfg_commit ss_commit ss_segid_ok sys_mmap ↻ ss_cat

structs

none

consts

30const LX_MAGIC_8192: i64 = 8192
32const LX_CENSUS_PREFIX: *u8 = "knowledge/store/library-census-"
33const LX_LOG: *u8 = "knowledge/status/library_exceed.log"

functions

35func lx_p(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
40func lx_n(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
41func lx_fp(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
46func lx_fn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 1: main calls 1: nxi_fd
48func lx_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 }
51func lib_fresh_prefix(out: *u8, base: *u8) -> i64
called by 1: main calls 2: sys_now_mssys_mmap
66func lib_row(w: *i64, idx: i64, id: *u8, dim: *u8, bic: *u8, status: *u8, angle: *u8) -> i64
77func lib_census_seed(prefix: *u8) -> i64
97func lib_census_native(h: *i64, cnts: *i64) -> i64
120func lib_status_native(h: *i64, want: *u8, out: *u8) -> i64
144func lx_find(dk: *i64, dv: *i64, nf: i64, key: *u8) -> *u8
called by 1: main calls 1: lx_streq
152func mk_pub(flavor: i64, canon: *u8) -> i64
called by 1: main calls 2: sys_mmapcanon_encode
181func main() -> i64