8000 fix: reconcile sequential dosing and zero-ammonium search by rafatahmed · Pull Request #239 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content

fix: reconcile sequential dosing and zero-ammonium search - #239

Merged
rafatahmed merged 1 commit into
mainfrom
fix/sequential-accounting-zero-ammonium
Nov 8, 2026
Merged

rafatahmed merged 1 commit into
mainfrom
fix/sequential-accounting-zero-ammonium

Conversation

@rafatahmed
Copy link
Copy Markdown
Owner

Summary

Sequential pH results now assess the returned reagent dose, and joint fitting can settle correctly when an explicit zero nutrient maximum excludes a product.

Sequential result: final reagent dose → nutrient totals → limit assessments
Zero maximum: keep forbidden doses at zero → refine binding limits → verify stationarity

Closes #237. Closes #238.

Fertilizer doses in sequential reassessment, numerical tolerances and iteration limits are unchanged. Includes public API and batch regressions, an explicit dry-reagent fallback fixture, and unreleased documentation. No version change or release.

Evidence

  • Before: Sequential nitrate-N accounting differed from the returned doses by approximately 0.00000118115 mg/L.
    After: Reported nitrate-N is 150.7925611205989 mg/L, matching independent reconstruction; tight-maximum and batch regressions pass.
  • Before: The zero-ammonium benchmark exceeded its five-minute measurement cap.
    After: Local stationarity in 15 iterations and 229 evaluations, final pH 6.000000001862645 and exactly zero ammonium. The small public API reproduction drops from 327 to 7 evaluations.
  • Full discovery: 159 modules, 1,457 tests; two native POSIX terminal tests skipped on Windows. Corrected hard-cap assertions and the explicit dry-reagent fallback fixture pass covered reruns; no unresolved test failures.
  • Fresh local Windows coverage passes the unchanged 100% statement and branch gate. All 27 benchmark cases pass their expected checks, including identical repeated cucumber/custom summaries. The isolated water-excess retry passes; its shared-load timeout is retained in local evidence.
  • Lint, formatting, package installation and privacy checks pass. Hosted CI remains to be evaluated for this PR.

Merge Danger

Door: Two-way. The code changes can be reverted without a data migration.

Blast Radius: Formulation.

Search paths can change across formulas; this is not a universal speedup or global-optimum claim. The zero-ammonium recipe still requires review: excluding the offered calcium nitrate leaves calcium at 0 against a 200 mg/L target. Meeting that target needs a confirmed ammonium-free calcium source, not a weaker maximum.

Use final reagent contributions for sequential assessments and keep zero-cap coordinates fixed during joint proposals. Enable existing refinement for binding zero limits.

Closes #237. Closes #238.
@rafatahmed rafatahmed added the bug Something isn't working label Nov 8, 2026
@rafatahmed rafatahmed self-assigned this Nov 8, 2026
@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 Flahax | 🛠️ Build #35738050 | 📁 Comparing 41d6a05 against latest (e7e95ad)

  🔍 Preview build  

1 file changed
± changelog.html

@codecov
codecov Bot commented Nov 8, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e7e95ad) to head (41d6a05).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #239   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          115       115           
  Lines        13709     13717    +8     
  Branches      2714      2715    +1     
=========================================
+ Hits         13709     13717    +8     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rafatahmed
rafatahmed merged commit 813366f into main Nov 8, 2026
13 checks passed
@rafatahmed
rafatahmed deleted the fix/sequential-accounting-zero-ammonium branch November 8, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

1 participant

0