Repository navigation
Conversation
PR Review: Fix CalEITC child counts for ITIN holdersPR #10322 (author: MaxGhenis), head Path prefixes:
Sources read for this review (all fetched 2026-10-21):
SummaryWhat is right.
There are no critical findings and two should-address items:
There are also four suggestions: the filer identification gate (pre-existing), a parameter for the 2020 switch, end-to-end tests, and housekeeping. Status.
Critical (must fix)None. Should addressS1. The Axiom line
|
| Child | eitc_child_count |
ca_eitc_child_count, 2020+ |
Law, 2020+ |
|---|---|---|---|
| Citizen or valid-EAD SSN | counted | counted | counted |
SSN not valid for work (OTHER_NON_CITIZEN) |
not counted | counted | counted ((p)(1); Line 7 "without regard to whether it was issued for employment") |
ITIN only (NONE, has_tin true) |
not counted | counted | counted ((p)(2)) |
No SSN or ITIN (has_tin false) |
not counted | not counted | not counted (Line 7) |
Before 2020 the CA count equals the federal count, which matches the 2019 instructions.
Hand-checks (17 expectations). Unless noted, the dollar cases are 2024, with ca_eitc_eligible supplied and earned income and AGI of $1,000. That is below every 2024 phase-in end ($4,525 with no children, $6,794 with one, $9,537 with two or more) and every phase-out start, so the credit is earnings × rate × .85.
T/earned_income/ca_eitc.yaml, ITIN child.eitc_child_count0 (NONEfails Citizen or valid EAD);ca_eitc_child_count1;ca_eitc1,000 × .34 × .85 = 289.00.- Same file, child with no ID. Counts 0 and 0;
ca_eitc1,000 × .0765 × .85 = 65.025. - Same file, four ITIN children. Counts 0 and 4.
calc(4)lands in the 3+ bracket, so 1,000 × .45 × .85 = 382.50.earned_income_amounthas no separate three-child bracket, socalc(4)gives $9,537. T/earned_income/ca_eitc_child_count.yaml, 2019 ITIN child. The pre-2020 formula returns the federal count, so both counts are 0.- Same file, 2020 ITIN child.
formula_2020gives 1; the federal count is 0. - Same file, 2024 mixed family. The federal count is 1 (SSN child). The CA count is 2 (SSN and ITIN children). The child with no ID fails
has_tin, and the 25-year-old failsis_eitc_qualifying_child. - Same file, 2024 child whose SSN isn't valid for work. The federal count is 0 and the CA count is 1, as §17052(p)(1) requires.
T/earned_income/ca_eitc_integration.yaml, 2022, one child, $6,400 (input renamed only). The phase-in amount is 6,379 × .289 = 1,843.53, less (6,400 − 6,379) × .289 = 6.07, giving 1,837.46. That is within ±6 of 1,843.- Same file, 2022, three children, $8,000. 8,000 × .3825 = 3,060, within ±20 of 3,051 (phase-in end $8,954).
- Other renamed fixtures. The
ca_eitc.yaml$20,500 case and the twoca_eitc_income_boundary.yamlvectors change only the input's name.ca_eitcreads the same count, so their results can't move. CI passed them.
Vectorization and entities.
is_eitc_qualifying_childandhas_tinare Person booleans, combined with&and summed bytax_unit.suminto a TaxUnit integer.formula_2020is a period dispatch, not a branch on arrays.- The boundary test supplies
ca_eitc_child_count: [0, 1, 2, 3]across four tax units.
Callers.
ca_eitc_child_countis read only byca_eitc. No California variable readseitc_child_countany more.ca_foster_youth_tax_creditis gated onca_eitc_eligible, and YCTC usesca_eitc > 0. Neither result changes (see S2).- The federal reforms and other states that read
eitc_child_countare untouched.
References. V/earned_income/ca_eitc_child_count.py:15-20 cites AB 1876 §1 and the 2020 FTB 3514 instructions. Both are single HTML sources and both corroborate: (p), and Step 1 question 3 ("have a qualifying child who has a valid SSN or federal ITIN?") together with Line 7.
Changelog. changelog.d/statute-bugs-ca-caleitc-itin-children.fixed.md is a top-level fragment, and fixed is the right type.
Batch lessons:
- Source-conflict ratchet (Tie source-conflict markers to the register shared with Axiom #10287). The scanned roots are
variables,parametersandreforms. I ran main'sCONFLICT_COMMENT_REoverca_eitc_child_count.pyandca_eitc.py: 0 matches, including the docstring. The test YAML comments are outside the scan. CI's post-Count the FL and SD LIHEAP comments in the source-conflict ratchet baseline #10334 run passedtest_conflict_sounding_comments_do_not_growon the merge withmain. - NH Add New Hampshire state supplementation for 2026 #10156 (state-gated keys): not applicable.
ca_eitc_child_counthas nodefined_for, so its default 0 is never a missing key, and every bracket accepts any non-negative count. - Integrate modeled state unemployment insurance into income flows #9558, Document disjoint health premium inputs and correct consumer treatment #10046 and OK Add Oklahoma state supplementation for 2026 #10165: not applicable. No income-source list or wage definition changes.
- Partner tests: untouched. The Household API Partners check passed.
Axiom line assessment
Invalid: axiom: pending: hub files parity (S1).
- Recommended form:
axiom: TheAxiomFoundation/rulespec-us#<n> queued, with a new open,pe-parity-labelled, dispatch-ready issue for §17052(p)'s identification rule as it applies to qualifying children. The required contents are listed under S1. Alternatively, cite an encoder PR asencoded. - Not
n/a. This is a statutory provision, and the PR changes CalEITC amounts for families with ITIN children from 2020. - Not
encoded-correct. rulespec-usmain(5796861e58) encodes only §17052(q)'s ITIN documentation duties and defers the qualifying-child count. No open issue covers (p).
CI status
27 pass, 3 skipping, 0 pending, 0 failed. I re-checked gh pr checks 10322 at the end of this review.
- The green run. Run 39608243078 (
pull_request, created 2026-10-21 13:28 UTC) tested merge commitd17a1469. That merges head05f8b82073intofec98b87c8, which ismainafter Count the FL and SD LIHEAP comments in the source-conflict ratchet baseline #10334. - Where the California tests ran.
- Quick Feedback selected and passed
ca_eitc.yaml(5),ca_eitc_child_count.yaml(4),ca_eitc_income_boundary.yaml(8) andca_eitc_integration.yaml(21). - Baseline states-shard-1, batch 2/14 (
states/ca) also passed those files, plusca_eitc_eligible.yaml,ca_eitc_earned_income.yaml,ca_is_qualifying_child_for_caleitc.yamlandca_yctc.yaml(18).
- Quick Feedback selected and passed
- Guards. Rest (Python, shard-1 + variables) passed
test_source_conflicts.py. - Earlier runs.
- The skipped checks are the umbrella jobs of run 39506324946 (2026-10-20 22:12 UTC).
- The failed run. Run 39529786819 (2026-10-21 01:52 UTC) failed only
test_conflict_sounding_comments_do_not_grow, and every file it listed was an FL/SD LIHEAP file. That is the known main-caused failure that Count the FL and SD LIHEAP comments in the source-conflict ratchet baseline #10334 fixed, and the green run superseded it. It is not a finding.
- Locally: I ran no tests or model probes. CI is green at the current head. Every expectation and the S2 and G1 traces were checked by hand from the code and parameters.
Branch status
- Position: 2 commits ahead of
main(328d1721e2) and 18 behind. The merge base is461f78e1ee. - Merge: clean.
git merge-tree --write-tree PolicyEngine/main 05f8b82073exits 0 (tree1f98231b47).- Since the merge base,
mainhas touched no file in this PR and nothing under California credits or the federal EITC.
- Siblings (note only).
- Fix EITC eligibility for married separate filers #10307 (MFS eligibility) and Apply Arizona, Arkansas and California rules for a filer who can be claimed as a dependent #10053 (California dependent-filer rules) both edit
ca_eitc_eligible.py, and each merges cleanly with this head. - Fix EITC eligibility for married separate filers #10307's CalEITC fixtures use the default Citizen SSN and
has_tin, so both counts agree there, as the PR body says.
- Fix EITC eligibility for married separate filers #10307 (MFS eligibility) and Apply Arizona, Arkansas and California rules for a filer who can be claimed as a dependent #10053 (California dependent-filer rules) both edit
0 critical, 2 should and 4 suggestions are open at this head.
Verdict: REQUEST_CHANGES
DTrim99
left a comment
There was a problem hiding this comment.
The CalEITC count is right. From TY2020, R&TC 17052(p) accepts an SSN or ITIN for qualifying children, and before 2020 the federal rule stays; all 17 expectations hand-check. Two should-address items: (1) the 'pending: hub files parity' axiom line is invalid, so please file a pe-parity issue for 17052(p) and mark it queued; (2) ca_yctc still reads a qualifying-child variable with no SSN/ITIN test, so a child under 6 with no number gets YCTC ($1,154 in 2024) where FTB says $0. It's pre-existing, but the PR now leaves two definitions; put the ID test in the shared variable. Four suggestions. Full report in the comment above.
WIP plan
us-ca-caleitc-itin-children
Source: AB 1876, Stats. 2020, ch. 87, §1, R&TC §17052(p) permits an ITIN or SSN beginning January 1, 2020. FTB 3514 (2020), Step 1 question 3 and Line 7 expressly applies the identification rule to qualifying children; 2024 instructions corroborate it.
Change: Adds
ca_eitc_child_countand uses it throughout the California schedule calculation. From 2020, countis_eitc_qualifying_child & has_tin; before 2020, retaineitc_child_count. Existing schedule fixtures now supply the California count. Federal child counting, credit parameters, andca_eitc_eligible.pyremain outside this change. Reviewed the #10307 fixtures for compatibility; they need no changes.Witness: In 2024, an otherwise eligible family with $1,000 earned income and federal AGI and one ITIN qualifying child has federal child count 0 and California child count 1. The continuous formula gives $1,000 × .34 × .85 = $289 instead of $1,000 × .0765 × .85 = $65.025, a $223.975 increase. These are model formula amounts; the agency tables use income bins.
Years: 2020 onward. Direct child-count tests cover the 2019/2020 transition. Dollar witnesses use 2024 because several existing California schedule parameters begin in 2021; historical schedule completion is outside this identification-only fix.
Existing input limitations:
has_tindoes not separately model expiration/revocation, acquisition timing, ATINs, or the instructions' deceased-newborn exception. No competing defensible statutory reading was found for the ITIN expansion.Validation
make format(Ruff formatting and lint) andgit diff --checkpassed.87 cases passed across nine individual YAML files:
ca_eitc_child_count.yaml: 4 passed.ca_eitc.yaml: 5 passed.ca_eitc_integration.yaml: 21 passed.ca_eitc_income_boundary.yaml: 8 passed.ca_eitc_eligible.yaml: 8 passed.ca_is_qualifying_child_for_caleitc.yaml: 5 passed.ca_eitc_earned_income.yaml: 10 passed.eitc_child_count.yaml: 8 passed.ca_yctc.yaml: 18 passed.This covers the complete affected California earned-income test folder, the federal child-count regression, and the downstream California young-child credit file. Each YAML file ran sequentially in a separate foreground process with all numerical thread caps set to 4. No microsimulation; the hub runs impact.
axiom: TheAxiomFoundation/rulespec-us#1861 queued. The statutory identification rule is unencoded; historical companions need corpus ingestion, and existing FTB form sources need a release re-pin before signed encoder dispatch.