Repository navigation
fix: one source for status text; review only what the products add - #384
Merged
Merged
Conversation
…ings; review only what products add
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #384 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 152 152
Lines 17992 18022 +30
Branches 3637 3642 +5
=========================================
+ Hits 17992 18022 +30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOT READY until CI is green.
Closes #382
Closes #383
What changes
batch_summary._target_reasons. The formulation and pH stage statuses and messages,statuses['formulation'],statuses['ph'],statuses['stock']and the warnings are written from them, so areadyrecipe has no stage under review and no "targets missed" warning, and a review reason is listed once (the repeatedformulation:andph_adjustment:warnings are gone).statuses['formulation']isinfeasibleonly for a miss outside the range or a declared maximum;statuses['stock']isqualifiedwhen the preparation fits.nutrient_acceptance.review_rows). An ion that comes only from the water, or whose product share is under 1 % of its concentration, no longer keeps a recipe under review; a declared maximum is still checked against the total.Decision for review
The 1 % product-share threshold (
NEGLIGIBLE_PRODUCT_SHARE) is my choice; it narrows rule R4 as proposed in #383.Checked before this commit
tests/test_status_consistency.py: three real mixes (ready, misses outside the range, incidental review) checked for agreement between verdict,statuses, stage statuses and messages, and warnings. It failed 11 ways before the change.tests/test_water_only_incidental.py: unit tests ofreview_rowsand a real hard-water batch (ready without Na/Cl maximums; a maximum below the water still blocks).flahax batch(Cucumber with and without maximums, a hard-water case) andflahax mix --plain: statuses, stages, warnings and sheet agree; the interview notes dropped from 9 to 7.outputs/test-runs/2026-11-29-fix-status-single-source/): wiring, consistency, water-only, result wording, canonical result, status matrix (92 tests); grower outputs, grower sheet, mix results, mix TUI, Sonneveld, default range and temperature, deviation ranges (146 tests). Lint, format, API reference and CLI reference clean.Not covered
The full suite, coverage gate and strict docs build run in CI. Default ammonium and sodium maximums, the calcium and nitrate conflict, the history rewrite, gypsum and the untracked follow-ups from the audit are not part of this PR.