code wiki / _hdl_build / nx_ecomat_domtrend_lib.nx
nx_ecomat_domtrend_lib.nx
buildroot/runtime/_hdl_build/nx_ecomat_domtrend_lib.nx
about
nx_ecomat_domtrend_lib.nx -- EXACT growth attribution from the per-domain ledger.
This is the consumer that closes debt 1785514540. nx_ecomat_trend reads the AGGREGATE ledger and
can only attribute a span whose domain count held still -- measured 406 permil of real movement.
The per-domain ledger (nx_ecomat_domledger) records who held what, so the same question becomes
arithmetic instead of inference: diff two beats BY NAME.
ADVANCEMENT = sum over domains present in BOTH beats of (cur_last - cur_first)
EXPANSION = the levels and bar carried in by domains present ONLY in the later beat
RETIRED = levels carried out by domains present ONLY in the earlier beat
Nothing is ambiguous, because nothing is inferred from a total. A domain that was declared at the
bottom can no longer be mistaken for a domain that climbed, which was the entire defect: the
headline sum_cur/sum_bar falls when you declare a frontier, so the ecosystem's own self-grade
punished expansion and made honest growth unreadable.
SNAPSHOT CHOICE: first beat vs last beat. Intermediate beats are counted and reported but not
diffed pairwise -- the endpoints answer "where are we vs where we started", and reporting the
beat count lets a reader see how much history backs that.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 3 importers
imports: nx_ecomat_trend_lib.nx
imported by: nx_ecomat_domtrend_gate.nxnx_ecomat_domtrend_live_gate.nxnx_sota_page.nx
structs
| none |
consts
| 23 | const DT_LOG: *u8 = "knowledge/status/ecomat_domains.log" |
| 24 | const DT_MAX_D: i64 = 256 |
| 29 | const DT_NAME_CAP: i64 = 128 |
| 30 | const DT_OUT_SLOTS: i64 = 24 |
| 31 | const DT_SPACE: i64 = 32 |
| 33 | const DTO_BEATS: i64 = 0 |
| 34 | const DTO_ROWS: i64 = 1 |
| 35 | const DTO_FIRST_EPOCH: i64 = 2 |
| 36 | const DTO_LAST_EPOCH: i64 = 3 |
| 37 | const DTO_FIRST_N: i64 = 4 |
| 38 | const DTO_LAST_N: i64 = 5 |
| 39 | const DTO_ADVANCE: i64 = 6 |
| 40 | const DTO_EXPAND_CUR: i64 = 7 |
| 41 | const DTO_EXPAND_BAR: i64 = 8 |
| 42 | const DTO_RETIRED_CUR: i64 = 9 |
| 43 | const DTO_COMMON: i64 = 10 |
| 44 | const DTO_NEW: i64 = 11 |
| 45 | const DTO_DECOMP_PERMIL: i64 = 12 |
| 46 | const DTO_CAPPED: i64 = 13 |
| 48 | const DT_ERR_NOLOG: i64 = 0 - 1 |
| 49 | const DT_ERR_ONEBEAT: i64 = 0 - 2 |
| 53 | const DT_ERR_TRUNCATED: i64 = 0 - 3 |
| 57 | const DT_ERR_CAPPED: i64 = 0 - 4 |
| 59 | const DT_END_TAG: *u8 = "ECOMATDOM-END" |
| 60 | const DT_END_TAG_LEN: i64 = 13 |
functions
| 63 | func dt_name(buf: *u8, ls: i64, le: i64, out: *u8) -> i64 |
| 96 | func dt_end_count(buf: *u8, n: i64, epoch: i64) -> i64 |
| 119 | func dt_slot(names: *u8, n: i64, want: *u8) -> i64 called by 1: em_domtrend_buf |
| 131 | func em_domtrend_buf(buf: *u8, n: i64, out: *i64) -> i64 |
| 274 | func em_domtrend(logpath: *u8, out: *i64) -> i64 |