Repository navigation
Conversation
Core 3.33.13 broke policyengine-us main's state machine test within minutes of release, while the country smoke job passed: it installs a pinned policyengine-us release and only checks that systems load. The new PolicyEngineUSMain job runs a list of fast policyengine-us tests that drive Core internals, with the Core release and then with this checkout, and fails only on tests that fail with this Core alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been 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.
What this fixes
Core 3.33.13 broke a policyengine-us test on main within minutes of its release, and nothing in Core's CI could have shown it first.
core/test_social_security_input_state_machine.py, whose backend runs Core's installedSimulationBuilder,Simulation, holder and dumper source in namespaces it builds.build_default_simulationnow callsoperator.index, andrestore_simulationcalls a new_restore_count.NameError: name 'operator' is not defined; policyengine-us CI installs the newest Core on every run. PolicyEngine/policyengine-us#10504 gives the backend both names.#624 itself is correct. Core already checks itself against policyengine-us, but
SmokeTestForMultipleVersionspassed on #624 because it doesn't test enough to catch this:policyengine-us==2.42.13, which predates the test.Nothing checks again after the PR either:
Publishinpush.yamlhas noneeds.What changes
A new PR job,
PolicyEngineUSMain("Test policyengine-us main against this Core"), sits beside the smoke job:.github/requirements/policyengine-us-main-tests.txtwith that release, with a JUnit report.direct_url.jsonpoints at the checkout, because the two versions can be equal before a release bump..github/country_main_tests.py comparefails on each test that fails with this Core but did not fail with the release. A test that fails with both is policyengine-us's own failure, so it is only a warning.That last rule addresses why #546 pinned the smoke bundle: country-side failures kept turning Core's CI red. policyengine-us main is sometimes red for its own reasons. Release run 40544014984, the first on 3.33.13, failed this Core test and also
core/test_mt_state_agi_invariants.py, a policyengine-us failure fixed by PolicyEngine/policyengine-us#10496. This job would blame Core only for the first.The list starts with 13 fast files that drive Core internals: simulations, holders, data storage, tools, populations, parameters and reforms. It includes the state machine test. Together they took about 95 seconds in policyengine-us release run 40544965026, against 96 minutes for its whole
tests/core. A listed file that policyengine-us renames or removes is skipped with a warning, so the job cannot fail for that reason.Tests
tests/core/test_country_main_tests.py, 10 tests, passed locally. They cover:ruff format --check .passes.A local replay of the job's steps against today's policyengine-us main (macOS; each pytest pass took about 45 seconds), with the 13 files and 470 tests:
compare...TestSocialSecurityInputStateMachine::runTest"masterSo the job would have failed Restore simulations with no persons or empty groups, and refuse non-integer default counts #624's PR, and it doesn't blame later PRs for the test until Give the Social Security state backend the names Core 3.33.13 needs policyengine-us#10504 lands.
Not run locally: actionlint, which this PR's
Lint workflowsjob runs. The job itself runs on this PR against today's policyengine-us main.Open questions for review:
Publishalso wait for it on the release commit?