code wiki / _hdl_build / nx_debt_plane_check.nx
nx_debt_plane_check.nx
buildroot/runtime/_hdl_build/nx_debt_plane_check.nx
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
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
structs
| none |
consts
| 18 | const DC_CAP: i64 = 33554432 |
functions
| 20 | func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 21 | func 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 } |
| 23 | func main() -> i64 |