Skip to content

Treat every person in a TAXSIM record as a non-student - #1458

Merged
MaxGhenis merged 2 commits into
mainfrom
taxsim-no-student-default
Oct 22, 2026
Merged

MaxGhenis merged 2 commits into
mainfrom
taxsim-no-student-default

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

TAXSIM input has no student status, and the emulator does not default anyone to being a student (#532, where a 19-year-old dependent is a non-student). PE-US's is_full_time_student reads is_in_k12_school, which PE-US imputes for ages 5 to 17. A spouse aged 17 or younger on a joint return was therefore a full-time student, and IRC 21(d)(2) deemed them to have earned income for the child and dependent care credit. TAXSIM does not.

26 U.S.C. 21(d)(2) (LII): "In the case of a spouse who is a student or a qualifying individual described in subsection (b)(1)(C), for purposes of paragraph (1), such spouse shall be deemed for each month during which such spouse is a full-time student at an educational institution, or is such a qualifying individual, to be gainfully employed and to have earned income of not less than— (A) $250 if subsection (c)(1) applies for the taxable year, or (B) $500 if subsection (c)(2) applies for the taxable year."

This PR pins is_full_time_student to False for every person, through _pin_input in the runner (so it holds in the marginal-rate branch) and as a situation input on the single-household path. The README's input section states the convention.

Evidence

Expected values are output from the bundled taxsimtest-osx.exe (build cd2026081819, sha256 4a17af9c…). The bundled taxsim35-osx.exe (cdate-2025Aug23) gives the same v24 on the 2021–2024 rows (it does not run 2025).

Row Year Spouse age, wages Children, care taxsimtest v24 Emulator before After
1 2024 17, $0 1, $3,000 0 600 0
2 2024 17, $2,000 2, $7,000 400 1,200 400
3 2024 40, $0 (control) 1, $3,000 0 0 0
4 2023 17 (both spouses), $0 2, $6,000 0 1,200 0
5 2025 16, $1,000 1, $3,000 200 600 200
6 2021 17, $0 1, $3,000 0 1,500 0

fiitax matches taxsimtest on all six rows after the change (it differed on rows 1, 2, 4, 5 and 6 before).

Found by Tax-Calculator's PE-TAXSIM validation (PSLmodels/Tax-Calculator taxcalc/validation/pe_taxsim): the five c22–c24 units with a CDCC difference all have a spouse aged 17 with $0–$3,000 of wages. With this change the emulator's v24 matches Tax-Calculator on all five.

One of the five moves away from taxsimtest: c22 unit 1101 (2022, joint, ages 19 and 17, spouse wages $2,000, primary self-employment income $326,000, child care $6,000) goes from $600 to $400, while taxsimtest and TAXSIM-35 give $600. Their $600 does not depend on the spouse's age: both binaries still give $600 with the spouse aged 40, and $400 once the self-employment income is removed. The old match came from the deemed earnings offsetting a separate difference tied to self-employment income.

Scope

Every PE-US tax formula that reads is_full_time_student for a dependent gives the same result below age 19 (the qualifying-child age test, Indiana's dependent child), and college status already defaults to false. Minnesota's K-12 credit reads is_in_k12_school, which is unchanged. So outputs change only for a married couple filing jointly with a spouse aged 5 to 17, since IRC 21(d)(2) deems earnings only for a spouse. Single heads aged 16 and 17 do not change. The federal CDCC moves, and with it state taxes that start from it; the Hawaii CDCC floor and Oregon WFHDC joint-return test read the same flag. Independent review ran 2,600 records (10 household types, 52 state codes, 2021–2025) through main and this branch: only the 359 married-minor records changed, and against taxsimtest v24 and fiitax now match on all 520 minor-filer records (208 before). One Missouri siitax value moved about $4 further from taxsimtest; that was not traced.

Invariants (tested)

For a joint return with wages only, children under 13, and a spouse aged 5 to 17 (Hypothesis, years 2021–2025):

  1. No deemed earnings: v24 ≤ 50% of the lower earner's wages.
  2. Age neutrality: v24 is the same as for the otherwise identical spouse aged 40.
  3. Path agreement: the runner and the single-household path give the same v24 and fiitax.
  4. Every person's is_full_time_student is False in both paths, and the pin is a registered input (so it survives the MTR branch).

On main the probe rows fail on both paths, and Hypothesis finds a counterexample (2025, spouse aged 8 with no wages, v24 = 1,200).

Tests

  • New tests/test_student_status.py: the six probe rows on both paths, a macOS check that the constants match the bundled binary, the no-student check, and the property test. 15 pass locally (policyengine-us 2.58.0, Python 3.13).
  • tests/test_mtr_branch_overrides.py: is_full_time_student added to EXPECTED_OVERRIDES; 8 pass.
  • tests/test_mappers.py: the expected situations now carry the new per-person input.
  • ruff format --check . passes. CI passes on Ubuntu, macOS and Windows at e5229fe2.

Plan

  • Pin the input on both paths, with README note and changelog fragment.
  • Probe and property tests, failing on main.
  • Full suite (CI, three platforms).
  • Independent review (Opus 5.5; approved at e5229fe2). It found the test_mappers fixtures, fixed in e5229fe2, and the c22 unit 1101 note above.

🤖 Generated with Claude Code

TAXSIM input has no student status, and the emulator defaults no one to
being a student (#532). PE-US imputes is_in_k12_school for ages 5 to 17,
so a spouse that age was a full-time student and got IRC 21(d)(2) deemed
earned income ($250 or $500 a month) for the CDCC. The runner now pins
is_full_time_student to False for every person, and the single-household
path sets the same input.

Expected values come from the bundled taxsimtest binary (cd2026081819).
Found by Tax-Calculator's PE-TAXSIM validation (c22-c24 units with a
17-year-old spouse).

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

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
policyengine-taxsim Ready Ready Preview Oct 22, 2026 2:45pm UTC

Request Review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review October 22, 2026 16:14
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Merging at e5229fe: CI passes on Ubuntu, macOS and Windows (plus lint, changelog, S-corp validation and dashboard). Independent review by an Opus 5.5 reviewer approved this head after the test_mappers fixtures were added; its should-fix (the c22 unit 1101 note) and scope wording are in the body. Expected values are taxsimtest output (cd2026081819).

@MaxGhenis
MaxGhenis merged commit c704bc2 into main Oct 22, 2026
13 checks passed
@MaxGhenis
MaxGhenis deleted the taxsim-no-student-default branch October 22, 2026 16:15

This branch was successfully deployed

1 active deployment
Preview — e5229fe2 Deployed Oct 22, 2026 by vercel[bot]
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