Skip to content
Merged
1 change: 1 addition & 0 deletions changelog.d/fix-branch-override-shadowing.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Limit the non-refundable Child Tax Credit by the actual tax liability, SALT deduction included (26 U.S.C. 26(a); Schedule 8812 Credit Limit Worksheet A, line 1), instead of a recomputation without SALT that applied or not depending on which variables were calculated first; and make the itemization, Delaware and Virginia EITC, Idaho aged or disabled, Missouri TANF caretaker and Medicaid SSI-supplement comparison branches calculate under their overridden inputs even when the simulation has already calculated those inputs, including variables it was given as inputs only for another year.
7 changes: 4 additions & 3 deletions policyengine_us/tests/core/test_multi_year_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
periods. A branch copies its parent's cached arrays when it is created, so
a branch created in 2024 answered 2025 from a copy without any of the
parent's 2025 values, unlike the branch a 2025-only simulation creates.
``get_branch_for_period`` creates them again for each period.
``get_override_branch`` and ``get_branch_for_period`` create them again for
each period. (The CTC limit no longer uses a SALT branch.)

Each test compares a simulation that calculates the base year first with a
fresh simulation that calculates only the later year. The branch test gives
Expand Down Expand Up @@ -163,7 +164,7 @@ def test_formula_branches_are_created_again_for_a_later_year(year):

simulation = Simulation(situation=_situation(age_every_year=True))
_later_year_values(simulation, BASE_YEAR)
branches = ("itemizing", "not_itemizing", "no_salt")
branches = ("itemizing", "not_itemizing")
base_year_branches = {name: simulation.branches[name] for name in branches}

_assert_same(_later_year_values(simulation, year), fresh, year)
Expand Down Expand Up @@ -191,7 +192,7 @@ def test_later_year_matches_single_year_simulation(year):

simulation = Simulation(situation=_situation())
_later_year_values(simulation, BASE_YEAR)
BRANCHES = ("itemizing", "not_itemizing", "no_salt")
BRANCHES = ("itemizing", "not_itemizing")
base_year_branches = {name: simulation.branches[name] for name in BRANCHES}
# Request every month of the base year too, as monthly programs do for
# people they cover.
Expand Down
Loading
Loading