Repository navigation
Supply yearly input in subsampling holder test - #10671
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 6, 2026
Merged
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test stored its 2023 derived entry with put_in_cache, which leaves no fast-cache return, so the adapter's pre-rebuild snapshot never saw that key under core#552. Supply 2022 at construction instead: the 2023 read carries it over and caches a derived return on both cores, and the test now asserts that return reaches _derived_cached_returns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
November 7, 2026 18:33
Contributor
Author
|
US + core hub merge audit, us#10671 at
🤖 Generated with Claude Code |
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 fixes
test_spm_system.py, which fails with PolicyEngine/policyengine-core#552, and tightens a provenance test intest_social_security_real_core.py, which passed on both cores before. Both files pass with core #552 and with core's current master. The PR changes no model code.test_spm_system.py. After subsampling, the holder test calculatesis_household_headand requires a stored period. The reform gives that input a yearly definition without a formula. Core Add guaranteed income / cash assistance variable #552 returns its root default without caching when carry-over finds no source input. The test now supplies a yearly input after each subsample, and keeps its assertions for formula caching, yearly storage, reform policy bindings and baseline isolation.test_social_security_real_core.py. The dataset rebuild provenance test stored its 2023 derived entry withput_in_cache. Beforebuild_from_datasetruns, the adapter records_derived_cached_returns, which lists the derived and fast-only returns in the simulation's fast cache and skips stored inputs. With the old fixture, the 2023 entry never reached that list on either core. The test now supplies a 2022 input at construction. The 2023 read carries it over, and the test asserts that this return reaches_derived_cached_returns.Tests
At
862156d871, whose parent0cc7e65cd3mergesmainat67d4dde6cb:test_social_security_real_core.pyandtest_social_security_known_periods.py: 134 passed with core Add guaranteed income / cash assistance variable #552 merged into core's master (c5eef1efd9). With core master (9fd76e1ce3), 129 passed and 5 skipped; the 5 skipped cases need core Add guaranteed income / cash assistance variable #552's branch argument._derived_cached_returnsassertion fails on both cores with the oldput_in_cachefixture, and passes on both with the 2022 input.policyengine_us/tools/social_security_inputs.py, under core Add guaranteed income / cash assistance variable #552: dropping the branch argument from the physicalget_known_periodscall, or from the_public_periodscall. Each fails all four cases oftest_known_periods_lists_only_sources_readable_by_requested_branch.test_spm_system.py: 77 passed with core Add guaranteed income / cash assistance variable #552 and 77 passed with core master.impact: none (test only)
axiom: n/a: test-only change
🤖 Generated with Claude Code