Repository navigation
Apply Idaho's 2025 eligibility tests and cap to military retired pay, and its disability definition to the retirement benefits deduction - #10715
Conversation
Idaho Code 63-3022A(1)(b), as amended by 2025 House Bills 40 and 479 (retroactive to January 1, 2025), counts military retirement benefits toward the retirement benefits deduction for a recipient who is disabled, is 62 or older by the end of the year, or worked enough to have to file a federal return. The benefits share the deduction's cap, which the taxpayer's and spouse's Social Security and Railroad Retirement benefits reduce (63-3022A(2) and (3); Form 39R line 8). From 2025 the model subtracted all of a head's or spouse's military retired pay through a separate id_military_retirement_deduction, at any age and with no cap. Military pay now runs through id_retirement_benefits_deduction with its own eligibility test, and the separate deduction and its applies parameter are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
David, Idaho's statute and the Form 39R instructions leave two points open here, and I'd like your call on both:
If you can look by Tuesday afternoon, we can merge it before the Veterans Day post (PolicyEngine/policyengine-app-v2#1523). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10715 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 4 +3
Lines 37 78 +41
Branches 0 2 +2
=========================================
+ Hits 37 78 +41
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:
|
PR Review: Apply Idaho's 2025 eligibility tests and cap to military retired paySummaryThe PR gets the 2025 law right. Idaho Code 63-3022A(1)(b), as 2025 H.B. 40 and H.B. 479 restated it with effect from January 1, 2025, admits military retirement benefits for a retired member, or the member's unremarried widow or widower, "who: (i) Is classified as disabled...; (ii) Has attained the age of sixty-two (62) years by the end of the tax year; or (iii) Was employed during the tax year and received sufficient income from such employment to be required to file a federal return under section 6012(a)(1)". Subsections (2) and (3) put those benefits under the same single cap as the (1)(a) civil service, firefighter and police benefits. The PR replaces main's uncapped, untested-for-age
Pre-2025 results are unchanged. The removed variable and parameter have no remaining readers on the tree merged with main. The PR composes cleanly with sibling #10717. Four items are left, none of them a wrong result against binding law:
On the two readings the author asks about, I recommend keeping both (reasons under Should 2). Critical (must fix)None. Should address
Suggestions
Verified correct
Axiom line assessment
rulespec-us#2077 is OPEN, labelled For
Fix: change the line to CI statusAt head Branch status1 ahead, 40 behind Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
Requesting changes per the review above: 0 critical, 4 should (two unpinned income sources; three readings to record, incl. 6012(f) vs the statute's 6012(a)(1); multi-page reference titles; axiom line needs a status word and #2077 a blocker), 5 suggestions. The 2025 rules match the bill text and compose cleanly with #10717.
…irement-deduction
Add YAML cases for specified service business and farm profit, a 2025 separate return with $5,000 of wages, a 2026 separate return with no income from employment, a joint return where only the spouse's wages reach the threshold, and a $5,000 business profit under the 2025 threshold. Record four readings of Idaho Code 63-3022A(1)(b)(iii) as source-conflict candidates: section 6012(f) decides 2025, business and farm profit count, a joint return uses the person's own income against the joint threshold, and section 6017 doesn't count. State them in the variable's documentation. List each H0040 and H0479 page the references cite, move the military cases into the variable-named test files, and describe the cap offset as the model applies it: Social Security retirement benefits, without Railroad Retirement benefits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the two gross income thresholds of the federal filing requirement, section 6012(f) for 2018 to 2025 and section 6012(a)(1)(A) and (B) in other years, into section_6012_gross_income_thresholds. Both tax_unit_is_required_to_file and Idaho's military retirement employment test read them there, so a change to the federal thresholds reaches the Idaho test. No result changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
I took the other four suggestions and corrected the two Railroad Retirement descriptions; the offset fix itself goes to #10814. A new helper, |
PR Review (round 2): Apply Idaho's 2025 eligibility tests and cap to military retired paySummaryAll four round-1 findings are fixed at head
I ran nothing locally. Expected values below are checked by hand from the parameters and formulas at the head, and CI is green there (36 checks). Two suggestions are left, both about the conflict backlog. Neither blocks the merge. Prior findings
Mutation checks (each case is in
New findingsCriticalNone. Should addressNone. Suggestions
VerifiedLaw, read again for this round
Shared helper (
Other checks
Axiom
CIAt head Branch4 ahead, 4 behind
The merged tree also merges cleanly with sibling #10717 (head Verdict: APPROVE |
DTrim99
left a comment
There was a problem hiding this comment.
Approving at d9664e2dea. All four items from round 1 are fixed and each has a case that fails without the fix: the two income sources are pinned, the four readings are in the conflict backlog and the variable's documentation, the page titles are right, and the axiom line and rulespec-us#2077 carry the blocker. The shared section 6012 helper moves the federal expressions term for term, so no federal or other state result changes. Two optional suggestions about the conflict backlog are in the round 2 report above; all 36 checks pass.
- The 2025 filing-test and self-employment-return candidates now say each ruling follows the statute-first rule and link the review that recommended it. - The employment-eligibility documentation now describes the test as the gross income thresholds of tax_unit_is_required_to_file without its dependent-filer and joint-exception tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tests read them - `id_retirement_benefits_deduction_disabled` follows 63-3022A(4), 63-701(1)(d) and (e) and 49-117(7)(b)(iv): own SSDI, the SSI disability test, a veteran fully disabled by a service-connected disability, permanent and total disability, and `is_disabled` as a stand-in for groups with no input. Both the (1)(a) age-62 test and the military test read it, in every year. - `business_gross_income` (Schedule C line 7) and `farm_gross_income` (Schedule F line 9) feed the employment test, defaulting to net income floored at zero. - Taxable dependent care benefits (section 129(a)(2)(B)) and the section 911 exclusion (6012(c), Form 2555 line 43, via `foreign_earned_income_exclusion_gross_person`) count as employment income. - Separate filers and a jobless survivor under 62 now assert `id_subtractions` of 0, and a working widow aged 50 deducts $25,000. - Candidate `us-id:military-retirement-survivor-routes` with IDAPA 35.01.01.130.02 and Form 39R captures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Since your approval at d9664e2, the second round of the independent review found four gaps in how the PR reads 63-3022A's tests, and d9394e1cad closes them:
The PR body describes each change, its tests and the cases that fail without it. A scoped third round of the independent review is checking these fixes. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round 3 of the review found that setting business_gross_income, farm_gross_income, id_retirement_benefits_deduction_disabled or foreign_earned_income_exclusion_gross_person for one person replaced everyone else's fallback with the default. Each now has a raw input whose default means not supplied (-1, or UNSPECIFIED for the classification) and a derived variable that uses the person's own entry or, without one, that person's fallback. The disability classification no longer counts the SSI disability test, permanent and total disability or a fully disabled service-connected veteran by themselves. Form 2555 line 43 comes from a supplied amount, then the sole filer's return amount, and never from the legacy worksheet amount, which can include the line 50 housing deduction. The Idaho dependent care case supplies the line 16 qualified expenses main now requires, and a new case pins that unreported expenses leave all box 10 benefits taxable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Since the note above, the third round of the independent review, at d9394e1cad, found five more gaps. e4d0ecf57f closes four. #11222 fixes the federal dependent care calculation behind the fifth, and once it merges this PR adds the Idaho case that closes it. Points 1 to 3 of that note change as follows, and the PR body's mutation claims are new:
The fourth and last round of the independent review checks these fixes once #11222 merges and that case is in. |
Give business_gross_income_reported, farm_gross_income_reported, foreign_earned_income_exclusion_gross_person_reported and id_retirement_benefits_disability_classification a formula that returns the not-supplied default, so Core neither carries an entry into a later year nor uprates it. Pin omitted-year, explicit-zero and cross-person cases for each, say in the docstrings that the fallbacks' own inputs still carry as on main, and record that Form 1040 Chart A and Publication 501 state the filing test differently from section 6012(f). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99
left a comment
There was a problem hiding this comment.
Program review
Base repository: PolicyEngine/policyengine-us
PR number: 10715
Reviewed head SHA: 2b05865
Merge base SHA: e32ea13
Mode: full, with a recheck of David's earlier approval (head d9664e2)
Scope: changed behavior and affected dependencies
Source manifest: /private/tmp/policyengine-command-runs/ea33c0bb2b64/pr-10715-review-sources.json
Review status: COMPLETE
Source Documents
- id-63-3022A.html — cached original.
- id-ein00046-2025.pdf — cached original.
- id-63-701.html — cached original.
- id-49-117.html — cached original.
- id-h0040.pdf — cached original.
- id-ein00046-2024.pdf — cached original.
- irs-i1040gi-2025.pdf — cached original.
- usc-26-129.html — cached original.
- usc-26-6012.html — cached original.
- irs-f2555-2025.pdf — cached original.
- irs-f2441-2025.pdf — cached original.
- idapa-350101.pdf — cached original.
Critical
None.
Should Address
A1 — Forfeited dependent care benefits now count as Idaho employment income and can pass the employment test (OPEN)
- Severity: CRITICAL (wrong eligibility for an affected household; the author concedes it and holds the last review round for it)
- Location:
parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/employment/income_sources.yaml:19(taxable_dependent_care_benefits, added after the approval). The cause is the unchanged federalvariables/gov/irs/income/taxable_income/adjusted_gross_income/irs_gross_income/taxable_dependent_care_benefits.py:27-31. It computes box 10 (Form 2441 line 12) less the exclusion and has no line 14. - Trigger (the author's round-3 case, as the PR body gives it): 2025, head of household, under 62 and not disabled, with military retired pay, $23,000 of box 1 wages and $6,000 in W-2 box 10. $1,000 of the box 10 amount was forfeited, and qualified expenses are $5,000.
- Expected: Form 2441 line 15 = 6,000 − 1,000 = 5,000. With $5,000 excluded, line 26 = 0. Income from employment is $23,000, which is not more than the $23,625 2025 head-of-household threshold, so the test fails and no military pay is deducted.
- Observed (code trace, not executed): taxable = 6,000 − 5,000 = 1,000. Income from employment is $24,000, which is more than $23,625, so the test passes. The household deducts its military pay up to the $48,216 cap; at Idaho's 5.3% rate, $20,000 of pay is worth about $1,060 of tax.
- Why this diff: at d9664e2 the employment test didn't read
taxable_dependent_care_benefits. Reading it is right for line 1e, so the fix is #11222 (line 14), not dropping the source. The model has no line-14 input at this head, so a user can't keep forfeited amounts out. - Source: Form 2441 (2025) page 2, lines 12-15 and 25-26 (https://www.irs.gov/pub/irs-prior/f2441--2025.pdf#page=2). The PR body's "Not changed" section and the author's 11-22 response concede it.
- Remedy (the author's own plan): merge main after #11222, then add the forfeiture case and the supplied-line-26 cases before the final round.
Suggestions
S1 — The default disability classification leaves out SSI disability awards, which the input's own documentation counts as SSA recognition (OPEN)
- Severity: SUGGESTION
- Location:
variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction_disabled.py:80-86 - 63-701(1)(d) covers a person "recognized as disabled by the social security administration pursuant to title 42". An SSI disability award is made by SSA under title 42 (42 U.S.C. 1382c(a)(3)), and the docstring of
id_retirement_benefits_disability_classification(lines 19-23) lists "a disability insurance or SSI disability award" under DISABLED. The default rightly drops the SSI disability test (is_ssi_disabledis not an award). But it doesn't count actual SSI receipt on the basis of disability (for exampleis_ssi_disabledwithssi > 0, not aged), so the author response's line "63-701 lists neither the SSI test nor ..." is accurate only for the test. - Impact: small. SSI income limits keep Idaho taxable income near the 0% band, main didn't count SSI either, and DISABLED can be supplied. Optional: derive the award, or say in the docstring that an SSI disability award needs DISABLED.
S2 — The SSDI route widens the known Social Security offset question, and the register doesn't record it (OPEN)
- Severity: SUGGESTION
- Location:
variables/gov/states/id/tax/income/deductions/retirement_benefits/id_retirement_benefits_deduction.py:26-30(subtracts onlysocial_security_retirement) - Statute 63-3022A(3) reduces the cap by "federal social security act retirement benefits". 2025 Form 39R line 8c (file page 45) subtracts "Box 5 of your Form SSA-1099s", which includes SSDI. This diff makes SSDI receipt a way to qualify, so the people it newly admits are exactly the ones the two sources split on.
- Example: 2025, single, age 50, $30,000 of SSDI and $40,000 of military retired pay. The model (statute reading) deducts $40,000; Form 39R line 8 gives 48,216 − 30,000 = $18,216.
- The PR body cites line 8c as part of the #10814 gap, but
source_conflicts/candidates.yamlhas no entry for this split between the statute and the form. Record one, or confirm that #10814 covers SSDI.
S3 — H0040 page locators for the age parameters (OPEN)
- Severity: SUGGESTION
- Location:
parameters/gov/states/id/tax/income/deductions/retirement_benefits/military/age_eligibility/main.yaml:16-17anddisabled.yaml:16-17cite H0040 section 2 at #page=5 for "63-3022A as in effect for 2024". - In the bill PDF, the pre-2025 age test ("attained age sixty-five (65) years, or has attained age sixty-two (62) years and is classified as disabled") is on file page 4, where section 2 starts. The military paragraph is on page 5, and the (d)→(4) definition of "disabled" is on page 6. Use title "#page 4-5" with href #page=4. The values (65/62 before 2025, 62/0 from 2025) are correct, and the 2024 Form 39R page 31 citation supports them on its own.
Evidence Gaps
No material gaps reported.
Notes
- Coordinator's ruling on policy-1: the policy reviewer rated it critical. It is consolidated as should-address, and either rating blocks merge. The diff's own change is right: the employment test reads
taxable_dependent_care_benefits, which is Form 2441 line 1e. The wrong result comes from a federal gap that predates this PR, the missing line 14, and #11222 (open) adds that line. The effect needs forfeited W-2 box 10 benefits that push employment income over the test threshold. The author has already scheduled the fix: after #11222 merges, merge main and add round 3's forfeiture case. Once that is in, this review has no blocking item left. - Earlier review (David approved d9664e2).
- Round 1 Should 1: resolved. Business and farm gross income now read Schedule C line 7 and Schedule F line 9, with fallbacks.
- Round 1 Should 2-4 and Suggestions 2-5: resolved, unchanged since the approval.
- Still open as suggestions, for whenever convenient:
- the Railroad Retirement and SSDI offset, deferred to #10814 (see policy-3 on SSDI);
- four federal filing-requirement backlog entries that don't list
policyengine_us/tools/filing_requirement.pyundercode:; - two
us-id:military-retirement-employment-*entries that still say "Ruled 2026-11-08".
- The code side is clean. It has no cycles, no hard-coded values and correct entities and periods. The employment test inputs (business, farm, Form 2555 line 43, dependent care) are pinned by tests, and the age and disability parameters (65/62 before 2025, 62/0 from 2025) are correct. The PR is a draft and merges cleanly into current main.
Validation Summary
Local tests at the reviewed head pass (the changed tests plus the Idaho income tax directory; review venv, imports from the snapshot). Sources: Idaho Code 63-3022A and 63-701, H0040, the 2024 and 2025 Form 39R instructions, and the 2025 Form 2441, checksums validated. CI on the head: 38 checks succeeded.
Timing
policy role seconds: 579.00s; code role seconds: 593.00s; parallel review seconds: 593.00s; elapsed seconds: 700.00s
Review Severity
COMMENT. Open findings: 0 critical, 1 should address, 3 suggestions.
What was wrong
From 2025, PolicyEngine-US subtracted all of a head's or spouse's military retired pay in Idaho through a separate
id_military_retirement_deduction, at any age, with no work or disability test and no cap. Idaho's 2025 law counts military retirement benefits only for recipients who meet one of three tests, and only within the retirement benefits deduction's cap, which Social Security and Railroad Retirement benefits reduce.The law
(i) Is classified as disabled, as defined in subsection (4) of this section;
(ii) Has attained the age of sixty-two (62) years by the end of the tax year; or
(iii) Was employed during the tax year and received sufficient income from such employment to be required to file a federal return under section 6012(a)(1) of the Internal Revenue Code."
irs_employment_incomeleaves out all such benefits, andtaxable_dependent_care_benefitsholds the taxable part: the W-2 box 10 benefits less the excluded amount (line 25), which the line 16 qualified expenses limit.Change
id_eligible_military_retirement_income, which keeps its unremarried-survivor rule and moves todeductions/retirement_benefits/) count inid_retirement_benefits_deduction_relevant_incomewhen the newid_retirement_benefits_deduction_military_eligible_personholds, so they share the cap and the offset inid_retirement_benefits_deduction. That variable subtracts the head's and spouse'ssocial_security_retirementfrom the cap, as it already did for the (1)(a) benefits.id_retirement_benefits_deduction_military_eligible_person: head or spouse, and age at leastmilitary.age_eligibility.main(65 before 2025, 62 from 2025) or, if classified as disabled,military.age_eligibility.disabled(62 before 2025, 0 from 2025), or the employment test. The tests apply to an unremarried widow or widower as to the member.id_retirement_benefits_deduction_disabled(new, calculated): the 63-3022A(4) classification. Both this test and the (1)(a) test inid_retirement_benefits_deduction_eligible_personnow read it in place ofis_disabled, in every year from 2021. A suppliedid_retirement_benefits_disability_classificationdecides: a new classification a caller can supply, which takesDISABLED,NOT_DISABLEDor, by default,UNSPECIFIED, meaning not supplied. When it isUNSPECIFIED, the model classifies the person as disabled if they receive Social Security disability insurance benefits (social_security_disability, an SSA finding of disability) or haveis_disabled. As before,is_disabledstands in for the groups PolicyEngine-US has no input for, and it can also admit a disability no 63-701 or 49-117 group covers. The model doesn't infer the classification from the SSI disability test or from permanent and total disability under 26 U.S.C. 22(e)(3), neither of which 63-701 or 49-117 lists. Nor does it infer it fromis_fully_disabled_service_connected_veteran: a VA service-connected rating of 10% or more is the recognition 63-701(1)(e) lists, but only for "A disabled veteran of any war engaged in by the United States", and PolicyEngine-US doesn't record wartime service. SupplyDISABLEDfor people who qualify. Blindness alone doesn't count; 63-701(1)(g) lists it as its own group. This adds recipients aged 62 to 64 who receive SSDI withoutis_disabledto the (1)(a) test and, before 2025, to the military age test. Nobody loses eligibility unless their own classification is supplied asNOT_DISABLED.id_retirement_benefits_deduction_military_employment_eligible: from 2025 (military.employment.in_effect), the person's income from employment (military.employment.income_sources: wages, taxable employer dependent care benefits from Form 2441 line 26, gross income from a business or farm, and the person's own section 911 exclusions from Form 2555 line 43, each floored at zero) by itself meets the gross income test of the federal filing requirement for the person's return. It takes the thresholds fromsection_6012_gross_income_thresholds: section 6012(f) for 2025 (more than the standard deduction, and any income on a separate return) and section 6012(a)(1)(A) and (B) from 2026 (at least the basic standard deduction plus the additions for age, and $0 on a separate return). The variable's documentation states the four readings below. The dependent care amount comes from the federaltaxable_dependent_care_benefits. Since Correct historical federal taxes and add annual 2017–2026 tests #10854 the federal exclusion takes Form 2441 line 16 fromdependent_care_assistance_qualified_expensesand needs a qualifying person, so when line 16 isn't supplied, all W-2 box 10 benefits count as taxable, and Idaho counts them as income from employment.business_gross_income_reportedandfarm_gross_income_reported(new person-level amounts a caller can supply): Schedule C line 7 and Schedule F line 9, totalled with any negative line counted as zero.foreign_earned_income_exclusion_gross_person_reported(a new person-level amount a caller can supply): the person's own Form 2555 line 43, the line 36 housing exclusion plus the line 42 foreign earned income exclusion. The wage, business and farm inputs (employment_income, the two gross inputs and the net profits that stand in for them) exclude amounts excluded under section 911, which users enter separately as Form 2555 amounts, so the Idaho test adds them back once, through line 43. The three amounts default to -1 and the classification toUNSPECIFIED, both meaning not supplied, so one person's entry of them never changes another person's value. An entry for a calendar year applies only to that year. PolicyEngine-US turns onauto_carry_over_input_variablesand gives float dollar inputs a default uprating (tools/default_uprating.py), so Core copies a plain input into a later year for which nobody has an entry and uprates a dollar input as it does so. It does neither for a variable with a formula, so each of the four inputs has a formula that returns its default. A year without an entry uses that person's fallback, whatever anyone enters of these four for that year. The business, farm and disability fallbacks read inputs that still carry, as on main (net profits,is_disabledand Social Security disability benefits): an entry carries into a later year only when no one has an entry for that year, so enter those for every year calculated. The model uses an entry of zero or more as entered, zero included; any negative amount means not supplied. Otherwise the calculatedbusiness_gross_income,farm_gross_incomeandforeign_earned_income_exclusion_gross_personfall back for that person alone. The business and farm fallbacks take the net profits (self_employment_incomeplussstb_self_employment_income, andfarm_operations_income), each floored at zero, as the employment test did before. The line 43 fallback, on a return with one head or spouse, credits the return's line 43 (foreign_earned_income_exclusion_gross, as entered or as lines 36 and 42 from the Form 2555 leaves) to the head. On a joint return it gives zero, because each spouse files a separate Form 2555 and the tax unit amount doesn't say whose it is. The legacyforeign_earned_income_exclusion(worksheet line 2c, which subtracts line 44 and adds the line 50 housing deduction) never stands in for line 43, because no inputs can show that it equals line 43: without Form 2555 leaves nothing shows that lines 44 and 50 and worksheet line 2b are zero, and once any leaf is entered, even a zero, the leaves give line 43 as lines 36 and 42. So a legacy amount alone adds nothing, even where it is all line 43; a filer who knows line 43 enters it asforeign_earned_income_exclusion_gross_person_reported. Only the Idaho test reads these; federal tax still uses the existing amounts. The cost of the formulas: Core doesn't count the four as input variables (is_input_variable()is False), soSimulation.to_input_dict()andto_input_dataframe()leave out supplied values unless called withinclude_computed_variables=True,true_input_variableslists none of them, and a simulation rebuilt from that export loses them. An entry keyed by a period of several years or by a year that starts after January, such asyear:2024:3, now applies to no year; before, Core carried it. In local checkouts of policyengine-api and policyengine-app-v2 (not checked against the live services), the household builder lists only input variables, so it wouldn't offer these four. Supply them in the situation, through the API or Python, or withset_input; the four docstrings state the export behavior.section_6012_gross_income_thresholds(new,policyengine_us/tools/filing_requirement.py) returns both gross income thresholds of section 6012 for a tax unit, or for each person's tax unit.tax_unit_is_required_to_filenow reads its thresholds from it too, so a change to the federal thresholds reaches the Idaho test. Its results don't change.income_sources.yamlnow lists only the (1)(a) benefits (public_pension_income) in every year. The military age parameters repeat the (1)(a) test for 2021-2024, so before 2025 results change only through the disability classification: a head or spouse aged 62 to 64 who receives SSDI withoutis_disabled, or whose supplied classification isDISABLED, now meets the (1)(a) test and the pre-2025 military test. A 2024 single filer aged 63 with $10,000 of SSDI deducts $20,000 of military retired pay or public pension, against $0 on main. A 63-year-old whose only disability facts are permanent and total disability, the SSI disability test or a fully disabled service-connected veteran flag deducts nothing, as on main. Whereis_disabledalone decides the classification, pre-2025 results don't change.id_military_retirement_deduction, itssubtractions.military_retirement.appliesparameter and the 2025 entry ofsubtractions.yamlthat listed it. No other reader of either remains.Readings taken
The statute and Form 39R line 8e, which repeats its words without the section number, leave four points open, and IDAPA 35.01.01.130.02 raises a fifth.
source_conflicts/candidates.yamlrecords each reading as a candidate for the shared register, and a YAML case pins each one:us-id:military-retirement-employment-2025-filing-test). The statute names section 6012(a)(1), which section 6012(f) displaces for 2025. The model applies (f), the requirement in force: Idaho Code 63-3004 adopts the Code "as amended and in effect on the first day of January 2026", and a literal "(a)(1)" reading would admit nobody under (iii) for 2025. A single filer with $15,750 of wages fails in 2025, and so does a blind single filer with $17,750; the (a)(1) thresholds would admit both. So would Chart A of the 2025 Form 1040 instructions and Publication 501, which require a return at gross income of "at least" an amount that rises for age alone. Under the statute-first rule the model follows section 6012(f), astax_unit_is_required_to_filedoes;source_conflicts/candidates.yamlalready records that federal conflict as the open candidateus:filing-chart-a-blindness-and-equality, and this PR's candidate cites both IRS sources.us-id:military-retirement-employment-includes-self-employment). Gross income from a business or farm (Schedule C line 7, Schedule F line 9) counts as income from employment, as wages do. The statute doesn't define employment, the gross income test it borrows counts that income, and a wages-only reading would deny the deduction to a veteran who earns the same income from a business. Removingbusiness_gross_incomeandfarm_gross_incomefromincome_sources.yamlgives the wages-only reading, apart from excluded foreign self-employment income, which the section 911 amount still carries.us-id:military-retirement-employment-joint-threshold). The recipient's own income from employment must reach the joint return's threshold. "Sufficient income from such employment" makes that income the measure, and section 6012 gives a married individual no threshold of its own. On a 2026 joint return, a recipient with $20,000 of wages fails although the couple, with the spouse's $40,000, must file.us-id:military-retirement-employment-self-employment-tax-return). Section 6017's return requirement at $400 of net earnings from self-employment doesn't count, because the statute names section 6012(a)(1). A 2025 single filer with $5,000 of gross business income fails.us-id:military-retirement-survivor-routes). The statute's three tests apply to an unremarried widow or widower, so a working survivor under 62 qualifies. Rule 130.02, adopted before the 2025 amendment, admits survivors at 65, or 62 and disabled, "even though the deceased spouse was not eligible at the time of death"; it doesn't say only they qualify, and everyone it admits also meets (1)(b)(ii). Form 39R's survivor paragraph, which refers to "the age/disability requirements", sits in Part One of the test "for all other retirees", whose Part Two lists no military benefits. Read that way neither contradicts the statute, so the reading follows the statute without a referral to the project lead. A 2025 widow aged 50 with $20,000 of wages deducts her $25,000 of survivor benefits; under an exclusive reading of the rule she would deduct nothing, and nor would a widow aged 62 without a disability.source_conflicts/sources/us-id/captures the rule (PDF pages 22-23) and Form 39R instructions pages 45-46.Invariants
For every input:
business_gross_income_reported, the employment test holds exactly whentax_unit_is_required_to_filedoes and that income exceeds zero.id_retirement_benefits_deduction= min(counted benefits, max(cap − head and spouse Social Security retirement benefits, 0)), so it lies between 0 and the counted benefits; the 2025 cap equals $48,216, $72,324 joint and $0 separate.tests/core/test_id_military_retirement_deduction_invariants.pychecks all five (it sets the disability classification throughis_disabled), with the thresholds and caps restated from Chart A of the 2025 Form 1040 instructions (its basic and age amounts), Rev. Proc. 2025-32 and Form 39R. A grid covers every filing status, ages on both sides of 62 and 65, disability, blindness, and wages or profit a dollar under, at and over each year's threshold for 2024-2026. A Hypothesis test draws further units. Three mutations, run in memory at 2b058657cd, each fail both tests: counting military retired pay for every head or spouse without the eligibility tests, a strict comparison with the 2026 threshold, and dropping the 2026 age addition from the Idaho test's threshold.Cost: in CI run 42658779959 at f994b5b (Linux, "Full Suite - Rest (Python shard 3)", group core-2),
test_gridtook 2.51 s andtest_drawn_units1.22 s. CI reports no peak-memory figure for the group.Tests
id_retirement_benefits_deduction_military_employment_eligible.yaml(39 cases): the 2025 and 2026 thresholds for single and joint returns, a dollar under, at and over; age and blindness; a separate return in 2025 ($5,000 of wages meets the test) and in 2026 (no income from employment fails it); the joint return where only the spouse's wages reach the threshold; business, specified service business and farm profit standing in for gross income; $5,000 of gross business income under the threshold; gross business and gross farm income over the 2025 threshold with net profits under it; a 2025 head of household whose $23,000 of wages and $1,000 of taxable dependent care benefits, with $6,000 of qualified expenses on Form 2441 line 16, exceed $23,625, and one whose $1,000 of benefits all count as taxable because the return reports no qualified expenses; excluded foreign wages for a single filer and, on joint returns, for the retiree but not the spouse; a spouse's supplied gross business or farm income that leaves the retiree's net profit in place in 2025; a retiree's gross business or farm income supplied only for 2025, which doesn't apply in 2026, so the retiree's own $5,000 net profit falls short of the joint threshold, and the same for gross business income when the head enters an amount for 2026; a supplied zero of gross business income; one return's supplied line 43 beside another return's sole filer, who keeps that return's own line 43; section 911 amounts supplied only for 2025, which don't apply in 2026, so each return's own line 43 stands in; a sole filer'sforeign_earned_income_exclusion_grosswithout Form 2555 leaves; the line 50 housing deduction, as a legacy amount or as a leaf, which doesn't count; a business loss against wages; pension and interest income; no test before 2025.id_retirement_benefits_deduction_military_eligible_person.yaml(13 cases): the age, disability and employment tests in 2024 and 2025, a 45-year-old receiving SSDI, a suppliedNOT_DISABLEDoverridingis_disabled, and a dependent.id_retirement_benefits_deduction_disabled.yaml(17 cases, new): SSDI andis_disabledeach classify a person as disabled; the SSI disability test, a fully disabled service-connected veteran flag, permanent and total disability, no facts, blindness alone, Social Security survivor benefits and veterans benefits alone don't. A suppliedDISABLEDadmits the veteran,NOT_DISABLEDoverrides SSDI andis_disabled,UNSPECIFIEDgives the default, and one spouse'sNOT_DISABLEDleaves the other spouse's SSDI default in place. Across years: a classification supplied only for 2024 doesn't apply in 2025, where the SSDI default decides; one supplied for 2025 replaces the 2024 one; and a spouse'sDISABLEDsupplied only for 2024 doesn't admit the spouse's 2025 public pension, whether or not the head supplies a classification for 2025.id_retirement_benefits_eligible_person.yaml(1 case added): a 63-year-old receiving SSDI meets the (1)(a) test.id_retirement_benefits_deduction_relevant_income.yaml(7 cases, new): which benefits count in 2024 and 2025, a working couple, and a public pension that still needs the (1)(a) age test.id_retirement_benefits_deduction.yaml(13 cases added): the shared $48,216 cap, the Social Security offset, the retired couple (72,324 − 30,000 = 42,324), a separate return, unremarried survivors under and at 62, a working survivor under 62, a 45-year-old with $10,000 of SSDI and $20,000 of military retired pay ($20,000 deducted), and the effect onid_subtractions; and, in 2024, a 63-year-old with a $20,000 public pension whose only disability fact is permanent and total disability, the SSI disability test or a fully disabled service-connected veteran flag (nothing deducted), and the same veteran with a suppliedDISABLED($20,000 deducted). The separate-return and jobless-survivor cases assertid_subtractionsof zero, which main gives as $30,000 and $25,000 through the removed subtraction.business_gross_income.yaml(9 cases),farm_gross_income.yaml(9) andforeign_earned_income_exclusion_gross_person.yaml(14), new: the fallbacks, a business loss and a farm loss, a supplied amount and a supplied zero used as entered, a supplied negative amount, which means not supplied, and one person's supplied amount beside another person's fallback. In each file, an amount supplied only for 2025 doesn't apply in 2026, where the fallback stands in; a zero supplied for 2026 is used; and one person's (or return's) amount supplied only for 2025 doesn't apply in 2026 beside another's 2026 amount. The line 43 file adds a return with one filer and a child, line 43 without the line 44 deductions and the line 50 housing deduction, an enteredforeign_earned_income_exclusion_grosswithout leaves, and a negative one, which counts as zero; the legacy worksheet amount, which doesn't stand in, whether it holds a line 50 housing deduction or would equal line 43; joint returns with and without each spouse's amount; and two returns in one simulation.id_eligible_military_retirement_income.yaml(5 cases): the survivor cases from the removedid_military_retirement_deduction.yaml.Mutations at 2b058657cd, run in memory by a script against the 139 cases in the Idaho retirement benefits test folder and the three person-level test files, one file per process, each fail at least one case. No case fails unmutated, and in every file a control run that restates the lists and fallback formulas unchanged matches the unmutated run. Dropping an entry of
military/employment/income_sources.yamlfails 19 cases for wages, 2 for taxable dependent care benefits, 4 for gross business income, 3 for gross farm income and 4 for the section 911 amount; droppingpublic_pension_incomefrom the (1)(a) list fails 2. Zeroing a whole formula fails 13 cases forbusiness_gross_income, 10 forfarm_gross_income, 14 forforeign_earned_income_exclusion_gross_person, 2 fortaxable_dependent_care_benefitsand 13 forid_retirement_benefits_deduction_disabled. Zeroing one read in those formulas fails between 1 and 14: each supplied input (business 13, farm 10, line 43 14, classification 6), net self-employment and SSTB profit (9 and 3), net farm profit (8), the return'sforeign_earned_income_exclusion_grossand the head and filer-count tests (12 each), the box 10 benefits (2) and the exclusion (1), SSDI (7) andis_disabled(4). Formulas restated with one rule changed fail too: re-adding the SSI, permanent-and-total and VA defaults (6); ignoring the supplied classification (6) or the supplied line 43 (6); treating a supplied zero as not supplied (business 3, farm 2, line 43 2); dropping the per-person fallback (business 11, farm 8); treating only exactly −1 as not supplied, which misses a supplied negative amount (business, farm and line 43, 1 each); falling back to the legacy section 911 amount (5); crediting a joint return's line 43 to the head (2); and dropping the zero floor on the return's line 43 (1). Removing the formula from any of the four new inputs, so that Core carries an entry into a later year again (uprated, for the three amounts), fails 2 cases each. A formula that returns 0 instead of −1 fails 6 cases for gross business income, 4 for gross farm income and 8 for line 43; one that returnsDISABLEDorNOT_DISABLEDinstead ofUNSPECIFIED, run againstid_retirement_benefits_deduction_disabled.yamlalone, fails 9 and 4 of its 17 cases. (An enum's zero is its first member,UNSPECIFIED, so a zero formula there is the formula itself.) In the employment test, dropping theemployedgate fails 1 case, applying the standard deduction to a 2025 separate return 1, measuring a joint return on the couple's combined income 10, and a strict 2026 comparison 4. This run doesn't cover Form 2441 line 14 or the supplied line 26, which #11222 adds.Local runs at 2b058657cd, one test file per process:
business_gross_income.yaml,farm_gross_income.yamlandforeign_earned_income_exclusion_gross_person.yaml: 139 cases pass (employment 39, deduction 21, classification 17, military eligibility 13, relevant income 7, (1)(a) eligibility 5, survivor income 5; business 9, farm 9, line 43 14).test_grid1.08 s,test_drawn_units0.76 s on macOS).test_military_retirement_readers.py(4),test_input_variable_definitions.py(5),test_source_conflicts.py(251),test_reference_urls.py(32),test_no_concatenated_reference_urls.py(48) andtest_known_dead_reference_urls.py(40) pass.ruff format --checkandruff checkpass on the changed Python files.tests/policy/baseline/gov/states/id) in one run, 564 cases pass (the later edits there changed only comments), and the wholetests/code_healthfolder, 730 passed and 1 skipped. The 30 YAML files outside the Idaho folder that setstate_code: ID(575 cases at e4d0ecf57f) weren't rerun here.Before and after
Idaho income tax for 2025, on main at 6151323 and at 2b058657cd (a negative amount means the grocery credit refund exceeds the tax):
The first now pays tax on all of the pay: $30,000 less the $15,750 standard deduction leaves $14,250, taxed at 5.3% above $4,811 ($500), plus the $10 permanent building fund tax, less the $155 grocery credit. The second deducts $48,216, the 2025 cap.
Not changed
id_retirement_benefits_deductionsubtracts onlysocial_security_retirement, for the (1)(a) benefits before this PR and now for military benefits too. A 2025 single filer aged 66 with $40,000 of military retired pay and $20,000 ofrailroad_benefitsdeducts $40,000 here, against $28,216 under the statute. That gap predates this PR, and Idaho retirement benefits deduction: subtract Railroad Retirement benefits from the cap (Idaho Code 63-3022A(3)) #10814 tracks the fix.tax_unit_is_required_to_filestill counts business and farm income net of expenses and can't credit a section 911 exclusion to one spouse. Without Form 2555 leaves, it adds back the legacyforeign_earned_income_exclusion, which can include the line 50 housing deduction, and it ignores an enteredforeign_earned_income_exclusion_gross; the Idaho line 43 does neither. The new inputs feed only the Idaho test.taxable_dependent_care_benefitsdoesn't take Form 2441 line 14 (benefits "forfeited or carried forward" to the next year), so a forfeited amount can count as taxable and reach the Idaho test. Subtract Form 2441 line 14 forfeitures from employer dependent care benefits, and take a supplied line 26 #11222 adds line 14 as a person input with the form's meaning,dependent_care_employer_benefits_forfeited_or_carried_forward, which the federal and California exclusions andtaxable_dependent_care_benefitsread, so amounts entered there stop counting. It also adds an optional supplied line 26 for each person,taxable_dependent_care_benefits_reported(default -1, not supplied; an amount of zero or more is used as entered, zero included), for returns the model doesn't compute: grace-period carryovers used (line 13, which stays unmodeled, as on main), a plan maximum below the statutory cap and the 2021 and 2022 relief rules. The supplied amount changes only taxable benefits (Form 1040 line 1e) and their readers, the Idaho test among them throughtaxable_dependent_care_benefits; the exclusion (line 25) and the credit stay computed, though the credit's rate follows AGI, which includes the supplied amount. Once Subtract Form 2441 line 14 forfeitures from employer dependent care benefits, and take a supplied line 26 #11222 merges, this PR merges main again and adds round 3's Idaho case (head of household, $23,000 of box 1 wages and $6,000 in box 10, $1,000 of it forfeited, with $5,000 of qualified expenses: line 26 is $0, so the employment test fails) and cases with a supplied line 26 (with $5,000 of benefits, $5,000 of qualified expenses and a plan that allows $4,000, the model computes line 26 as $0 and a supplied $1,000 lifts $23,000 of wages over $23,625; a supplied zero keeps $1,000 of benefits without reported qualified expenses from counting). Subtract Form 2441 line 14 forfeitures from employer dependent care benefits, and take a supplied line 26 #11222 asks the reviewer to rule whether line 14 and the supplied line 26 close round 3's forfeiture and carryover finding; the last review round of this PR waits for that ruling and these cases.id_retirement_benefits_deduction.yaml, so whichever merges second keeps both sets there; no case here asserts a 2026 deduction above zero, so none depends on the 2026 cap.axiom: TheAxiomFoundation/rulespec-us#2077 queued
🤖 Generated with Claude Code