Repository navigation
feat: declared equipment, equipment-aware search, unverified solubility and saved inputs (D3-D7, C6) - #298
Merged
Conversation
…fit (D3) summarize_batch and flahax batch take the tanks you have (--available-tanks) and their sizes (--tank-capacity). The recipe and grouping do not change with the equipment. The report lists the tanks the recipe needs against yours, and a tank too small for its stock is reported and blocks, without altering the recipe or the equipment. Without a declaration two tanks are assumed and the summary says so (available_tanks_declared false).
…erature (D5, D6) Each stock solubility row now carries a qualification: it is a single-product value, whether its source temperature equals the tank temperature, and what is unverified (temperature, mixture). A value recorded at another temperature is still used as recorded and never extrapolated, doses are unchanged, and the batch warnings name the products and their source temperatures.
…ssary (D7) Stock assignment, required tanks, available tanks, equipment fit and single-product solubility are defined once, with the words to avoid, and a test keeps them tied to the summary fields they name.
… record the mode (D4) available_product_search(on_equipment_miss=True) runs when the declared equipment cannot hold the recipe (the stocks stage failed with an error), adding the requirement equipment:fit. Candidates keep the declared tanks, ratio, temperature and separation rules and change only products. Nothing runs unless requested. The remedies result records the mode (analyze_supplied_doses or find_suitable_doses) and the declared equipment so a saved result shows what the search was held to.
…ame what a recalculation changes (C6) The summary keeps supplied_inputs, bound by calculation_identity.input_sha256, and load_result rejects inputs that no longer match it. Older saved results still load without inputs. saved_input_differences lists each input path that differs between two results.
…t covers the temperature (D5, D6) plan_stocks no longer raises missing_solubility_limit. A product with no recorded solubility limit at the requested temperature keeps its concentration and tank assignment and is listed in StockPlan.unverified with its recorded ranges; the plan stays requires_review and nothing is approved on the missing evidence. A known limit that is exceeded still raises solubility_exceeded. The workflow stocks stage says which products are unverified.
…ks (D4, Q23) --fit-equipment, with --alternative-products, runs the equipment-aware search from the batch command. The batch hands its own equipment check (tank count, capacities and stock solubility, the same judgement as its report) to plan_fertilizer_workflow, so the search sees a miss. Tanks, ratio and separation rules are never changed, the search runs only when asked, and the declared equipment is saved in remedies and the saved inputs. A stock whose solubility is unverified at the temperature now counts as an unresolved equipment requirement, so keeping its quantities never reads as a fit.
…ges in the Unreleased changelog
…parser The exact coverage gate found the batch equipment check's problem paths, the capacity and callable guards and the whole-number flag parser unexecuted.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #298 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 140 140
Lines 17015 17180 +165
Branches 3455 3493 +38
==========================================
+ Hits 17015 17180 +165
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.
Closes #293. Closes #294. Closes #295. Closes #296. Closes #297.
Equipment and stock qualification (contract Q19-Q23, Q27), items D3-D7 and C6 of the contract audit.
--available-tanksand--tank-capacityonflahax batch, reported against the required tanks; a too-small tank blocks; the recipe is never changed (D3, Accept declared tank count and capacities and report equipment fit (D3) #293).--fit-equipmentandavailable_product_search(on_equipment_miss=True)search other products for a recipe that fits the declared tanks; tanks, ratio and separation rules are never changed; mode and declared equipment are saved (D4, Equipment-aware dose search in the workflow and batch command (D4) #294).plan_stockskeeps quantities and listsunverifiedinstead of raisingmissing_solubility_limit(D5/D6, Solubility verdicts hide an unverified temperature and plan_stocks drops quantities (D5, D6) #295). This changes a public error.supplied_inputsbound to the input fingerprint;saved_input_differencesnames what a recalculation changed (C6, Saved results lack the supplied inputs and product assays (C6) #297).report.htmlnow embeds those inputs in its evidence block, so it is larger.Not done here: the PHREEQC golden fixture was not re-captured, and no pH solver code was changed.
Local checks: ruff clean; the 22 new tests and 301 of 303 related tests pass locally. Heavy grower, mix and ratio tests did not all finish under the 5-minute limit, so CI is the verifier for them.