Require policyengine-core 3.30.1 and add substitution-channel regression test#9087
Merged
Conversation
…ion test The LSR/CG measurement branches recorded MTR = 1.0 for every adult in both the baseline and reform branches under policyengine-core >= 3.24.4 (see PolicyEngine/policyengine-core#521), which zeroed relative_wage_change and made the substitution channel inert in every behavioral run. Bump the core requirement to the fixed release and add an end-to-end regression test that fails on the broken cores. Fixes #9086. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same regression class as the substitution test: under policyengine-core < 3.30.1 both capital-gains MTR measurement slots recorded 1.0, zeroing relative_capital_gains_mtr_change and the realization response. Verified failing with core 3.30.0 and passing with 3.30.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
hua7450
approved these changes
Jul 20, 2026
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 #9086.
policyengine-core 3.30.1 (PolicyEngine/policyengine-core#521) fixes
Simulation.delete_arraysso themtr_for_adult_Nsub-branches inside the named behavioral measurement branches actually purge inherited parent values. Under cores 3.24.4–3.30.0 both measurement branches recorded MTR = 1.0 for every adult,relative_wage_changewas exactly zero, and the substitution channel of labor supply responses (and the capital-gains MTR channel) contributed exactly $0 to every behavioral run since 2026-04-18 (bisect in the issue comments). Static/root-simulation MTRs were unaffected.This PR:
>=3.26.5→>=3.30.1;Simulation, bracket-2 rate reform + substitution elasticity) asserting the measurement branches record distinct, sane MTRs, a negativerelative_wage_change, and a negative substitution response. Verified: passes in 18s with core 3.30.1, fails with 3.30.0 (the existing tests in this file mock the measurement plumbing, which is why they never caught this).changelog.d/fixed/.🤖 Generated with Claude Code