Skip to content

Leave tax unit dependents' income out of Alabama AGI - #9943

Merged
MaxGhenis merged 8 commits into
mainfrom
al-agi-exclude-dependents
Oct 12, 2026
Merged

MaxGhenis merged 8 commits into
mainfrom
al-agi-exclude-dependents

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the Alabama row of #9814; AR, IA, MS and NJ stay open there.

al_agi summed every tax unit member's income, so a dependent child's wages raised the parent's Alabama AGI. Alabama AGI then feeds the standard deduction phase-out, the dependent exemption tier, the itemized-deduction floors and the tax. Under Alabama law a dependent's income goes on the dependent's own return, so al_agi now counts only the head and spouse.

Example from the issue (TY2021, head of family): head wages 10,000; dependent child, age 16, wages 5,000.

prior main (author's base) this PR
Federal AGI 10,000 10,000
al_agi 15,000 10,000
al_taxable_income 6,300 1,300
al_income_tax (existing model statutory rates) 275 42

The existing model's statutory-rate calculation gives $42 = 2% × 500 + 4% × 800 on taxable income of 10,000 − 4,700 standard deduction − 3,000 personal exemption − 1,000 dependent exemption. The 2021 Form 40 head-of-family tax table (p. 25) instead gives $44 at that taxable income. The booklet requires the table unless claiming a carryover or carryback net operating loss (p. 10); this PR retains the existing rate-based tax implementation.

Authority

Statutes are from the ALISON Code of Alabama API, rules from the Alabama Administrative Code API (the public site's persisted publicCode query), and forms from ADOR. All were read on 2026-10-06.

Who is taxed, and on whose return

  • Ala. Code § 40-18-2(a)(1) (ALISON): "Persons and subjects taxable under this chapter are: (1) Every individual residing in the State of Alabama."
  • § 40-18-1(37) (ALISON): "TAXPAYER. Any person subject to a tax imposed by this chapter, or whose income is, in whole or in part, subject to a tax imposed by this chapter."
  • § 40-18-27(a) (ALISON): "Every taxpayer having gross income before the deductions allowed by this chapter for the taxable year exceeding the sum of the allowable standard deduction … and the personal exemption … shall each year file with the Department of Revenue a return stating specifically the items of gross income …". Subsection (e) makes only "a husband and wife" filing a joint return jointly liable.

ADOR rules

  • Ala. Admin. Code r. 810-3-27-.01(1) (admin code):
    • (a): "Each resident shall file a return for each tax year …".
    • (b)1: "A husband and wife, each having income for the tax year, may file separate returns reporting the income and deductions of each, or they may elect to file a joint return reporting their combined income and deductions."
    • (d): "If the taxpayer is unable to make a return, his duly authorized agent or guardian is required to file the return."
  • r. 810-3-14-.01(7) (admin code): "For procedure in reporting the income of minors, see §40-18-27 and regulations thereunder." That procedure is the guardian filing the minor's own return.

Forms

  • 2025 Form 40 booklet, PDF p. 5: "Dependents who are residents of Alabama must file a return if they meet the requirements under You Must File A Return If… on this page. … The dependent or student can claim a personal exemption of $1,500, and his or her parents may claim a dependent exemption if they provided more than 50% of his or her total support."
  • The same paragraph is on p. 5 of every Form 40 booklet checked (2007, 2010, 2016, 2018–2025) and of the Form 40A booklets for 2021–2025.
  • PDF p. 8: "A dependent or student may take the standard deduction even if claimed as a dependent by someone else."

Nothing points the other way. I searched all three sources for anything that puts a dependent's income on a parent's return:

  • Code of Alabama: full-text searches found no Title 40 section mentioning a "minor child", a "dependent child", Form 8814 or 26 U.S.C. § 1(g).
  • ADOR rules: none of the 285 rules in the 89 chapters of 810-3 does so, and none allows a Form 8814-style election.
  • Form 40 and 40A booklets: no booklet mentions Form 8814, Form 8615 or a child's income.

#9801 kept the pooling only "so both match main". It cited no Alabama authority.

Changes

  1. al_agi now sums gov.states.al.tax.income.agi.gross_income_sources and .deductions with tax_unit_non_dep_add, over the head and spouse only.
  2. agi/deductions.yaml:
    • Drops dependents_self_employed_health_insurance_ald and dependents_self_employed_pension_contribution_ald. New Jersey still uses them.
    • Subtracts the filers' own us_govt_interest_person instead of the tax-unit us_govt_interest, which summed every member, as VA, MS, MT, MO, KY and NJ already do. A tax-unit us_govt_interest input no longer reaches Alabama. The original author reported neither variable is in the default dataset; the external default H5 was not inspected in the independent review.
  3. HB527 contrib reform:
    • Its copy of al_agi uses the same helper.
    • Its overtime deduction leaves out a dependent's overtime.
  4. Dependent exemption threshold (separate commit).
    • Law: § 40-18-19(a)(9) gives $1,000 for AGI "equal to or less than" $20,000 (through 2021) or $50,000 (2022 on), and $500 up to and including $100,000. The booklet charts read "0 - 50,000 / 50,001 - 100,000 / Over 100,000" (2025) and "20,001 - 100,000" (2021).
    • Bug: the bracket lookup treated each threshold as reached at equality, so AGI of exactly $20,000, $50,000 or $100,000 got the lower amount.
    • Fix: calc(..., right=True), in the variable and in the contrib dependent exemption reform. My 2021 form-based test hit this at AGI of $20,000.

Tests

Current head: d79854e1037f6d1f52387a4976166ab9849fbeeb, which merges main twice (the second merge brings in #10060's estate and trust income cases, kept alongside this PR's). Earlier-head validation at 6e958210ec: 115 passed (80 reference checks and 35 YAML cases), each file run separately. The US + core hub is rerunning the PR's test files at the current head under the heavy lock; their results go here when done.

The coverage and historical results below were verified or reported at prior head 0b36abc5b8e76a8cad604e0b74cabe6459203273, before the merge of current main. Current-head validation is recorded separately.

  • al_agi.yaml:
    • The Keep dependents' above-the-line deductions off the filer's AGI #9801 case now expects 40,000, leaving out the child's Schedule C income and their SE health insurance and SEP deductions.
    • New cases cover:
      • the dependent's wages from the example;
      • a joint return with the spouse's interest and a child's dividends;
      • a dependent's business loss;
      • U.S. obligation interest.
  • integration.yaml: end-to-end 2021 and 2025 head-of-family cases with a working dependent:
    • AGI, the standard deduction, exemptions and taxable income are hand-computed from each year's booklet; tax assertions use the existing model's statutory-rate calculation, rather than the booklet tax table;
    • the rate-based AL tax comes to $525 in 2021 and $700 in 2025 (prior-main rate-based results: $1,144.50 and $1,060.75);
    • the corresponding head-of-family table amounts are $528 at taxable income of $11,300 (2021 booklet, p. 25) and $703 at $14,800 (2025 booklet, p. 25). Both booklets require the table unless claiming a carried net operating loss.
  • al_dependent_exemption.yaml: both sides of each threshold.
  • al_us_govt_bond_interest.yaml: now uses the person-level input.
  • HB527: a dependent's overtime and wages stay off the parent's return.
  • tests/core/test_al_agi_dependent_invariants.py: Hypothesis property tests, plus a seeded 150-unit population for 2025 and 2026.
    • The original author reported that reverting al_agi to the all-member sum failed all three tests.
    • Original author's pre-merge local run: 12.6 s of test time, 1.6 GB peak RSS. The independent prior-head review measured 3 passes in 53.94 s of test time, 138.35 s for the command and 1.37 GiB peak RSS. These are historical measurements; the file runs in the existing core group.

Prior-head independent local validation passed 38 checks: al_agi.yaml (8), integration.yaml (3), al_us_govt_bond_interest.yaml (1), al_dependent_exemption.yaml (13), HB527 overtime YAML (10), and the property file (3). The original author also reported local runs of the dependent-exemption and state-dependent-exemption repeal contrib files; the independent review confirmed those files passed 5 and 7 cases respectively in the prior-head CI run. A prior static scan reported no other Alabama YAML case with a dependent who has income.

Reviews

The independent review APPROVED exact prior head 0b36abc5b8e76a8cad604e0b74cabe6459203273. Its documentation nit was to distinguish the existing model's rate-based tax results from the Form 40 table amounts; that qualification is included above and in the integration test comments. Prior-head CI run 37537836248 passed. The hub's review of the merge delta is pending.

Invariants

  1. A tax unit dependent's income and deduction inputs never change al_agi, al_standard_deduction, al_personal_exemption or al_dependent_exemption. al_income_tax is also unchanged wherever the itemized and federal tax deductions are.
  2. Differential: al_agi equals an independent numpy sum, over the head and spouse, of the parameterized person-level items, plus the tax-unit items. For units without dependents this is the old all-member sum, so they don't change when every item is supplied as a person-level input. A legacy tax-unit override of us_govt_interest is no longer read (the list now uses us_govt_interest_person; disclosed above), so such a unit can change.
  3. The dependent exemption follows the statutory tiers through each threshold and never rises with AGI.

Hub microsimulation impact (current head)

A real microsimulation on the default dataset, main at the merge base 23285ce622 against this PR's head d79854e103, for 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.

Output 2026 change 2026 records changed (weighted)
al_agi -3.33bn 79 (148,288)
al_income_tax -156.97M 73 (127,860)
al_dependent_exemption +12.40M 10 (27,320)
state_income_tax -156.97M 73 (127,860)
income_tax +0 0 (0)
household_net_income +156.97M 71 (127,859)
household_benefits +0 0 (0)

Comparison files are in fixes/9943-impact/ on the hub host.

Not in this PR

axiom: TheAxiomFoundation/rulespec-us#1527 queued

The queued rulespec issue covers Alabama AGI of the return under §§ 40-18-14, 40-18-27 and r. 810-3-27-.01, and the § 40-18-19(a)(9) tier selection. The original encoder reported a blocker: the pinned corpus release us-rulespec-2026-08-08-obbb-alien-snap lacked those statutes, rules and the TY2025 Form 40 instructions, and signed runs needed Max's approval. Updated corpus availability and encoding remain for the hub.

🤖 Generated with Claude Code

MaxGhenis and others added 5 commits October 6, 2026 17:00
Alabama taxes every resident individual on their own income (Ala. Code
40-18-2(a)(1)), and every taxpayer over the filing threshold files a
return stating their own items of gross income (40-18-27(a)). Only a
husband and wife may combine income on one return (Ala. Admin. Code
r. 810-3-27-.01(1)(b)1), and the Form 40 and 40A booklets (2007-2025,
p. 5) tell resident dependents to file their own returns. No Alabama
statute, rule or form lets a parent report a child's income.

al_agi summed every tax unit member's income, so a dependent's wages
raised the parent's Alabama AGI, standard deduction phase-out, dependent
exemption tier and tax. It now uses tax_unit_non_dep_add for both the
gross income sources and the deductions. The deductions list drops the
dependents' self-employed health insurance and plan deductions and
subtracts the filers' own U.S. obligation interest
(us_govt_interest_person). The HB527 contrib reform mirrors the change
and leaves a dependent's overtime on the dependent's return.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ala. Code 40-18-19(a)(9) gives $1,000 per dependent for AGI "equal to or
less than" $20,000 (through 2021) or $50,000 (from 2022), and $500 up to
and including $100,000. The Form 40 booklet charts read 0 - 50,000,
50,001 - 100,000 and Over 100,000. The bracket lookup counted a
threshold as reached at equality, so AGI of exactly $20,000, $50,000 or
$100,000 got the lower amount. Use calc(..., right=True) in the
variable and in the contrib dependent exemption reform.

Adds end-to-end Alabama tax cases for 2021 and 2025 households with a
working dependent, computed from the Form 40 booklets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hypothesis draws batches of Alabama tax units and runs each twice, with
dependents' income and deduction inputs as drawn and zeroed. It checks
that dependents never move Alabama AGI, the standard deduction or the
exemptions; that Alabama AGI equals a numpy sum of the parameterized
items over the head and spouse (the old all-member sum for units
without dependents); and that the dependent exemption follows the
statutory tiers through each threshold.

The test found that Alabama itemized deductions still count a
dependent's FICA and self-employment tax; that is #9941, outside this
change, so income tax is checked only where itemized and federal tax
deductions are unchanged. Reverting al_agi to the all-member sum fails
all three tests. Locally: 12.6 s of test time, 1.6 GB peak RSS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… booklets

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (909176a) to head (d79854e).
⚠️ Report is 419 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #9943   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         2    -2     
  Lines           76        30   -46     
  Branches         2         0    -2     
=========================================
- Hits            76        30   -46     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Hand-off context from the original session (local_a055ae83), for the US + core hub, which owns this PR:

@MaxGhenis MaxGhenis closed this Oct 11, 2026
@MaxGhenis MaxGhenis reopened this Oct 11, 2026
@MaxGhenis
MaxGhenis marked this pull request as ready for review October 11, 2026 23:23
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Overlap with #9894, which makes us_govt_interest count only the head and spouse. Because Alabama AGI on main still counts every member's interest, #9894 adds dependents_us_govt_interest to gov.states.al.tax.income.agi.deductions so a dependent's Treasury interest stays subtracted (case: parent wages 100,000, child 5,000 of U.S. government interest, AL AGI 100,000).

This PR replaces the same two list lines and makes Alabama AGI filer-only, which supersedes that. Whichever lands second should take this PR's version of deductions.yaml (no dependents_us_govt_interest), and #9894's AL case in al_us_govt_bond_interest.yaml still gives 100,000 here. dependents_us_govt_interest then has no user and can be removed.

@MaxGhenis
MaxGhenis merged commit 4fbf847 into main Oct 12, 2026
45 of 49 checks passed
@MaxGhenis
MaxGhenis deleted the al-agi-exclude-dependents branch October 12, 2026 11:15
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

US + core hub merge audit, us#9943 at d79854e1037f6d1f52387a4976166ab9849fbeeb (squash): Leave tax unit dependents' income out of Alabama AGI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant