Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fix-dependent-ald-filer-agi.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Keep tax unit dependents' above-the-line deductions (the deductible part of self-employment tax, self-employed health insurance and retirement plans, IRA contributions, early withdrawal penalties, educator expenses and alimony paid) off the filer's AGI, Social Security and unemployment MAGIs, per-person AGI and student loan interest MAGI, and off the Missouri, Massachusetts, Minnesota property tax refund and Medicaid incomes built from them. Employer adoption assistance and education savings bond interest stay on the filer's return wherever they are recorded. A dependent's own deductions now reduce the dependent's Medicaid AGI, Massachusetts gross income no longer subtracts dependents' business losses, and Mississippi subtracts each person's own self-employed health insurance and retirement plan deductions instead of the tax unit's total for every member.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
description: Above-the-line amounts that belong to the filer even when they are recorded on a tax unit dependent, so they are summed over every tax unit member rather than over the head and spouse only.
values:
2010-01-01:
# Employer adoption assistance is excluded for the adopting employee
# (26 USC 137(a)); households record it on the adopted child, as the Ohio
# adoption credit reads it.
- qualified_adoption_assistance_expense
# Savings bond interest used for education is excluded for the bond's
# owner, who must have been at least 24 when the bond was issued, and the
# expenses may be a dependent's. "A bond bought by a parent and issued in
# the name of his or her child under age 24 does not qualify for the
# exclusion by the parent or child" (Form 8815). By convention, an amount
# recorded on a dependent is the parent-owned bond's exclusion recorded on
# the student whose expenses it paid.
- us_bonds_for_higher_ed
metadata:
unit: list
period: year
label: Above-the-line amounts summed over dependents
reference:
- title: 26 U.S. Code § 137 - Adoption assistance programs
href: https://www.law.cornell.edu/uscode/text/26/137
- title: 26 U.S. Code § 135 - Income from United States savings bonds used to pay higher education tuition and fees
href: https://www.law.cornell.edu/uscode/text/26/135
- title: Form 8815 (2025), Who Can Take the Exclusion
href: https://www.irs.gov/pub/irs-prior/f8815--2025.pdf#page=3
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ values:
- alimony_expense # Line 4
- early_withdrawal_penalty # Line 5
- self_employed_health_insurance_ald # Line 7
# Alabama AGI counts dependents' income, so their deductions too.
- dependents_self_employed_health_insurance_ald
- health_savings_account_ald # Line 8
- self_employed_pension_contribution_ald # Line 9
- dependents_self_employed_pension_contribution_ald
- us_govt_interest
- taxable_public_pension_income
2023-01-01:
Expand All @@ -16,8 +19,11 @@ values:
- alimony_expense # Line 4
- early_withdrawal_penalty # Line 5
- self_employed_health_insurance_ald # Line 7
# Alabama AGI counts dependents' income, so their deductions too.
- dependents_self_employed_health_insurance_ald
- health_savings_account_ald # Line 8
- self_employed_pension_contribution_ald # Line 9
- dependents_self_employed_pension_contribution_ald
- us_govt_interest
- al_retirement_exemption #Schedule RS Line 10
- taxable_public_pension_income
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ values:
- ms_self_employment_adjustment # Line 61
- ms_national_guard_or_reserve_pay_adjustment # Line 55
- alimony_expense # Line 53
- self_employed_pension_contribution_ald # Line 51
- ms_self_employed_retirement_adjustment # Line 51
- early_withdrawal_penalty # Line 52
- self_employed_health_insurance_ald # Line 56
- ms_self_employed_health_insurance_adjustment # Line 56
- health_savings_account_ald # Line 57
- ms_retirement_income_exemption
- us_govt_interest_person
Expand Down
13 changes: 10 additions & 3 deletions policyengine_us/tests/core/test_ald_determinism.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def test_tax_unit_deductions_are_ordered_unique_and_exclude_person_alds(
gross_income=SimpleNamespace(sources=[]),
ald=SimpleNamespace(
deductions=deductions,
filer_amounts_recorded_on_dependents=[],
student_loan_interest=SimpleNamespace(magi=magi),
),
)
Expand All @@ -85,13 +86,19 @@ class ReachedTaxUnitSum(Exception):
person = Person()

def capture_add(entity, period, variables):
if entity is person.tax_unit:
captured.extend(variables)
raise ReachedTaxUnitSum
# Tax-unit deductions must be summed over non-dependents only, through
# tax_unit_non_dep_add, never with a plain add over every member.
assert entity is person
assert variables == [f"{name}_person" for name in PERSON_ALDS]
return np.array([0], dtype=np.float32)

def capture_tax_unit_add(entity, period, variables, include_dependents=()):
assert entity is person.tax_unit
captured.extend(variables)
raise ReachedTaxUnitSum

monkeypatch.setattr(module, "add", capture_add)
monkeypatch.setattr(module, "tax_unit_non_dep_add", capture_tax_unit_add)
with pytest.raises(ReachedTaxUnitSum):
getattr(module, variable_name).formula(person, 2026, lambda period: parameters)

Expand Down
Loading
Loading