code wiki / _hdl_build / nx_clean_market.nx

nx_clean_market.nx

buildroot/runtime/_hdl_build/nx_clean_market.nx

11203 B147 linesdepth 6pulls 7 transitivereach 2 importersview sourcekind librarytopic clean
docsdependenciesstructsconstsfunctions

about

nx_clean_market.nx -- LIB: the FULL clean-produce MARKET in TWO HONEST TIERS (R-IMPACT-4). Extends the impact catalog to the complete Dirty Dozen (12) PLUS a Clean Fifteen set, and -- this is the point -- proves we MEASURE honestly rather than cherry-pick scary produce: Clean Fifteen crops are genuinely low-residue even conventionally, so their clean GAP is SMALL. We show them anyway, labelled as such. Every item still triple- wins (cleaner + greener + cheaper + higher-margin), but the clean-gap CONTRAST by tier (large for dirty, small for clean) is a falsifiable anti-greenwash property the gate checks. Reuses the existing 8 Dirty-Dozen records (owned by nx_produce) via the tier index; adds 4 dirty + 5 clean. Integer cents (no float). Each record CITEs the regenerative-agriculture corpus; relative rankings follow the published lists. license_tier: ORIGINAL

dependencies 4 imports · 2 importers

nx_impact.nx nx_food_science.nx nx_seg_store.nx nx_syscalls.nx nx_clean_market.nx nx_clean_market_gate.nx nx_link_auto_gate.nx

imports: nx_impact.nxnx_food_science.nxnx_seg_store.nxnx_syscalls.nx

imported by: nx_clean_market_gate.nxnx_link_auto_gate.nx

structs

none

consts

none

functions

15func cm_list(prefix: *u8, indexkey: *u8, outids: *i64) -> i64
44func cm_clean_gap(prefix: *u8, item: *u8) -> i64 { return im_clean(prefix, item, "nishi" as *u8) - im_clean(prefix, item, "conv" as *u8) }
called by 1: cm_tier_avg_gap calls 1: im_clean
47func cm_tier_avg_gap(prefix: *u8, indexkey: *u8) -> i64
called by 1: main calls 3: sys_mmapcm_listcm_clean_gap
58func cm_tier_triple_wins(prefix: *u8, indexkey: *u8, total_out: *i64) -> i64
called by 1: main calls 3: sys_mmapcm_listim_triple_win
70func cm_seed(prefix: *u8) -> i64
113func cm_emit_tier_table(prefix: *u8, indexkey: *u8, out: *u8, off: i64) -> i64
135func cm_render_market(prefix: *u8, out: *u8) -> i64
called by 1: main calls 2: as_appendcm_emit_tier_table