code wiki / _hdl_build / nx_food_provenance.nx
nx_food_provenance.nx
buildroot/runtime/_hdl_build/nx_food_provenance.nx
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
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
| 18 | func fd_source_admissible(prefix: *u8, code: *u8) -> i64 |
| 36 | func fd_sci_cited(cite: *u8) -> i64 |
| 50 | func fd_sci_cite_of(prefix: *u8, id: *u8, out: *u8) -> i64 |
| 66 | func fd_ingest_recipe(prefix: *u8, ids: *i64, nids: i64, code: *u8) -> i64 |
| 95 | func fd_has_evidence(prefix: *u8, a: *u8, b: *u8) -> i64 |
| 112 | func fd_seed_provenance(prefix: *u8) -> i64 |