Repository navigation
Preserve reform-baseline subsampling regression coverage - #606
Merged
Merged
Conversation
MaxGhenis
marked this pull request as ready for review
October 10, 2026 18:57
Contributor
Author
|
US + core hub merge audit, core#606 at
|
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.
Preserve the reform-baseline subsampling regression coverage from #601 after #573 supplied the production fixes on master. This draft ports only the missing tests and the required changelog fragment; no production code changes.
The examples cover parametric and structural reform results calculated before subsampling, a changed default read without a period input, an override deleted before a reform calculation, and dataset overrides of formula-backed variables preserved in both arms. The deleted-input test drops its obsolete stale-registry assertion and describes the behavior master implements.
The Hypothesis property uses master's recorded-input export and varied populations, weights, formula overrides, reforms, sample sizes, seeds, and combined calculation histories on either arm. It checks export stability, history-independent rebuilding/results, baseline fidelity against an independently subsampled unreformed simulation, and preservation of each retained person's original values. An explicit mixed reform/baseline history example exercises both arms together.
The incompatible structural-ID freezing test and already-merged input-only tests are excluded. #601 remains open for the hub to handle.
Validation against unchanged master production code:
uv run pytest -q tests/core/test_subsample_computed_values.py— 7 passed (four reform-result cases, changed default, deleted override, and dataset override in both arms).uv run pytest -q tests/core/test_subsample_computed_values_property.py— 1 passed (configured for 200 generated examples plus six explicit examples).git diff --check— passed.All ported tests pass with production code unchanged from master at
42556d5dff8cde292b657cd1426b5e1351e4c5c8. No defects found and no xfails added.Full suites and microsimulations were not run, per the hub's single-file validation scope. Documentation changes are not required for tests and a changelog fragment.