code wiki / _hdl_build / nx_planecap_gate.nx

nx_planecap_gate.nx

buildroot/runtime/_hdl_build/nx_planecap_gate.nx

6044 B118 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_planecap_gate.nx -- WHICH PLANES HAVE OUTGROWN THE 1 MiB READER CAP? A verifier, not a fixer. ★WHY THIS EXISTS. Three organs in one session presented a TRUNCATED SCAN AS THEIR VERDICT because a compile-time cap was outgrown by the corpus: nx_debt_hygiene (1 MiB -> hid 21 of 23 sev-9 debts), nx_dbthyg (same bug in the superset organ), nx_tooldiff (512 rows -> INVENTED a capability regression). A grep finds **71** organs carrying `_CAP: i64 = 1048576`. Bulk-editing 71 files blind would be reckless and most of those caps are legitimately bounded (a per-page or per-document scratch buffer is not a hazard). ★THE ACTIONABLE QUESTION IS NOT "who has a cap" BUT "whose CORPUS HAS PASSED IT" -- so this measures the planes and names the ones that are live hazards TODAY. ★IT DOES NOT EDIT ANYTHING. A tool that auto-raised 71 caps would be a mass rewrite justified by a pattern rather than by measurement, which is the same reasoning error in the other direction. This produces the list; a human raises the caps that matter, with the plane size as the evidence. METHOD: every `<prefix>-manifest.txt` under knowledge/store/ names a live plane. Load each with a 32 MiB cap and report its true byte size. Anything at or above 1 MiB is flagged: any reader still sized at 1048576 will silently truncate ITS verdict on that plane. usage: nx_planecap_gate (CWD = the store root) exit 0 = no plane has outgrown the 1 MiB reader cap · 1 = at least one has (list printed) license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_store_seed_lib.nx nx_planecap_gate.nx

imports: nx_syscalls.nxnx_store_seed_lib.nx

imported by: nobody (leaf or entry point)

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

main w sys_write sys_mmap sys_openat_rd sys_exit sys_getdents64 dirent_reclen sts_load_honest ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_cat ↻ ss_loadfile sys_map_file ss_readall ss_load_aux2 sys_mmap ↻ ss_cat ↻ ss_loadfile ↻ ss_r32 sys_munmap ssl_total_keys ss_r32 ↻ ssl_pow2 ssl_build ss_r32 ↻ ssl_hash_entry ssl_key_eq ss_r32 ↻ ssl_lookup

structs

none

consts

25const PC_READ: i64 = 33554432
26const PC_DANGER: i64 = 1048576
27const PC_WARN: i64 = 786432 // 75% of the cap -- outgrowing it soon is worth knowing before it bites

functions

29func w(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
30func wn(v: i64) -> i64 { let t: *u8=sys_mmap(28); var m: i64=v; var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let b: *u8=sys_mmap(28); var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
32func main() -> i64