code wiki / _hdl_build / nx_ecomat_domledger_lib.nx

nx_ecomat_domledger_lib.nx

buildroot/runtime/_hdl_build/nx_ecomat_domledger_lib.nx

6379 B139 linesdepth 4pulls 5 transitivereach 4 importersview sourcekind librarytopic ecomat
docsdependenciesstructsconstsfunctions

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

nx_ecomat_lib.nx nx_ecomat_domledger_lib.nx nx_ecomat_beat.nx nx_ecomat_domledger.nx nx_ecomat_domledger_gate.nx nx_sota_page.nx

imports: nx_ecomat_lib.nx

imported by: nx_ecomat_beat.nxnx_ecomat_domledger.nxnx_ecomat_domledger_gate.nxnx_sota_page.nx

structs

none

consts

15const EDL_LOG: *u8 = "knowledge/status/ecomat_domains.log"
16const EDL_MODE: i64 = 0x1a4
17const EDL_KEY_CAP: i64 = 64
18const EDL_SUMS: i64 = 2
26const EDL_LINE_CAP: i64 = 512

functions

32func edl_apps(b: *u8, cap: i64, o: i64, s: *u8) -> i64
called by 2: edl_walkedl_end
43func edl_appn(b: *u8, cap: i64, o: i64, v: i64) -> i64
called by 2: edl_walkedl_end
60func edl_appc(b: *u8, cap: i64, o: i64, c: i64) -> i64
called by 1: edl_walk
71func edl_walk(prefix: *u8, fd: i64, now: i64, sums: *i64) -> i64
120func edl_end(fd: i64, now: i64, n: i64, sums: *i64) -> i64
called by 3: mainmainmain calls 2: edl_appsedl_appn