code wiki / _hdl_build / nx_tokroi.nx
nx_tokroi.nx
buildroot/runtime/_hdl_build/nx_tokroi.nx
about
nx_tokroi.nx -- TOKEN-EFFICIENCY ROI LEDGER. Values and statuses are declarations;
this report does not resolve evidence references or verify measurement/execution history.
Legacy reduction=max(baseline-after,0), daily=reduction*declared uses, and floor payback
remain available. Additive signed delta exposes regressions; ceiling break-even assumes
comparable units. Only exact REALIZED and PROJECTED states enter their separate totals.
license_tier: ORIGINAL. No hardware writes (Rule 26). expect_exit: 0
report [roiprefix] -> ROI JSON | selftest [tmpprefix] -> gate T1..T5
tokroi- row = id lever status investment baseline after uses_per_day evidence (8-col plane).
dependencies 6 imports · 1 importers
imports: nx_sovjson_lib.nxjson_emit.nxnx_store_seed_lib.nxnx_seg_store.nxnx_gate_verdict.nxnx_syscalls.nx
imported by: nx_tokroi_report_gate.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 16 | const TR_CAP: i64 = 1048576 |
| 17 | const TR_OUT: i64 = 16384 |
| 18 | const TR_SPAN: i64 = 16 |
| 19 | const TR_USAGE: i64 = 2 |
| 20 | const TR_ESC: i64 = 90 |
| 23 | const TR_E_SOURCE: i64 = 1 |
| 24 | const TR_E_OUTPUT: i64 = 2 |
| 25 | const TR_E_ROW: i64 = 3 |
| 26 | const TR_E_ARITHMETIC: i64 = 4 |
| 27 | const TR_E_ALLOC: i64 = 5 |
| 28 | const TR_I64_MAX: i64 = 9223372036854775807 |
| 29 | const TR_FIELDS: i64 = 8 |
| 30 | const TR_NUMERIC_FIELDS: i64 = 4 |
functions
| 32 | func tr_nat(buf: *u8, start: i64, end: i64, dst: *i64) -> i64 called by 1: tr_report_rows |
| 47 | func tr_key(w: *JsonWriter, key: *u8) -> i64 { return json_emit_key(w, key, sj_vlen(key)) } |
| 50 | func tr_int(w: *JsonWriter, value: i64) -> i64 |
| 65 | func tr_number(w: *JsonWriter, key: *u8, value: i64) -> i64 |
| 69 | func tr_string(w: *JsonWriter, key: *u8, value: *u8, n: i64) -> i64 |
| 73 | func tr_span(w: *JsonWriter, key: *u8, buf: *u8, bounds: *i64, col: i64) -> i64 |
| 76 | func tr_flag(w: *JsonWriter, key: *u8, value: i64) -> i64 |
| 81 | func tr_row(w: *JsonWriter, buf: *u8, bounds: *i64, values: *i64, delta: i64, reduction: i64, daily: i64, payback: i64, ceilpay: i64, recognized: i64) -> i64 |
| 104 | func tr_total(w: *JsonWriter, key: *u8, daily: i64, investment: i64, levers: i64) -> i64 |
| 113 | func tr_report_rows(buf: *u8, n: i64, out: *u8, cap: i64, flags: *i64) -> i64 called by 3: tr_reporttrg_casetrg_capacity calls 18: sys_mmapjson_begin_objecttr_stringsj_vlentr_flagtr_key+12 |
| 213 | func tr_report(prefix: *u8, out: *u8) -> i64 |
| 226 | func tr_report_error(out: *u8, code: i64) -> i64 |
| 234 | func tr_selftest(base: *u8) -> i64 |
| 264 | func main(argc: i64, argv: *i64) -> i64 |