code wiki / _hdl_build / nx_tokroi.nx

nx_tokroi.nx

buildroot/runtime/_hdl_build/nx_tokroi.nx

15577 B302 linesdepth 5pulls 10 transitivereach 1 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_sovjson_lib.nx json_emit.nx nx_store_seed_lib.nx nx_seg_store.nx nx_gate_verdict.nx nx_syscalls.nx nx_tokroi.nx nx_tokroi_report_gate.nx

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

main sj_werr sys_write sys_exit sj_lit_eq sj_vlen sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_write ↻ tr_report sys_mmap ↻ sts_load_honest sts_gen_note sts_pfxhash ss_max_segid sys_mmap ↻ ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ss_segid_ok ss_open_cached ssc_init sys_mmap ↻

structs

none

consts

16const TR_CAP: i64 = 1048576
17const TR_OUT: i64 = 16384
18const TR_SPAN: i64 = 16
19const TR_USAGE: i64 = 2
20const TR_ESC: i64 = 90
23const TR_E_SOURCE: i64 = 1
24const TR_E_OUTPUT: i64 = 2
25const TR_E_ROW: i64 = 3
26const TR_E_ARITHMETIC: i64 = 4
27const TR_E_ALLOC: i64 = 5
28const TR_I64_MAX: i64 = 9223372036854775807
29const TR_FIELDS: i64 = 8
30const TR_NUMERIC_FIELDS: i64 = 4

functions

32func tr_nat(buf: *u8, start: i64, end: i64, dst: *i64) -> i64
called by 1: tr_report_rows
47func tr_key(w: *JsonWriter, key: *u8) -> i64 { return json_emit_key(w, key, sj_vlen(key)) }
50func tr_int(w: *JsonWriter, value: i64) -> i64
called by 2: tr_numbertr_row calls 2: je_sepje_put
65func tr_number(w: *JsonWriter, key: *u8, value: i64) -> i64
69func tr_string(w: *JsonWriter, key: *u8, value: *u8, n: i64) -> i64
73func tr_span(w: *JsonWriter, key: *u8, buf: *u8, bounds: *i64, col: i64) -> i64
called by 1: tr_row calls 1: tr_string
76func tr_flag(w: *JsonWriter, key: *u8, value: i64) -> i64
81func tr_row(w: *JsonWriter, buf: *u8, bounds: *i64, values: *i64, delta: i64, reduction: i64, daily: i64, payback: i64, ceilpay: i64, recognized: i64) -> i64
104func tr_total(w: *JsonWriter, key: *u8, daily: i64, investment: i64, levers: i64) -> i64
113func tr_report_rows(buf: *u8, n: i64, out: *u8, cap: i64, flags: *i64) -> i64
213func tr_report(prefix: *u8, out: *u8) -> i64
226func tr_report_error(out: *u8, code: i64) -> i64
called by 1: main calls 1: sj_cat
234func tr_selftest(base: *u8) -> i64
264func main(argc: i64, argv: *i64) -> i64