8000 fix: remove extension-based presets and agronomic advice · rafatahmed/Flahax@094b4e0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 094b4e0

Browse files
committed
fix: remove extension-based presets and agronomic advice
Remove unqualified crop presets and embedded pH and bicarbonate guidance. Preserve explicit targets, chemical calculations, and archived evidence; use synthetic solver witnesses and update migration documentation. Refs #202.
1 parent 1d7d681 commit 094b4e0

27 files changed

Lines changed: 143 additions & 123 deletions

‎CITATION.cff‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ references:
215215
authors:
216216
- name: Howard Resh
217217
- name: Douglas Peckenpaugh
218-
- name: University of Florida
219218
- name: maximumyield
220219
- name: Growing Edge
221220
- name: schundler.com

‎NOTICE‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ underlying measurements.
8787

8888
7. Crop formulas (src/flahax/data/library.json, "formulas")
8989
- Published nutrient formulas as named in the library: Howard Resh;
90-
Douglas Peckenpaugh; maximumyield; Growing Edge; University of
91-
Florida; schundler.com; and the Hoagland solution (Hoagland and Arnon).
90+
Douglas Peckenpaugh; maximumyield; Growing Edge; schundler.com; and the Hoagland solution (Hoagland and Arnon).
9291

9392
Trademarks (YaraLiva, YaraTera, Calcinit, Krista, Ultrasol, Haifa) belong
9493
to their owners and are used only to identify sources.

