You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: preserve API constraints in public CLI and file contracts #181
At f032d19, send recommend a JSON object with packaged Potassium Nitrate, targets K=100 mg/L, water={}, and maximum_concentrations={K:0}. The CLI returns feasible=true with 0.2585983966899405 g/L. The Python recommend API with the same explicit ceiling returns feasible=false and no fertilizer dose. main does not forward maximum_concentrations and silently ignores unknown request fields. It also coerces allowCarbonates via bool(), so non-boolean strings can change permissions.
Expected / actual / impact
Every supported recommendation parameter must preserve the API's hard constraints and permissions. Unsupported/misspelled fields must fail explicitly. Current CLI silently drops a declared hard zero. P32 acceptance/archive functions also lack the documented top-level API exports needed for the new public file contract.
Acceptance criteria
Forward supported API parameters, including maxima, ammonium fraction and ridge, with strict JSON field/type validation and documented compatibility aliases.
Add public acceptance/canonical/archive exports and regenerate API documentation.
Exercise actual subprocess JSON recommendation, workflow, batch/plain CLI and malformed-file contracts; preserve independent stage/status qualifications.
Resolved in PR #196, merged as f0775f43b7d185aeb94bddf205bc5a723636b1e1. Relevant implementation: 34409d0.
Public CLI/file contracts forward hard constraints and validate fields/types, expose canonical/acceptance/archive APIs and retain documented exit/status semantics. Actual subprocess and malformed-input controls pass.
Hosted validation, attempt 2 passed all 10 jobs on 9386ecad56d85709c8e6a73590eac1032c8295c9: Python 3.11-3.14, native Windows/macOS/Linux, live PHREEQC, documentation/style, clean distribution checks and the exact coverage gate. The merge tree is identical to this validated head. This closes the specific issue; broader publication/final mathematical acceptance and physical validation remain separately tracked.
Activity
rafatahmed commentedon Oct 28, 2026
Resolved in PR #196, merged as
f0775f43b7d185aeb94bddf205bc5a723636b1e1. Relevant implementation: 34409d0.Public CLI/file contracts forward hard constraints and validate fields/types, expose canonical/acceptance/archive APIs and retain documented exit/status semantics. Actual subprocess and malformed-input controls pass.
Regression evidence:
Hosted validation, attempt 2 passed all 10 jobs on
9386ecad56d85709c8e6a73590eac1032c8295c9: Python 3.11-3.14, native Windows/macOS/Linux, live PHREEQC, documentation/style, clean distribution checks and the exact coverage gate. The merge tree is identical to this validated head. This closes the specific issue; broader publication/final mathematical acceptance and physical validation remain separately tracked.