Phase 1: Correctness, units, CI, rename, polish#1
Open
Gavand1969 wants to merge 1 commit into
Open
Conversation
- Rename Sim2Real -> Sim2Sim across README, page, hero, docstrings, CSS, JS - Add GitHub Actions CI workflow (fixes broken badge) - Fix solve_base_stock dead code; correct Type-II fill-rate formula (1 - E[B per cycle] / mu_L, not E_B * D / D) - Standardize inventory lead-time to DAYS everywhere (lead_time_days param; sigma_L = sigma_d * sqrt(L_days)) for unit consistency - Add _little_law_residual: relative Little's Law diagnostic instead of absolute - Simulation: fix warm-up off-by-one; raise default warmup to max(100, N/5) - Production CORS: require ALLOWED_ORIGIN (fail loudly on empty) - Cache Anthropic client lazily at module level - Add pyproject.toml with ruff + mypy + pytest config - README polish: live demo placeholder, screenshot, monetization note - Add 7 new tests for reorder-point and base-stock (57 -> 64 passing)
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 addresses every issue from the code review.
Correctness fixes
solve_base_stock: removed deadfill_rateline and corrected the Type-II formula. Was1 - E_B * D / Dwhich is dimensionally wrong; now1 - E[B per cycle] / mu_L.sigma_L = sigma_d * sqrt(L)mixed years (L) and daily sigma. Standardized everything to days, withlead_time_daysin the API. Internal:mu_L = (D/365) * L_days.abs(L - lam*W)which is meaningless at high rho. Now a relative residual|L - lam W| / max(|L|, 1).ALLOWED_ORIGINis now required whenENVIRONMENT=production. Loud failure instead of silent empty list.Engineering polish
anthropic.AsyncAnthropicat module level instead of per-request.pyproject.tomlwith ruff + mypy + pytest config..github/workflows/ci.ymlso the test badge in README actually works.Renames
Sim2Real -> Sim2Simeverywhere (README, page title, hero, brand, docstrings, CSS, JS).Tests
All tests green locally.