code wiki / _hdl_build / _autonomy_meter_gate_authored.nx
_autonomy_meter_gate_authored.nx
buildroot/runtime/_hdl_build/_autonomy_meter_gate_authored.nx
about
_autonomy_meter_gate_authored.nx -- gate for X-AUT-002. Drives the REAL meter elf
over epoch-unique scratch ledgers with KNOWN ratios (a meter you cannot verify is
worse than no meter):
K1 KNOWN-RATIOS 4 DONE rows (2 MARKed) + 4 PULSE-RUNs + 2 DAEMON-BEATs + 1 ENG
DONE (0 MARK) -> a1=500 a3=500 a4=0 permil=250 grade=D in the row
K2 EMPTY-WORLD empty ledgers -> all axes 0, permil=0, grade=F, exit STILL 0
(measuring a bad grade is success; failing to measure is failure)
K3 LIVE real ledgers -> exit 0 + AUTMETER row appended
Markers: AMG-*; final AMGATE row -> knowledge/status/autonomy_meter.log
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_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
| none |
functions
| 12 | func ag_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 13 | func ag_f(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 } |
| 14 | func ag_n(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m; sys_write(fd,"-" as *u8,1)}; 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{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } |
| 15 | func ag_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 16 | func ag_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } called by 1: ag_mkpath |
| 17 | func ag_numcat(dst: *u8, off: i64, v: i64) -> i64 |
| 28 | func ag_mkpath(dst: *u8, epoch: i64, suffix: *u8) -> i64 |
| 35 | func ag_writes(path: *u8, s: *u8) -> i64 |
| 42 | func ag_run(qp: *u8, plp: *u8, dlp: *u8, olp: *u8) -> i64 |
| 64 | func ag_has(path: *u8, pat: *u8) -> i64 |
| 84 | func ag_chk(label: *u8, ok: i64, bad: *i64) -> i64 |
| 90 | func main() -> i64 |