Repository navigation
Fix live staging simulation tests - #3872
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3872 +/- ##
===========================================
+ Coverage 45.22% 87.56% +42.33%
===========================================
Files 183 198 +15
Lines 11073 12211 +1138
Branches 1905 2159 +254
===========================================
+ Hits 5008 10692 +5684
+ Misses 5644 922 -4722
- Partials 421 597 +176 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch was successfully deployed
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.
Fixes #3873
Repair the invalid live-test requests and incorrect credit assertion reported in deployment run 37820880125. The California and Scotland macro tests now identify each run through supported policy labels instead of the undeclared
staging_probequery parameter. The California household test expects $388.21, independently reproduced with its exact 2025 household using the pinned PolicyEngine bundle 6.2.1 / US model 2.2.1.Add local regression coverage that executes the live macro request construction against the canonical query parser and the household assertions against the real pinned model. Include response text in HTTP polling exceptions so future request-validation errors appear in CI logs.
Validation: all 14 GitHub checks passed, including the full API test job, cross-database integration, both container builds, lint, type checking, and migration checks. Locally, 102 focused tests passed; the four request/model regressions also passed after formatting. Repository formatting, changed-file lint, changelog, and whitespace checks passed.
The full live suite against the exact failed staging candidate finished with 9 passed, 1 failed. Both California cases passed. The corrected Scotland request now reaches the simulation worker and exposes a separate upstream failure:
ValueError: Variable 'country' not found in household data. The pinnedpolicyenginepackage's UK country-region filter reads acountryinput column; the loaded dataset storesregion, and the UK model derives country from that variable. The candidate metadata explicitly advertisescountry/scotland, so the live test continues to exercise that supported selector. Worker correlation IDs:b69a1bd89eac44a68fbf9d4b53223d90(targeted run) and786c6cffb1a74330be6e9903e07476df(full run).