Repository navigation
Give Arkansas 2015-2020 income tax parameters their own values - #9615
Conversation
backdate_parameters copies each parameter's first value back to 2015, so 2015-2020 Arkansas returns used 2021-2022 values. Add the DFA values for: the low income tax tables (every row, all filing statuses), the personal tax credit ($26 through 2019), and the tuition deduction caps; exempt unemployment compensation through 2017; make military retirement share the $6,000 retirement exemption before 2018 (Act 141 of 2017); and zero the additional tax credit for qualified individuals and the inflationary relief credit before 2022, when they were created. 2021+ values are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e Line 17 exemption Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9615 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 2 -2
Lines 76 46 -30
Branches 2 1 -1
=========================================
- Hits 76 46 -30
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:
|
|
Heads-up from #9636 (Arkansas gambling winnings and losses): #9636 adds |
|
Admin-merged (squash, --match-head-commit c152c04) under Max's 2026-09-26 ruling (d399: obvious improvements need no permission; admin-merge when the only block is a required review only Max could give). Gates at the reviewed head: |
- The differential test now records every threshold core passes to add_bracket (repeats included) and compares that multiset with the guard's list. Comparing the built scale's de-duplicated thresholds could not see a disagreement about a bracket at an already-taken threshold, which is the case the guard decides. - The tied-date self-test skips instead of failing if core's uprating ever stops writing the tied entry it reproduces, since CI upgrades core. - The Arkansas table invariants now start in 2015, now that main has the 2015-2020 tables (#9615); they hold for every year 2015-2030. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e thresholds (#9599) * Fix duplicate Arkansas low-income table threshold and guard scale thresholds The 2024 Arkansas low-income tax table for head of household and surviving spouse filers with two or more dependents keyed its $92 row at $24,200, the threshold of the $104 row. ParameterScale._get_at_instant passes each bracket to add_bracket, which sums the amounts of equal thresholds, so the 2024 scale became [(0, 0), (24200, 196), (24300, 116), ...]: AGI of $24,177-$24,200 got $0 instead of $92 and $24,201-$24,300 got $196 instead of $104. The official table (2024 AR1000F/AR1000NR instructions, PDF page 28) reads $0-$24,176 -> $0 and $24,177-$24,200 -> $92. The tables are evaluated with right=True, so the threshold is the upper bound of the $0 row: 24_176. The 2024 reference anchor now points at PDF page 28. calibration/gov/irs/soi/agi/total_agi repeated its $10,000,000-or-more bracket, which doubled the top bucket when loaded. Its 18 values match IRS SOI Table 1.1 for tax year 2020 (20in11si.xls, column 3), where the top bucket appears once. No code reads this parameter. Add YAML tests for AGI of $24,100-$24,401 for both filing statuses and a repo-level test that fails when any parameter scale has two brackets with the same finite threshold at any instant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Address review: mirror core in the threshold guard, flag -inf ties, add invariants Review fixes for #9599: - The guard now reads values with core's own Parameter._get_at_instant, so entries sharing a date resolve first-match as core does (an uprating start_instant can write a second entry for a date), and it counts only the brackets ParameterScale._get_at_instant passes to add_bracket (threshold and value child both non-None, value child chosen by scale type). - It checks every date any bracket child changes, not only threshold dates, since a collision can start when an amount starts. - Only +inf duplicates are exempt; -inf is a reachable bottom row and core sums duplicates there too. - Failures print one line per collision with its instant range. - Drop the self-test assertions that pinned core's summing, which policyengine-core#550 would change. - New differential test: for all 867 scales at every calendar-valid change date, the thresholds the guard sees match the scale core builds. - New exhaustive invariant tests for the Arkansas low-income tables (2021-2030): tax is non-decreasing in integer AGI up to the cutoff and infinite above it, and the head of household and surviving spouse tables agree. On main the monotonicity test fails for exactly the two 2024 tables fixed here. - Point the 2023 booklet anchor in both edited Arkansas files at PDF page 29 (the low-income tables) instead of page 25 (a worksheet). - Add YAML cases for the last 2024 rows, the $28,200 cutoff, and tax before credits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Compare add_bracket calls in the differential test; cover 2015 tables - The differential test now records every threshold core passes to add_bracket (repeats included) and compares that multiset with the guard's list. Comparing the built scale's de-duplicated thresholds could not see a disagreement about a bracket at an already-taken threshold, which is the case the guard decides. - The tied-date self-test skips instead of failing if core's uprating ever stops writing the tied entry it reproduces, since CI upgrades core. - The Arkansas table invariants now start in 2015, now that main has the 2015-2020 tables (#9615); they hold for every year 2015-2030. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
policyengine_us/system.pyrunsbackdate_parameters(first_instant="2015-01-01"), which copies each parameter's earliest value back to 2015. Most Arkansas income-tax parameters start in 2021 or 2022, so 2015-2020 Arkansas returns silently used 2021-2022 law.This PR gives those parameters their own 2015-2020 values from DFA's forms and instructions, and fixes the one formula that depended on them. It follows #9611, which fixes the 2014-2020 rate schedules. The two PRs are independent and touch different files.
ar_files_separatelyreads the first credit's maximum in every year when it compares the joint and separate pathsAlso fixes
credits/personal/age_threshold.yaml'sunit(currency-USD→year).Examples
ar_income_tax, with only themainrate schedules. The #9611 fixes are not included, so these isolate this PR.How the low income tables were built
calc(agi, right=True), the model now equals DFA's table at every whole-dollar AGI from $0 to $45,000, for all 7 files and 2015-2020. That is 1.89 million comparisons with 0 mismatches, andinfabove each table's top row.2021-01-01value equal to their old earliest value, which is what backdating produced before.2021-01-01: .inf.main.Tests
low_income/ar_low_income_tax_joint_2015_2020.yaml: for each year, all 7 tables at the zero-tax ceiling, the first taxed row and the top row. Also a check that the table applies at the ceiling and not $1 above the top. The eligibility cases use a $30,000 taxable income so they fail onmain.main. The boundary cases are 2020's $29 credit, 2018's taxable unemployment compensation, and 2018's full military exemption.policyengine-core testongov/states/arpluscontrib/states/ar: 541 passed. ruff passes.Not changed here
Already tracked in #9614, or pre-existing:
Separately, 2015-2016 households with a member 65+ cannot compute federal tax at all (#9613). The tests here supply inputs directly.
axiom: TheAxiomFoundation/rulespec-us#1405 debt
🤖 Generated with Claude Code