code wiki / _hdl_build / nx_sprawl_ratchet.nx
nx_sprawl_ratchet.nx
buildroot/runtime/_hdl_build/nx_sprawl_ratchet.nx
about
nx_sprawl_ratchet.nx -- the MULTI-AXIS keep-it-gone ratchet: generalizes nx_sovaudit_ratchet (debt only) to
ALL three cleanliness axes from the scorecard -- third-party DEBT, shadow COLLISIONS, SCRATCH accumulation.
Each axis has its OWN locked floor in the sovereign seg_store; on each run an axis may HOLD or FALL (ratchets
its floor down + locks it), but any RISE is a REGRESSION on that axis = the composite verdict goes RED. Run
standing (conductor pulse) and NO new sprawl can creep in on ANY axis without tripping it -- the comprehensive
"stop fucking up" guard. Composes the read-only detectors; the only write is the 3 floors. license_tier: ORIGINAL
dependencies 3 imports · 1 importers
imports: nx_sovereignty_scorecard.nxnx_seg_store.nxnx_syscalls.nx
imported by: nx_sprawl_ratchet_gate.nx
structs
| none |
consts
| 11 | const SPR_STORE: *u8 = "knowledge/store/sprawl-ratchet" |
| 12 | const SPR_NOFLOOR: i64 = 1000000000 |
functions
| 14 | func spr_atoi(s: *u8, n: i64) -> i64 { var v: i64=0; var i: i64=0; while i<n { v = v*10 + ((s[i] as i64)-48); i=i+1 } return v } called by 1: spr_floor_get |
| 15 | func spr_itoa(v: i64, out: *u8) -> i64 { var m: i64=v; var k: i64=0; if m==0 { out[0]=48 as u8; return 1 } let t: *u8=sys_mmap(24); var nn: i64=0; while m>0 { t[nn]=(48+(m%10)) as u8; m=m/10; nn=nn+1 } while k<nn { out[k]=t[nn-1-k]; k=k+1 } return nn } |
| 17 | func spr_floor_get(axis: *u8) -> i64 |
| 25 | func spr_floor_set_all(d: i64, c: i64, s: i64) -> i64 |
| 35 | func spr_one(floor: i64, current: i64, reg_out: *i64) -> i64 |
| 45 | func spr_check_all(debt: i64, coll: i64, scratch: i64, reg_out: *i64) -> i64 |