Conversation
Add a single-SKU, single-PO Scenario contract, deterministic baseline and Stockpyl adapter, fail-closed validation, persisted results, fixtures, and regression coverage.
Install requirements-scenario.txt when present so Scenario and Stockpyl tests run in GitHub Actions without changing production dependencies.
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.
This PR adds an isolated scenario runner for one SKU and one purchase order. Given the same inputs, version, and seed, it produces the same result. The LLM does not participate in any numerical calculation.
The runner executes a deterministic baseline and compares it with Stockpyl using fixed tolerances. Inputs, computed results, and persisted output are validated. NaN, Infinity, arithmetic overflow, invalid containers, and values that cannot be serialized cause the run to fail, and the failure is still recorded for diagnosis.
Three synthetic fixtures cover normal operation, disruption, and substitution. Stockpyl remains pinned in
requirements-scenario.txt;requirements-dev.txtincludes it for tests and CI without adding it to production dependencies. Model limits, metric definitions, and the zero-demand fill-rate difference are documented indocs/research/scenario_validation.md.Testing
87 passed327 passed0454 passedScope
This change covers the reproducible research path only. It does not connect to the existing What-if UI, production database, ERP writes, multi-level BOMs, MCP, or DBOS. The fixtures and simulation results are test evidence, not business forecasts or benefit claims.