Skip to content

Fix Louisiana school readiness credit across tax units - #10822

Merged
MaxGhenis merged 5 commits into
mainfrom
liheap-la-credit-mixed-simulations
Nov 16, 2026
Merged

MaxGhenis merged 5 commits into
mainfrom
liheap-la-credit-mixed-simulations

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Closes #10788

Fix Louisiana's school readiness credit when simulations contain several tax units. Project each tax unit's child care credit to its members before applying each eligible child's facility rate and summing within that tax unit.

Parents calculate each child's credit separately using facility rates under R.S. 47:6104(A)–(B). Louisiana's Department of Revenue directs taxpayers to multiply the whole child care credit by the sum of eligible children's multipliers in its 2024 IT-540 instructions, pages 29 and 31.

Bound explicit DC income levels to 1–10 and Illinois brackets to 1–4 before indexing their benefit matrices. Main already floors these keys through #10730. This change retains that floor and #10742's DC cooling-only payments, and adds upper bounds for explicit overrides.

Invariants

  • Each of the eight tested outputs equals the same household's standalone result, regardless of other households or tax units in the simulation.
  • State and eligibility masks return zero outside their scope. Valid matrix rows, expense caps and credit rates retain their existing amounts.
  • Explicit keys outside either matrix use the nearest endpoint. YAML checks DC levels 0/1/10/11 and Illinois brackets 0/1/4/5.
  • Hypothesis generates households from all 50 states and DC, with varying tax-unit membership, earnings, bills, credits and ratings. Two explicit populations cover DC, Illinois, Louisiana and New York, including multiple Louisiana tax units.

Methodology choices

Louisiana's school readiness credit enters neither la_refundable_credits nor la_non_refundable_credits on main. This PR preserves those lists; #4503 covers the broader credit implementation.

Microsimulation impact

We estimate that this branch changes none of the outputs below in 2026 on the default dataset. On main, we estimate $0 for each of the five LIHEAP outputs on that dataset. Where a user sets a DC income level above 10 or an Illinois income bracket above 4, main raises an error and the branch pays the level 10 or bracket 4 amount. The default dataset carries neither input, so the new bounds move no record. We leave out Louisiana's school readiness credit, since its formula on main raises an error on this dataset. The formula fails when one simulation holds a Louisiana tax unit, a second tax unit and more people than tax units. The credit enters no Louisiana tax total, so state income tax and household net income stay the same. We compared main at a29c73d587 with this branch at 5b603ecd77.

Output Main total Change Records changed (weighted)
dc_liheap_payment $0 $0 0 (0)
il_liheap_base_payment $0 $0 0 (0)
il_liheap_regular_heating $0 $0 0 (0)
il_liheap $0 $0 0 (0)
liheap $0 $0 0 (0)
state_income_tax $576.5bn $0 0 (0)
income_tax $2,594.9bn $0 0 (0)
household_benefits $2,060.2bn $0 0 (0)
household_net_income $17,246.6bn $0 0 (0)

Validation

Pull request run 43914619222 at 5b603ecd77 passed all 37 jobs on GitHub's merge with main 8e1837790b.

Local checks on macOS with Python 3.13.9 and Core 3.33.2:

  • dc_liheap_payment.yaml: 39 passed, including main's cooling cases and all six attribution and bounds cases.
  • il_liheap_base_payment.yaml: 25 passed.
  • il_liheap.yaml: 2 passed, including IHWAP outputs.
  • la_school_readiness_tax_credit.yaml: 14 passed.
  • test_liheap_la_credit_mixed_simulations.py: 1 property passed with eight generated populations and two explicit examples.
  • make format: Ruff formatting and lint passed; git diff --check passed against merged main.

Replacing each upper clip with main's floor fails 1 of 39 DC cases and 1 of 25 Illinois cases. Removing Louisiana's projection fails 4 of 14 cases. Removing DC's cooling route fails main's cooling-only case for a home without heating.

The source amounts come from the DC FY26 matrix, the Illinois 2026 matrix, page 2, and Louisiana's worksheets. The hand checks give DC min(904, 2,000) = 904; Illinois min(910, 2,000) = 910; Louisiana 50 × 2 = 100 and 80 × 1.5 = 120.

The Python test compares independently constructed simulations for generated populations, which fixed YAML cases cannot cover. It runs in the existing Rest Python core group. Its two explicit examples build 11 simulations. On macOS, the file took 214.69 seconds of wall time, including startup and wrapper overhead, and peaked at 1.402 GiB of resident memory. In main's CI run at 935b24ff4f, one core test batch used 1,420.47 seconds and 6.478 GiB without this property.

axiom: n/a: repairs entity projection and lookup bounds without changing encoded policy provisions.

🤖 Generated with Claude Code

MaxGhenis and others added 5 commits November 12, 2026 00:08
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis MaxGhenis changed the title Fix LIHEAP and Louisiana credit errors in mixed simulations Fix Louisiana school readiness credit across tax units Nov 15, 2026
@MaxGhenis
MaxGhenis marked this pull request as ready for review November 15, 2026 15:50
@MaxGhenis MaxGhenis closed this Nov 15, 2026
@MaxGhenis MaxGhenis reopened this Nov 15, 2026
@MaxGhenis MaxGhenis closed this Nov 15, 2026
@MaxGhenis MaxGhenis reopened this Nov 15, 2026
@MaxGhenis MaxGhenis closed this Nov 16, 2026
@MaxGhenis MaxGhenis reopened this Nov 16, 2026
@MaxGhenis MaxGhenis closed this Nov 16, 2026
@MaxGhenis MaxGhenis reopened this Nov 16, 2026
@MaxGhenis
MaxGhenis merged commit 5ae0173 into main Nov 16, 2026
125 of 133 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

