code wiki / _hdl_build / nx_debt_plane_check.nx

nx_debt_plane_check.nx

buildroot/runtime/_hdl_build/nx_debt_plane_check.nx

3455 B62 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic debt
docsdependenciesstructsconstsfunctions

about

nx_debt_plane_check.nx -- READ-ONLY damage report for the debt- plane. WHY THIS EXISTS AS A SEPARATE, ARGLESS ORGAN: nx_plane_repair takes a <prefix> argument, /api/gate_run is argless (seq1384), and a newly-registered MCP tool is unreachable until a reconnect (seq1349). So the one number an operator needs before deciding whether to accept permanent loss -- HOW MANY ROWS -- could not be obtained on the NAS at all. This closes that: no arguments, no writes, no confirm, nothing to get wrong. ★IT CANNOT REPAIR. It shares the loader with nx_plane_repair but has no write path whatsoever, so running it can never accept the loss by accident. Accepting permanent loss stays an explicit operator act with an explicit confirm, on a tool that records a receipt. This one only tells you the size of the decision. usage: nx_debt_plane_check (CWD = the store root) exit 0 = plane healthy · 1 = LOSSY (declared > reachable) · 2 = read truncated, numbers untrustworthy license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_store_seed_lib.nx nx_debt_plane_check.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 sys_mmap 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 ssl_hash_entry ↻ ssl_key_eq ↻ ss_manifest_free sys_munmap ↻ sys_munmap ↻ ssc_retire_handle

structs

none

consts

18const DC_CAP: i64 = 33554432

functions

20func 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
21func 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
23func main() -> i64