8000 Add traceable material catalogue (identity, grade, lot) with audited data corrections by rafatahmed · Pull Request #26 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content

Add traceable material catalogue (identity, grade, lot) with audited data corrections - #26

Merged
rafatahmed merged 12 commits into
mainfrom
feat/traceable-catalogue
Oct 19, 2026
Merged

rafatahmed merged 12 commits into
mainfrom
feat/traceable-catalogue

Conversation

@rafatahmed
@rafatahmed rafatahmed commented Oct 18, 2026 •
Copy link
Copy Markdown
Owner

Summary

Traceable material catalogue: every number FlahaX calculates with can be traced to a chemical identity and a source document. This answers the 2026-10-17 benchmark's "253 vs 28 products" point with traceability rather than count. Stacked on #25.

  • Three layers. Identity (shipped material_identities.json, 28 products plus the CH - micro assumed blend). Grade (from a technical data sheet). Lot (from a certificate of analysis). Every grade and lot needs a document reference.
  • Analysis basis. Each nutrient records its basis: lot_measured > grade_typical > grade_minimum > identity_theoretical; existing values are declared_catalogue.
  • New functions. make_grade, make_lot, resolve_material, nutrient_band. catalogue_dose_totals and calculate_irrigation_ec accept materials=. Provenance is recorded in the irrigation EC and plan_equilibrium_delivery audits.
  • Undisclosed factory blends. Usable for mass balance; chemistry is refused (composition_undisclosed).
  • Delivered-nutrient band. Built from grade and lot ranges by recalculating the same doses; the recipe is not re-solved.

Data corrections (change recipe numbers; before/after values in CHANGELOG)

  • Mg Nitrate is now Mg(NO₃)₂·6H₂O (D1): N_NO3 10.93 %, Mg 9.48 %.
  • Phosphoric Acid (75%): P changes from 31.61 % to 23.71 %, so the same grams deliver about 25 % less P.
  • Chelates carry sodium counterions in the chemistry totals only (D2); formulation elements are unchanged.
  • Borax is declared as Na⁺ + B(OH)₄⁻ + B(OH)₃.
  • Calcium Nitrate is attributed to the Haifa Cal NG data sheet (D3).

Evidence: docs/audit/2026-10-18-materials-identity/ (materials audit plus maintainer review). Design and plan: docs/superpowers/specs/2026-10-18-traceable-catalogue-design.md, docs/superpowers/plans/2026-10-18-traceable-catalogue.md. User guide: docs/materials.md.

Follow-ups (documented)

  • Provenance on recommend and forward results.
  • Reporting chelate sodium in formulation rows.
  • Chemistry (pH, precipitation, EC) at the ends of the nutrient band.

Test plan

  • Full suite: 253 tests OK locally
  • Live PHREEQC product replay passes; no fixture recapture was needed
  • API reference --check and release hygiene tests pass
  • CI green

< 10000 /p>

Base automatically changed from feat/irrigation-ec-m1 to main October 18, 2026 22:23
@rafatahmed
rafatahmed merged commit 6614173 into main Oct 19, 2026
4 checks passed
@rafatahmed
rafatahmed deleted the feat/traceable-catalogue branch October 19, 2026 06:24
@rafatahmed rafatahmed self-assigned this Oct 19, 2026
rafatahmed added a commit that referenced this pull request Nov 7, 2026
Add traceable material catalogue (identity, grade, lot) with audited data corrections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0