code wiki / _hdl_build / nx_ecomat_domledger_lib.nx
nx_ecomat_domledger_lib.nx
buildroot/runtime/_hdl_build/nx_ecomat_domledger_lib.nx
about
nx_ecomat_domledger_lib.nx -- emit the PER-DOMAIN maturity ledger, the missing data that makes
growth attribution exact.
WHY: the aggregate ledger keeps only sum_cur/sum_bar/domains, so once a domain is added you can
never again separate a rung CLIMBED from a rung DECLARED (measured 2026-07-31: only 406 permil of
observed movement was attributable). Writing who held what, per beat, closes that permanently.
The walk mirrors em_rollup_store EXACTLY -- same key order, same live-derive override via
em_domain_level -- so the per-domain rows must reconcile with the aggregate to the level. The
sibling gate asserts that reconciliation; two derivations of the same quantity that are never
compared are just two chances to be wrong.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 4 importers
imports: nx_ecomat_lib.nx
imported by: nx_ecomat_beat.nxnx_ecomat_domledger.nxnx_ecomat_domledger_gate.nxnx_sota_page.nx
structs
| none |
consts
| 15 | const EDL_LOG: *u8 = "knowledge/status/ecomat_domains.log" |
| 16 | const EDL_MODE: i64 = 0x1a4 |
| 17 | const EDL_KEY_CAP: i64 = 64 |
| 18 | const EDL_SUMS: i64 = 2 |
| 26 | const EDL_LINE_CAP: i64 = 512 |
functions
| 32 | func edl_apps(b: *u8, cap: i64, o: i64, s: *u8) -> i64 |
| 43 | func edl_appn(b: *u8, cap: i64, o: i64, v: i64) -> i64 |
| 60 | func edl_appc(b: *u8, cap: i64, o: i64, c: i64) -> i64 called by 1: edl_walk |
| 71 | func edl_walk(prefix: *u8, fd: i64, now: i64, sums: *i64) -> i64 |
| 120 | func edl_end(fd: i64, now: i64, n: i64, sums: *i64) -> i64 |