code wiki / _hdl_build / nx_food_provenance.nx

nx_food_provenance.nx

buildroot/runtime/_hdl_build/nx_food_provenance.nx

8360 B157 linesdepth 4pulls 5 transitivereach 25 importersview sourcekind librarytopic food
docsdependenciesstructsconstsfunctions

about

nx_food_provenance.nx -- LIB: the LICENSE / PROVENANCE + ANTI-BRO-SCIENCE layer for the Nishi food branch (operator: "ingest recipes that aren't copyrighted or otherwise flagged to a person ... uses research not bro science"). Three guarantees, all data-driven (seg-store, no TSV) and FAIL-CLOSED by construction: 1. ADMISSIBILITY GATE -- fd_source_admissible: only explicitly-admissible licenses pass (PD, CC0, CC-BY, CC-BY-SA, ODbL, US-Gov, or pure non-copyrightable FACTS = ingredient lists/ratios). Copyrighted (ARR), personal/flagged, AND unknown licenses are REFUSED. Recipe FACTS are not copyrightable (17 USC 102(b)); creative prose is -- so we ingest the facts, never the prose, never a person's flagged data. 2. FACTS-ONLY INGESTION -- fd_ingest_recipe: writes ingredient co-occurrence facts (food:eob:<a>:<b>), never names/headnotes/prose. Refuses inadmissible sources LOUD (returns 0). 3. ANTI-BRO-SCIENCE -- fd_sci_cited: every food-science rule (food:sci:<id>) carries a CITE naming a real fetched research source (knowledge/fetched/<cite>.raw); a rule whose source is absent is NOT grounded. Reuses nx_food_science (fd_field/fd_atoi/fd_seg_next/fd_streq_store + ss_*/as_*). license_tier: ORIGINAL

dependencies 3 imports · 10 importers

nx_food_science.nx nx_seg_store.nx nx_syscalls.nx nx_food_provenance.nx nx_ecodesign.nx nx_ecodesign_gate.nx nx_food_ground_gate.nx nx_food_recipe_gate.nx nx_food_recipe_mine.nx nx_garden_gate.nx nx_impact.nx nx_impact_gate.nx nx_perma_mine.nx nx_perma_mine_gate.nx

imports: nx_food_science.nxnx_seg_store.nxnx_syscalls.nx

imported by: nx_ecodesign.nxnx_ecodesign_gate.nxnx_food_ground_gate.nxnx_food_recipe_gate.nxnx_food_recipe_mine.nxnx_garden_gate.nxnx_impact.nxnx_impact_gate.nxnx_perma_mine.nxnx_perma_mine_gate.nx

structs

none

consts

none

functions

18func fd_source_admissible(prefix: *u8, code: *u8) -> i64
36func fd_sci_cited(cite: *u8) -> i64
50func fd_sci_cite_of(prefix: *u8, id: *u8, out: *u8) -> i64
66func fd_ingest_recipe(prefix: *u8, ids: *i64, nids: i64, code: *u8) -> i64
95func fd_has_evidence(prefix: *u8, a: *u8, b: *u8) -> i64
called by 1: main calls 3: sys_mmapas_appendss_get
112func fd_seed_provenance(prefix: *u8) -> i64