Fix Arkansas inflation relief credit for combined filers - #9321
Conversation
For a married couple filing combined (Arkansas filing status 4, ar_files_separately), the inflationary relief credit is looked up per spouse in the single-filer table (max $150, phased out from $87,000), per the Inflationary Relief Credit Worksheet. PolicyEngine keyed the table off filing_status, which is JOINT for any married couple, so combined filers wrongly used the joint table (max $300, phased out from $174,000) split 50/50. Use the single-filer table per spouse for combined filers, reserving the joint table and the halving split for a true joint return. Fixes PolicyEngine#9320 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9321 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 1 -2
Lines 65 30 -35
=========================================
- Hits 65 30 -35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
hua7450
left a comment
There was a problem hiding this comment.
Reviewed with a source-verification pass against the official documents (2022 AR1000F/AR1000NR booklet, the standalone 2022 and 2023 Inflationary Relief worksheets, and the DFA HB1002 impact statement). The fix is correct — approving. Also surfacing some pre-existing issues found along the way; @DTrim99 could you take a look and see which are worth fixing (follow-up or here)?
Verified
- The status-4 remap matches the law, triple-corroborated: Act 2 of 2022, 3rd Ex. Sess., § 6(b)(1)(B) ("Spouses filing separately on the same income-tax return may each claim one (1) credit"), the 2022 worksheet (the $150 table is captioned "Filing Status 1,3,4,5, and 6", and the Status 4 block looks up each spouse's own line-28 income), and the DFA impact statement. The true-joint path correctly keeps the $300 table on combined income.
- All 17 audited 2022 parameter values match the worksheet exactly (joint phase-out ends at $202,000).
- Both new tests' expectations hand-verified against the PDF brackets: $90,877 → $110 ($90,001–$91,000 row); $165,258 > $101,000 → $0; joint $256,135 > $202,000 → $0.
- Code patterns clean: fully parameterized, vectorized encode/decode round-trip, correct changelog fragment. CI green.
Non-blocking suggestions for this PR
ar_files_separately's cheaper-path comparison (and its "other credits are the same for both paths" comment) now ignores a credit that differs by path — a couple with one spouse above $101,000 gets $150×1 combined vs $300 joint, so the optimizer can pick a path that loses up to $300. You already flagged this in the PR description as a follow-up; the comment atar_files_separately.py:28-31should at least be corrected now so it doesn't state something false.- The changed variable has no
reference— and it now implements exactly the rule under review. The act PDFs above are the durable cite (there's no permanent statute: both enactments are "DO NOT CODIFY" temporary language; Ark. Code Ann. § 26-51-516 is actually the stillborn-child credit). - Test gaps in the changed direction: no case where the fix reduces the credit (e.g., combined [$30,000, $100,000] → new $150 + $20 = $170 vs old $300), and no exact boundary cases ($87,000 → $150, $101,000 → $10, joint $174,000 / $202,000). Also nothing asserts the credit flowing into
ar_income_tax(the taxsim case's net-tax figure is only a YAML comment). - Minor: the new code comment and changelog state the 2022 amounts ($150/$87,000/$300/$174,000) as if constant — the 2023 tables differ; and consider
where(filing_separately & (filing_status == statuses.JOINT), statuses.SEPARATE, filing_status.decode())so a directly-input flag on a non-married status can't silently reroute if the single-type columns ever diverge.
Pre-existing issues (not this PR — worth fixing?)
- The 2023 parameter values contradict the official 2023 worksheet by up to 3×. The 2023 worksheet keeps $150/$300 maximums (phase-outs $89,600→$103,600 and $179,200→$207,200), but
inflationary_relief/max_amount.yamlstores 2023 maximums of $50/$100, andreduction/start.yaml's JOINT block has no 2023 row (inherits $174,000). Origins traced: the $50/$100 matches the State Political Contributions Credit caps on Line 1 of the 2023 AR1000TC instructions (wrong credit), and the JOINT2023-01-01: 179_200row was added by #3807 but accidentally deleted by the WIDOW→SURVIVING_SPOUSE rename in #4130. Fixing just those two files reproduces the official 2023 tables exactly (increment/amountare already right). Verified by code-path trace and 600 DPI page reading. - The credit's parameters outlive its sunset. The credit doesn't exist for TY2024 (absent from the 2024 booklet's AR1000TC credit list). Behavior is already right —
non_refundable.yamldrops the credit at 2024-01-01 — butmax_amount.yamlcarries $50/$100 forward indefinitely, so the person-level variable still pays if queried directly in 2024+. - 3 of 4 reference URLs on all four
inflationary_reliefparameter files are dead — DFA moved from/images/uploads/incomeTaxOffice/to/wp-content/uploads/(same filenames). While refreshing: the booklet worksheet is at#page=25in the current copy (cited as 26), and two entries share the identical title "Inflationary relief income-tax credit worksheet" (2022 vs 2023). - Scalar-masked doubling in the existing HOH/surviving-spouse tests: they put two adults in the unit and assert a scalar, so the broadcast gives the unit $60/$300 — double those statuses' $150 per-return max (the divisor only halves true JOINT). Artificial situations, but worth rewriting as single-adult cases with explicit arrays. Two tests are also both named "Single household with $100,000 taxable income" though the second is a SEPARATE couple.
Items 1–3 all touch the same four parameter files, so they'd bundle naturally into one follow-up PR.
Fixes #9320.
What
For a married couple filing a combined Arkansas return (filing status 4,
ar_files_separately = True), the inflationary relief credit is looked up per spouse in the single-filer table (max $150, phased out from $87,000, gone at $101,000), per the Arkansas Inflationary Relief Income-Tax Credit Worksheet, Filing Status 4. The joint table (max $300, phased out from $174,000) applies only to a true joint return (status 2) on one combined income.ar_inflation_relief_credit_personkeyed the table offfiling_status, which isJOINTfor any married couple, so combined filers wrongly used the joint table split 50/50. This PR uses the single-filer (SEPARATE) table per spouse for combined filers, reserving the joint table and the halving split for a true joint return.Failing case (taxsim #1143)
Joint couple, TY2022, $88,000 + $162,381 wages, $10,294 interest, 1 dependent — files combined. Per-spouse net income (AR1000F line 28): primary $90,877, spouse $165,258 (PolicyEngine computes the same split).
Impact
Only the combined-married case changes. True-joint, single, head-of-household, surviving-spouse, and separate cases are unchanged (verified against the existing tests).
Tests
Related
The credit now differs by filing method ($110 combined vs $0 joint here), so the combined-vs-joint selection in
ar_files_separatelyshould ideally weigh it, as it already does for the additional tax credit for qualified individuals (#9300). Left as a follow-up to keep this change focused and avoid a circular dependency.🤖 Generated with Claude Code