‎docs/delivery-control-design.md‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ plan_ph(water_analysis, reagent, target_ph, target_residual_alkalinity,
178178

179179
The plan should provide the initial calculated dose, the elemental additions, valid operating range, and a mandatory post-mix measurement request. Automatic closed-loop correction should be bounded by maximum dose per event, minimum mix time, sensor freshness, and an operator alarm threshold.
180180

181-
For many hydroponic systems, nutrient-solution pH is commonly managed around 5.0–6.0, but this is a starting range, not a universal setpoint; the crop and root-zone system own the target. Oklahoma State notes both the importance of pH/EC monitoring and the common 5.0–6.0 range for hydroponics [Hydroponics](https://extension.okstate.edu/fact-sheets/hydroponics) and [EC and pH guide](https://extension.okstate.edu/fact-sheets/electrical-conductivity-and-ph-guide-for-hydroponics).
182181

183182
## 4. Dosing-hardware model
184183

@@ -289,10 +288,5 @@ These rules keep the current lightweight package intact: FlahaX can remain depen
289288
- Parkhurst, D. L. and Appelo, C. A. J. (2013). *Description of Input and Examples for PHREEQC Version 3*. U.S. Geological Survey Techniques and Methods 6-A43. DOI: [10.3133/tm6A43](https://doi.org/10.3133/tm6A43). Reference for activity-based aqueous speciation, saturation indices, mixing, and equilibrium validation.
290289
- “The Formation of Calcium Phosphate Precipitation in Nutrient Solution for Hydroponic Cultivation” (1993). DOI: [10.1080/00380768.1993.10419799](https://doi.org/10.1080/00380768.1993.10419799). Direct evidence for treating calcium/phosphate compatibility as a hard design concern.
291290

292-
- Oklahoma State University Extension, [Electrical Conductivity and pH Guide for Hydroponics](https://extension.okstate.edu/fact-sheets/electrical-conductivity-and-ph-guide-for-hydroponics). Describes water analysis, EC, pH, and nutrient-solution management.
293-
- Oklahoma State University Extension, [Hydroponics](https://extension.okstate.edu/fact-sheets/hydroponics). Discusses hydroponic pH/EC management and the need to check adjustments.
294-
- Penn State Extension, [Interpreting Irrigation Water Tests](https://extension.psu.edu/interpreting-irrigation-water-tests). Explains alkalinity, its reporting as CaCO3, and why pH must be interpreted with alkalinity.
295-
- University of Minnesota Extension, [Should you acidify your high tunnel irrigation water?](https://blog-fruit-vegetable-ipm.extension.umn.edu/2022/04/should-you-acidify-your-high-tunnel.html). Covers acid injection, injector ratios, and nutrient additions from nitric, phosphoric, and sulfuric acids.
296-
- Penn State Extension, [Irrigation Water Quality Guidelines for Turfgrass Sites](https://extension.psu.edu/irrigation-water-quality-guidelines-for-turfgrass-sites). Gives the equivalent-based residual sodium carbonate equation and illustrates use of meq/L in irrigation-water chemistry.
297291

298292
These references establish operational principles. Product-specific compatibility, solubility, and dosing limits must be sourced from the actual manufacturer documentation and verified under the intended operating conditions before automation is enabled.

‎docs/releases/0.5.0.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# FlahaX 0.5.0: detailed notes
22

3+
> Historical record: the five Florida formula presets and embedded agronomic
4+
> pH/bicarbonate advice have been retired under #202. Recorded benchmark
5+
> results describe the old inputs, not current catalogue coverage or scientific
6+
> validation of those recommendations. The captures below are preserved unchanged.
7+
8+
39
Released 2026-10-20. The full text of every change in 0.5.0, as recorded in the changelog when it was released. The [changelog](https://github.com/rafatahmed/Flahax/blob/main/CHANGELOG.md) groups them into a short summary.
410

511
- Publish Benchmark v1 snapshot 2026-10-20-linux-df0d30b (hosted run 39515183621 on `main`, after #62, #65 and #69), the first with every correctness gate passing: 7/7 controlled NNLS cases, 21/21 stored chemistry comparisons, 17/17 timing workloads; complete recipes 34/52 (was 29/52). The results page no longer calls a fully passing scorecard 'not fully passing' (#66).

‎docs/site/developer/conductivity.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,9 @@ maximum error as belonging to that profile; it does not include unpropagated
185185
assay/input uncertainty or certify a different recipe.
186186

187187
`partial` also arises from unrecorded counterions; temperature, carbon,
188-
ionic-strength domain and undisclosed blends give `not_supported`. All 26 shipped formulas at the current recommended doses exceed the stored
189-
phosphate fit ceiling and return `not_supported`. Earlier estimates and their
188+
ionic-strength domain and undisclosed blends give `not_supported`. The historical 26-formula audit found all recipes at its calculated doses exceeded
189+
the stored phosphate fit ceiling and returned `not_supported`. Five presets
190+
were subsequently retired (#202); this historical count is not the current catalogue. Earlier estimates and their
190191
reported interval widths relied on extrapolation and do not establish applicability.
191192

192193
**Phosphate (M2b).** H2PO4- and HPO4-2 are covered at 25 C by coefficients

‎docs/site/developer/python-api.md‎

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ See [water-to-delivery](water-to-delivery.md).
124124
`feasible` means every positive target is within 1% of the formula value (an
125125
absolute 0.01 mg/L floor applies in the benchmark evaluator). The 1% is a FlahaX
126126
assumption: no published standard gives a per-ion tolerance for preparing a feed
127-
solution. Dutch practice corrects only when root-zone analyses deviate by 25% or
128-
more (De Kreij et al. 2003).
127+
solution. It is a numerical recipe-fit criterion, not a crop-response threshold.
129128

130129
`targetIonBalance` is a conventional charge check on requested nutrient entries,
131130
not the whole solution. `recipeIonBalance` applies the same convention to all
@@ -192,39 +191,13 @@ solve charge balance on the mixture, and rebuild nutrient and limit assessments
192191
the verified reagent dose. Initial wrong-direction products remain not applicable.
193192
This bounded repair does not certify global joint optimality; issue #158 remains open.
194193

195-
The historical defaults were project-owner decisions (2026-10-20), grounded in Dutch
196-
soilless practice. Recommended NH4 is 5-15% of total N, with at most about
197-
1-1.5 mmol/L (Van der Lugt et al., following De Kreij, Voogt et al.). Voogt's
198-
WUR lecture gives "heavy fruit bearing - max 90:10" NO3:NH4. The Dutch standard
199-
solutions carry 5.9-8.8% NH4-N for most crops (gerbera 12.8%). The often-quoted
200-
"5-10% in hydroponics, 10-15% in substrate" is Dickson and Fisher's (2019)
201-
attribution to Sonneveld and Voogt (2009) without a page reference, and it
202-
describes the pH-neutral share rather than a limit. That primary text has not
203-
been checked.
204-
205-
References:
206-
207-
- De Kreij, C., Voogt, W. and Baas, R. (2003). *Nutrient solutions and water
208-
quality for soilless cultures*. Brochure 191, PPO Glasshouse Horticulture,
209-
Naaldwijk. <https://edepot.wur.nl/456342>
210-
- Voogt, W. Lecture slides on nutrient solutions, Wageningen UR.
211-
<https://edepot.wur.nl/13081>
212-
- Sonneveld, C. and Voogt, W. (2009). *Plant Nutrition of Greenhouse Crops*.
213-
Springer, Dordrecht. <https://doi.org/10.1007/978-90-481-2532-6>
214-
(chapters 12-13, pp. 257-312; not consulted directly).
215-
- Dickson, R. W. and Fisher, P. R. (2019). Quantifying the acidic and basic
216-
effects of vegetable and herb species in peat-based substrate and
217-
hydroponics. *HortScience* 54(6): 1093-1100.
218-
<https://doi.org/10.21273/HORTSCI13959-19>
219-
220-
## Feed pH and residual bicarbonate
221-
222-
`plan_fertilizer_workflow` adds a note when the target pH lies outside 5.3-5.8,
223-
the feed range of Dutch soilless practice (root zone about 5.5-6.0; Van der Lugt
224-
et al.; Savvas). A stronger note appears outside 5.0-7.0. FlahaX doses acid to the
225-
target pH, so the bicarbonate left afterwards is an outcome. The equilibrium acid
226-
plan reports it in `audit["residualBicarbonateMmolPerKg"]` and warns when it is
227-
below the 0.5 mmol/L that Dutch practice leaves as a pH buffer (0.5-0.75 mmol/L).
194+
## Caller-defined agronomic requirements
195+
196+
FlahaX does not prescribe feed-pH bands, a residual-bicarbonate minimum,
197+
or an ammonium fraction. Supply the target pH and any nutrient limits explicitly.
198+
The equilibrium acid plan reports residual bicarbonate in
199+
`audit["residualBicarbonateMmolPerKg"]` without a crop-suitability warning.
200+
Numerical feasibility establishes agreement with supplied inputs only.
228201

229202
## Additional planning commands (since 0.3.1)
230203

@@ -278,7 +251,7 @@ From the repository root, after the package is installed:
278251
python -m unittest discover -s tests -t .
279252
```
280253

281-
`test_pepper.py` checks water subtraction, the edited pepper fit, and the forced double-phosphate miss. `test_library.py` checks that the example export has 28 salts, 3 waters, and 26 formulas, then calls `recommend` once per formula. `test_measured_water.py` checks measured-pH water balancing on a published Qatar well. Set `FLAHAX_REQUIRE_PHREEQC=1` to make the live PHREEQC replay fail rather than skip when the pinned executable is missing.
254+
`test_pepper.py` checks water subtraction, the edited pepper fit, and the forced double-phosphate miss. `test_library.py` checks that the curated catalogue has 32 salts, 3 waters, and 21 formulas, then calls `recommend` once per formula. `test_measured_water.py` checks measured-pH water balancing on a published Qatar well. Set `FLAHAX_REQUIRE_PHREEQC=1` to make the live PHREEQC replay fail rather than skip when the pinned executable is missing.
282255

283256
### Chemistry failure and compatibility contract
284257

‎docs/site/evidence/benchmark-results-windows.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Benchmark results: Windows (local supplement)
22

3+
> Historical record: the five Florida formula presets and embedded agronomic
4+
> pH/bicarbonate advice have been retired under #202. Recorded benchmark
5+
> results describe the old inputs, not current catalogue coverage or scientific
6+
> validation of those recommendations. The captures below are preserved unchanged.
7+
8+
39
**Measured snapshot: 2026-10-20-windows-6373d23.** This page reports one clean-checkout development
410
baseline, including failures. It is not a release certification, a comparison
511
against another product, or physical validation.

‎docs/site/evidence/benchmark-results.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Benchmark results: Linux
22

3+
> Historical record: the five Florida formula presets and embedded agronomic
4+
> pH/bicarbonate advice have been retired under #202. Recorded benchmark
5+
> results describe the old inputs, not current catalogue coverage or scientific
6+
> validation of those recommendations. The captures below are preserved unchanged.
7+
8+
39
**Measured snapshot: 2026-10-20-linux-df0d30b.** This page reports one clean-checkout development
410
baseline, including failures. It is not a release certification, a comparison
511
against another product, or physical validation.

‎docs/site/evidence/competitor-comparison.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Competitor comparison
22

3+
> Historical benchmark inputs include five presets retired under #202. Their
4+
> inclusion tested numerical behavior; it did not validate crop recommendations.
5+
> Raw captures are preserved. The current catalogue contains 21 formulas.
6+
7+
38
**Measured snapshot: 2026-10-22-competitors-1ade5b6.** One run on one Windows
49
laptop, at FlahaX commit `1ade5b6`. Every tool is pinned. Failures, refusals and
510
results unfavourable to FlahaX are retained. This is a comparison of software on

‎docs/site/models/method.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ internal doses participate; published dose precision remains separately tracked.
7171
|---|---:|---|
7272
| `salts` | 28 | Example fertilizers used by the tests. A live recommendation receives the saved rows instead. |
7373
| `waters` | 3 | `Default Water Profile` (no ions), `WC1` (Ca 20), `WC2` (N, Mg, Ca, Fe) |
74-
| `formulas` | 26 | Name, targets, linked water, salt names stored on the formula |
74+
| `formulas` | 21 | Name, targets, linked water, salt names stored on the formula |
7575

7676
The file is an example for the tests. `python -m flahax` does not read it. The caller passes the fertilizer rows. A name that starts with `test` or a formula of `Input Formula Here` is still rejected if one is passed. Nothing in the solver prefers a salt because its name is MAP, MKP, or SOP.
7777

0 commit comments

Comments
 (0)
0