US + core hub merge audit, us#10822 at 5b603ecd77c78d96940d28c1f52b09e5a6fba4ae (squash): Fix Louisiana school readiness credit across tax units.

  • Reviews:
    • The PR has no GitHub reviews. Two independent review rounds ran outside GitHub, with a fix round between them.
    • The first round, at 1ea29b9b0a against merge base 935b24ff4f, read R.S. 47:6104 on legis.la.gov, page 29 of the Department of Revenue's 2024 IT-540 instructions, DC's FY26 matrix and page 2 of Illinois's 2026 matrix. It ran 20 cases by script on the head and on the merge base. Single-unit results matched on both trees and matched its hand figures, and every mixed simulation that raised an error on the base returned each household's own amount on the head.
    • In that round the four YAML files passed on the head: DC 29, Illinois base 25, Illinois total 2 and Louisiana 14 cases. The property test passed in 147 seconds at 1.58 GB. On merge-base code the head's tests failed 2 DC, 3 Illinois base, 1 Illinois total and 4 Louisiana cases.
    • It found no P1. The PR conflicted with main in three DC and Illinois files, where Add a national LIHEAP total, an Illinois regular heating payment and LIHEAP cooling registry notes #10730 had added both lower bounds and Pay the DC LIHEAP Regular benefit to cooling-only households #10742 DC's cooling-only route. The description's impact, overlap and mutation counts had gone stale. It also found that the property test's state list relied on enum order and that one explicit example built 52 simulations.
    • The fix round, in 2b051e7a34 and 5b603ecd77, merged main, kept main's floors, cooling route and DC cases, and turned each floor into a clip. It retitled the PR and rewrote the changelog to lead with Louisiana, excluded territory and military codes by name and cut the explicit examples to 11 simulations. All five files passed, and each mutant failed the cases it targets.
    • The second round, at 5b603ecd77, found no P1 and no defect in the code. It matched the 39 resolved DC cases to the 29 prior-head and 33 main cases with no field changed. It checked every changed expectation by hand against the DC and Illinois matrices, R.S. 47:6104 and the worksheets on pages 29 and 31, and it read the test, mutant and Ruff logs.
    • Its two P2 findings asked for CI at the head and a merge check against current main, which the gates below supply. It also asked the description to mark the checked list as local evidence, to state the mutation results plainly and to drop the Claude Code footer. I made the first two corrections before merge and kept the footer.
  • Methodology choices for maintainers:
    • The model multiplies the tax unit's whole refundable and nonrefundable child care credit by each eligible child's facility rate and sums the results, as the Department of Revenue's 2024 worksheets do. R.S. 47:6104(B) says parents "shall calculate the credit of each child separately". The Department applies that rule by multiplying the whole credit by each child's rate, and the PR keeps that reading from main.
    • An explicit DC income level above 10 or an Illinois bracket above 4 now pays the level 10 or bracket 4 amount instead of raising an error. Computed in-state keys stay within 1 to 10 and 1 to 4, so only callers that override the key see this. Synthetic override cases cover both upper bounds.
    • Louisiana's school readiness credit enters neither la_refundable_credits nor la_non_refundable_credits, so it changes no tax or net income, and the PR leaves both lists alone. Adjust the Louisiana school readiness tax credit to match model standards  #4503 covers the broader credit.
  • Gates checked live at merge:
    • gh pr checks exits 0;
    • the latest Pull request run at the head, 43914619222, passed and tested this head merged into main at 8e1837790b;
    • MERGEABLE;
    • not a draft;
    • no reviewer's latest review requests changes;
    • the semantic-overlap guard: since 8e1837790b, main has changed no area this PR touches. Between the PR's merge base a29c73d587 and main at 29f81ccc36, main changed 662 files in 155 commits and none of this PR's nine. It changed nothing under the DC, Illinois or national LIHEAP folders or Louisiana's income tax credits, and no definition of a variable this PR's formulas read. The branch merges into main at 29f81ccc36 without conflict;
    • the merge pins the head.
  • Impact: we estimate that this branch changes none of the nine measured outputs in 2026 on the default dataset, which carries no DC income level or Illinois bracket for the new upper bounds to move. On main we estimate $0 for all five LIHEAP outputs. We leave out Louisiana's school readiness credit, since its formula on main raises an error on that dataset. Main a29c73d587 against 5b603ecd77.
  • Next:
  • Axiom: n/a. The PR changes how the model attributes amounts within a simulation and bounds invalid matrix keys, not what any one tax unit or household receives under the law, so no RuleSpec provision moves. [pe-parity] LA1: compose lawful Louisiana EITC, ordinary care and school-readiness credit readers TheAxiomFoundation/rulespec-us#1803 already requests R.S. 47:6104 for ordinary dependent children, and Encode DC LIHEAP FY2026 after corpus source lands TheAxiomFoundation/rulespec-us#1278 and LIHEAP cooling: encode District of Columbia LIHEAP Regular benefit for households whose only energy cost is cooling (PE-US PR 10742) TheAxiomFoundation/rulespec-us#2179 cover DC's LIHEAP payment.

🤖 Generated with Claude Code

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

Labels

None yet

Projects

None yet

1 participant