Repository navigation
Treat every person in a TAXSIM record as a non-student - #1458
Merged
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 22, 2026 16:14
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). |
This branch was successfully deployed
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.
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_studentreadsis_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.This PR pins
is_full_time_studentto False for every person, through_pin_inputin 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, sha2564a17af9c…). The bundledtaxsim35-osx.exe(cdate-2025Aug23) gives the samev24on the 2021–2024 rows (it does not run 2025).v24fiitaxmatches 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'sv24matches 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_studentfor 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 readsis_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 taxsimtestv24andfiitaxnow match on all 520 minor-filer records (208 before). One Missourisiitaxvalue 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):
v24≤ 50% of the lower earner's wages.v24is the same as for the otherwise identical spouse aged 40.v24andfiitax.is_full_time_studentis False in both paths, and the pin is a registered input (so it survives the MTR branch).On
mainthe probe rows fail on both paths, and Hypothesis finds a counterexample (2025, spouse aged 8 with no wages,v24= 1,200).Tests
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_studentadded toEXPECTED_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 ate5229fe2.Plan
e5229fe2). It found thetest_mappersfixtures, fixed ine5229fe2, and the c22 unit 1101 note above.🤖 Generated with Claude Code