Repository navigation
fix: report EC as a range, never refuse or block (G6-G9) - #225
Merged
Merged
Conversation
EC is now `estimated` (one value) or `range` (low, high; no midpoint). Species without a conductivity coefficient, phosphate beyond its fit ionic strength and charge left unbalanced by a supplied pH are bounded at 80 per charge instead of refusing. `not_supported` remains only when the state cannot be solved. A requested EC (`flahax batch --ec`) is compared with the range, never enforced. Closes #224
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #225 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 114 114
Lines 13111 13130 +19
Branches 2570 2573 +3
=========================================
+ Hits 13111 13130 +19
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:
|
rafatahmed
marked this pull request as ready for review
November 6, 2026 10:24
6 of 18 tasks
rafatahmed
added a commit
that referenced
this pull request
Nov 7, 2026
fix: report EC as a range, never refuse or block (G6-G9)
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.
Summary
flahax batch --ec X/summarize_batch(requested_ec_ms_cm=X): "compatible with the estimated range; target attainment unverified", or "requested X is Y mS/cm from the estimated range". Never enforced.Evidence
ec.status=not_supported, reasonionic_strength_outside_phosphate_fit(I = 0.0262).After:
ec.status=range,ec25_range_ms_cm= (low, high), low < high.tests/test_ec_range.py(8) andtests/test_ec_report.py(10); 7 existing modules rewritten to the new contract. Scoped coverage of every changed line and branch: no gaps.Merge Danger
Door: one-way for API/file consumers.
Removed: status
partial, the assay and phosphate-fit refusals, reasonsassay_charge_residual_too_large,missing_species_contributions,unrecorded_counterions. Consumers must readstatus(estimated/range) andec25_range_ms_cm;ec25_ms_cmisNonefor a range.Blast Radius: EC fields in summaries, report, batch sheet, examples, CLI.
Deviations to review:
-0.7instead of the plan's U+2212, which cannot be encoded on latin-1/cp1252 consoles.--ecflag go slightly beyond the plan's wording.calculated_ec.pystill returnsmissing_product_ec_evidence. Optional smells from review (duplicateec_textcalls, three range formatters) are left as follow-ups.Closes #224