code wiki / _hdl_build / nx_capability_shape_audit.nx
nx_capability_shape_audit.nx
buildroot/runtime/_hdl_build/nx_capability_shape_audit.nx
about
nx_capability_shape_audit.nx -- the CAPABILITIES AUDIT on the SIZING/frontier axis (operator: "we need a
capabilities audit"; distinct from the existing nx_capability_audit which classifies design-system
exceed-vs-sovereignty-floor). ONE sovereign walk grades EVERY organ on the perfect-object axis
(nx_capability_shape) + counts un-consolidated GENERATIONS (shadow collisions) = the full curation map:
TOO_SMALL (merge) / PERFECT (right-sized, the climbed-capability count) / TOO_BIG (split), + collisions to
resolve. Writes the metrics to knowledge/status/capability_audit.log so the no-regression safeguard ratchets
them. READ-ONLY walk (one reused buffer + sys_munmap; never-brick). license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_capability_shape.nxnx_janitor_dupname.nxnx_organ_callers.nxnx_syscalls.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
| 12 | const CSA_MAGIC_16384: i64 = 16384 |
| 13 | const CSA_MAGIC_65536: i64 = 65536 |
| 14 | const CSA_MAGIC_4194304: i64 = 4194304 |
| 15 | const CSA_MAGIC_32768: i64 = 32768 |
| 17 | const CSA_LOG: *u8 = "knowledge/status/capability_audit.log" |
functions
| 19 | func aw(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 } |
| 20 | func an(fd: i64, v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(fd,"-" as *u8,1);m=0-m} let t: *u8=sys_mmap(28); 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} var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(fd,b,k); return 0 } |
| 23 | func csa_walk(root: *u8, tally: *i64) -> i64 |
| 72 | func main() -> i64 |