Skip to content

Apply Idaho's 2025 eligibility tests and cap to military retired pay, and its disability definition to the retirement benefits deduction - #10715

Draft
MaxGhenis wants to merge 9 commits into
mainfrom
fix-id-military-retirement-deduction
Draft

MaxGhenis wants to merge 9 commits into
mainfrom
fix-id-military-retirement-deduction

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Idaho Code 63-3022A(1) lets an individual deduct "an amount specified by subsection (2) of this section of the following retirement benefits". From 2025, (1)(b) lists "Retirement benefits paid by the United States of America to a retired member of the military services of the United States, or the unremarried widow or widower of such member, who:
    (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."
  • 63-3022A(4), which applies to the whole section and so also to the "classified as disabled" test of (1)(a), says "the word "disabled" shall mean an individual who is a disabled person described in section 63-701, Idaho Code, or an individual who qualifies as a person with a "permanent disability" under section 49-117(7)(b)(iv), Idaho Code." 63-701(1)(d) covers "A disabled person who is recognized as disabled by the social security administration pursuant to title 42 of the United States Code", the Railroad Retirement Board or "the office of management and budget pursuant to title 5" (or, failing those, a public employee retirement or disability plan), and (1)(e) a disabled veteran of any war with a VA service-connected disability "of a degree of ten percent (10%) or more" or a pension for nonservice-connected disabilities. 49-117(7)(b)(iv) covers a person whose physician certifies a mobility disability with "no expectation for a fundamental or marked change". Form 39R lists the same groups, without the public employee plan, in 2024 and 2025. Before 2025 the definition was 63-3022A(d).
  • (2) caps the deduction at the maximum Social Security benefit ($48,216 single and $72,324 joint for 2025; nothing for a married taxpayer filing separately, (2)(e)). (3) reduces the cap by "such federal railroad retirement act and federal social security act retirement benefits received by either the taxpayer or the taxpayer's spouse", and limits the deduction to the qualifying benefits included in gross income.
  • 2025 House Bill 40, section 2, moved military benefits out of the age test of (1)(a) (age 65, or 62 and disabled) and added the disability, age-62 and employment tests. House Bill 479, section 1, restated them as (1)(b)(i)-(iii). Both apply retroactively to January 1, 2025 (H0040 section 5, file page 8; H0479 section 9, file page 17).
  • The 2025 Form 39R instructions put military benefits on line 8 with the other qualifying benefits: line 8a gives the cap, lines 8b and 8c subtract Railroad Retirement and Social Security benefits, line 8e takes qualifying benefits, and line 8f takes the smaller of 8d and 8e. For retired service members, line 8e requires "Classified as disabled (any age)", "Age 62 or older", or "Under age 62, employed during the year, and received sufficient income from such employment to be required to file a federal return."
  • 26 U.S.C. 6012: for 2018 to 2025, (f) provides that "subsection (a)(1) shall not apply" and requires a return when gross income exceeds the standard deduction. From 2026, (a)(1)(A) and (B) require one when gross income reaches the basic standard deduction plus the additions for age. (c) computes gross income for this section "without regard to the exclusion provided for in section 911".
  • Gross income for the filing requirement: Chart A of the 2025 Form 1040 instructions says "Gross income from a business means, for example, the amount on Schedule C, line 7, or Schedule F, line 9", before business expenses. Section 129 excludes employer dependent care benefits only as dependent care assistance, which subsection (e)(1) ties to qualified expenses, only up to earned income (subsection (b)) and only up to a dollar limit, and (a)(2)(B) includes any excess over that limit in gross income. The benefits it doesn't exclude are taxable on Form 2441 line 26 (Form 1040 line 1e). PolicyEngine-US's irs_employment_income leaves out all such benefits, and taxable_dependent_care_benefits holds the taxable part: the W-2 box 10 benefits less the excluded amount (line 25), which the line 16 qualified expenses limit.
  • IDAPA 35.01.01.130.02, dated 4-6-23, says an unremarried widow or widower of a retired member of the military services "who is sixty-five (65) or older, or sixty-two (62) and disabled, is eligible for the deduction, even though the deceased spouse was not eligible at the time of death".

Change

  • Military retirement benefits (id_eligible_military_retirement_income, which keeps its unremarried-survivor rule and moves to deductions/retirement_benefits/) count in id_retirement_benefits_deduction_relevant_income when the new id_retirement_benefits_deduction_military_eligible_person holds, so they share the cap and the offset in id_retirement_benefits_deduction. That variable subtracts the head's and spouse's social_security_retirement from the cap, as it already did for the (1)(a) benefits.
  • id_retirement_benefits_deduction_military_eligible_person: head or spouse, and age at least military.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 in id_retirement_benefits_deduction_eligible_person now read it in place of is_disabled, in every year from 2021. A supplied id_retirement_benefits_disability_classification decides: a new classification a caller can supply, which takes DISABLED, NOT_DISABLED or, by default, UNSPECIFIED, meaning not supplied. When it is UNSPECIFIED, the model classifies the person as disabled if they receive Social Security disability insurance benefits (social_security_disability, an SSA finding of disability) or have is_disabled. As before, is_disabled stands 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 from is_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. Supply DISABLED for 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 without is_disabled to the (1)(a) test and, before 2025, to the military age test. Nobody loses eligibility unless their own classification is supplied as NOT_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 from section_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 federal taxable_dependent_care_benefits. Since Correct historical federal taxes and add annual 2017–2026 tests #10854 the federal exclusion takes Form 2441 line 16 from dependent_care_assistance_qualified_expenses and 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_reported and farm_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 to UNSPECIFIED, 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 on auto_carry_over_input_variables and 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_disabled and 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 calculated business_gross_income, farm_gross_income and foreign_earned_income_exclusion_gross_person fall back for that person alone. The business and farm fallbacks take the net profits (self_employment_income plus sstb_self_employment_income, and farm_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 legacy foreign_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 as foreign_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), so Simulation.to_input_dict() and to_input_dataframe() leave out supplied values unless called with include_computed_variables=True, true_input_variables lists 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 as year: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 with set_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_file now reads its thresholds from it too, so a change to the federal thresholds reaches the Idaho test. Its results don't change.
  • income_sources.yaml now 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 without is_disabled, or whose supplied classification is DISABLED, 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. Where is_disabled alone decides the classification, pre-2025 results don't change.
  • Removed id_military_retirement_deduction, its subtractions.military_retirement.applies parameter and the 2025 entry of subtractions.yaml that 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.yaml records each reading as a candidate for the shared register, and a YAML case pins each one:

  1. The 2025 test (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), as tax_unit_is_required_to_file does; source_conflicts/candidates.yaml already records that federal conflict as the open candidate us:filing-chart-a-blindness-and-equality, and this PR's candidate cites both IRS sources.
  2. Self-employment (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. Removing business_gross_income and farm_gross_income from income_sources.yaml gives the wages-only reading, apart from excluded foreign self-employment income, which the section 911 amount still carries.
  3. Joint returns (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.
  4. Self-employment tax returns (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.
  5. Survivors (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:

  • Before 2025, military retired pay counts exactly when the recipient has reached 65, or 62 and is classified as disabled.
  • From 2025, military retired pay counts exactly when the recipient, a head or spouse, is classified as disabled, has reached 62, or meets the employment test.
  • On a return whose only gross income comes from one person's wages or business profit, with no business_gross_income_reported, the employment test holds exactly when tax_unit_is_required_to_file does 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.
  • More military retired pay never lowers the deduction and never raises it by more than the added pay; for a recipient who fails the tests it leaves the deduction unchanged.

tests/core/test_id_military_retirement_deduction_invariants.py checks all five (it sets the disability classification through is_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_grid took 2.51 s and test_drawn_units 1.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's foreign_earned_income_exclusion_gross without 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 supplied NOT_DISABLED overriding is_disabled, and a dependent.
  • id_retirement_benefits_deduction_disabled.yaml (17 cases, new): SSDI and is_disabled each 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 supplied DISABLED admits the veteran, NOT_DISABLED overrides SSDI and is_disabled, UNSPECIFIED gives the default, and one spouse's NOT_DISABLED leaves 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's DISABLED supplied 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 on id_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 supplied DISABLED ($20,000 deducted). The separate-return and jobless-survivor cases assert id_subtractions of 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) and foreign_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 entered foreign_earned_income_exclusion_gross without 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 removed id_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.yaml fails 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; dropping public_pension_income from the (1)(a) list fails 2. Zeroing a whole formula fails 13 cases for business_gross_income, 10 for farm_gross_income, 14 for foreign_earned_income_exclusion_gross_person, 2 for taxable_dependent_care_benefits and 13 for id_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's foreign_earned_income_exclusion_gross and the head and filer-count tests (12 each), the box 10 benefits (2) and the exclusion (1), SSDI (7) and is_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 returns DISABLED or NOT_DISABLED instead of UNSPECIFIED, run against id_retirement_benefits_deduction_disabled.yaml alone, 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 the employed gate 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:

  • The seven files in the Idaho retirement benefits test folder, with business_gross_income.yaml, farm_gross_income.yaml and foreign_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).
  • The Idaho invariant test: 2 tests pass (test_grid 1.08 s, test_drawn_units 0.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) and test_known_dead_reference_urls.py (40) pass.
  • ruff format --check and ruff check pass on the changed Python files.
  • Earlier in this change, before the last edits to YAML comments, docstrings and the person-level test files: the whole Idaho test folder (tests/policy/baseline/gov/states/id) in one run, 564 cases pass (the later edits there changed only comments), and the whole tests/code_health folder, 730 passed and 1 skipped. The 30 YAML files outside the Idaho folder that set state_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):

Household Before After
Single, 45, $30,000 of military retired pay, no job −$145 $355
Single, 66, $80,000 of military retired pay −$145 −$76

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

  • Railroad Retirement offset. 63-3022A(3) and Form 39R line 8b also subtract Railroad Retirement Act benefits from the cap, and line 8c takes all of Form SSA-1099 box 5, disability benefits included. id_retirement_benefits_deduction subtracts only social_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 of railroad_benefits deducts $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.
  • The federal filing requirement's income measure. tax_unit_is_required_to_file still 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 legacy foreign_earned_income_exclusion, which can include the line 50 housing deduction, and it ignores an entered foreign_earned_income_exclusion_gross; the Idaho line 43 does neither. The new inputs feed only the Idaho test.
  • Dependent care forfeitures and carryovers. The federal taxable_dependent_care_benefits doesn'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 and taxable_dependent_care_benefits read, 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 through taxable_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.
  • The 2026 cap. This PR leaves it at PolicyEngine-US's uprated estimate ($49,336 single, $74,004 joint). Set Idaho's 2026 and 2027 retirement benefits deduction cap from SSA's maximum benefit #10717 sets it from SSA's 2026 maximum benefit at full retirement age ($49,824 single, $74,736 joint), as section 63-3022A(2) directs. Both PRs add cases at the end of 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

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>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

David, Idaho's statute and the Form 39R instructions leave two points open here, and I'd like your call on both:

  1. Whether business and farm profit count as "income from such employment" under 63-3022A(1)(b)(iii). The PR counts them along with wages.
  2. Whether to compare the employed spouse's own income with the joint filing threshold on a joint return ($32,200 in 2026), as the PR does.

If you can look by Tuesday afternoon, we can merge it before the Veterans Day post (PolicyEngine/policyengine-app-v2#1523).

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (aae7f98) to head (cf20dbe).
⚠️ Report is 151 commits behind head on main.

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     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DTrim99

DTrim99 commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

PR Review: Apply Idaho's 2025 eligibility tests and cap to military retired pay

Summary

The 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 id_military_retirement_deduction with that structure:

  • a per-person test in which each spouse, or the survivor, is tested on their own facts;
  • the survivor rule kept in id_eligible_military_retirement_income;
  • one cap, shared on Form 39R line 8e, less Social Security.

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:

  1. Two employment-income list entries are unpinned.
  2. The PR takes three interpretive readings without recording them as CLAUDE.md requires. Two of them are the ones the author asks about; the third, which 6012 subsection governs 2025, isn't flagged at all.
  3. Two reference titles cite several pages but give only one.
  4. The axiom line has no status word.

On the two readings the author asks about, I recommend keeping both (reasons under Should 2).

Critical (must fix)

None.

Should address

  1. Two income sources in the employment test are unpinned (parameters/.../retirement_benefits/military/employment/income_sources.yaml:14-15).

    • Deleting sstb_self_employment_income or farm_operations_income fails no test. The YAML exercises only employment_income and self_employment_income, and the Python invariant test's adult() sets only those two.
    • Under the mutation rule, each list entry needs a case.
    • Fix: add two cases to id_retirement_benefits_deduction_military_employment_eligible.yaml, for example 2026, single, age 45, with farm_operations_income: 20_000 → true, and the same with sstb_self_employment_income: 20_000 → true (20,000 ≥ 16,100).
  2. The interpretive readings aren't recorded per CONTRIBUTING.md#source-conflicts. CLAUDE.md: "Where the text and the canons ... don't settle a reading, follow the administering agency's reading. Record every such choice in the shared source-conflict register". The PR body says the statute and Form 39R line 8e (which repeats the statute's words) leave (a) and (b) below open, but the PR adds no source_conflicts/candidates.yaml entry. A third reading, (c), is taken silently. My recommendations follow; whichever readings are chosen, record them as candidates. Sources: 63-3022A(1)(b)(iii), Form 39R line 8e, and 26 USC 6012(a)(1) and (f).

    • (a) Business and farm profit as "income from such employment": keep it.
      • "Employed" in ordinary usage includes the self-employed.
      • H0040's statement of purpose speaks of veterans "who are also employed".
      • The measure the statute borrows, the 6012 gross income test, counts business and farm income.
      • A wages-only reading would deny the deduction to a veteran with the same work income from a business.
      • The Tax Commission hasn't published a contrary reading.
    • (b) Own employment income against the joint threshold on a joint return: keep it.
      • 6012 gives a married individual no threshold of their own. Under (a)(1)(A) the requirement turns on the (iv) joint exception, and for 2018-2025 on (f)(2).
      • "Sufficient income from such employment" requires the employment income itself to be enough, so the joint threshold is the closest fit.
      • A single threshold for each spouse has no footing in 6012.
      • "Any employment income when the couple must file" reads "sufficient ... from such employment" out of the statute.
      • Probe at the head: a 2026 joint return with the retiree's $20,000 of wages and the spouse's $40,000 fails the test under this reading, even though the couple must file. Record that this is a choice.
    • (c) Not flagged: which 6012 subsection governs 2025.
      • The statute requires a return "under section 6012(a)(1)". For 2018-2025, 6012(f) says "subsection (a)(1) shall not apply" and requires a return from an individual with gross income over the standard deduction. The Form 39R wording drops the section number: "required to file a federal return".
      • The PR applies (f) for 2025: more than the standard deduction, with blindness counted. Applying (a)(1)'s own thresholds instead gives at least the basic standard deduction plus the age additions, with no blindness addition.
      • The choice changes 2025 results. The PR's own cases pin a blind single filer with $17,750 of wages (fails under (f); meets the (a)(1) threshold of $15,750) and wages exactly at $15,750 (fails under (f); meets (a)(1)). A probe of a blind single filer with $16,000 of wages also fails.
      • I think (f) is the better reading: it is the federal requirement actually in force, and a literal "(a)(1)" reading would admit nobody under (iii) in 2025. Still, say so in the variable's documentation and record it.
      • The PR also correctly leaves out the section 6017 self-employment filing rule ($400 of net earnings). The statute names 6012(a)(1), and the form's broader wording could suggest otherwise, so that deserves one line in the documentation too.
  3. Reference titles cite several pages but give one (military/employment/in_effect.yaml:13-16).

    • "2025 Idaho House Bill 40, sections 2 and 5" links H0040.pdf#page=5, but section 5 (the retroactivity clause) is on file page 8.
    • "2025 Idaho House Bill 479, sections 1 and 9" links H0479.pdf#page=2, but section 9 is on file page 17.
    • CLAUDE.md: "Several cited pages: the href opens the first, and the title ends with #page ...". Fix: titles ending "... #page 5,8" and "... #page 2,17", quoted.
  4. Axiom line has no status word.

    • axiom: TheAxiomFoundation/rulespec-us#2077 isn't one of the valid forms. See the Axiom section.

Suggestions

  1. Railroad Retirement and SSDI offsets (pre-existing, now applied to military pay).
    • id_retirement_benefits_deduction.py:26 subtracts only social_security_retirement.
    • 63-3022A(3) reduces the cap by "federal railroad retirement act and federal social security act retirement benefits received by either the taxpayer or the taxpayer's spouse". Form 39R line 8b subtracts Railroad Retirement benefits (RRB-1099 box 5, RRB-1099-R box 7 less box 8), and line 8c subtracts "Box 5 of your Form SSA-1099s", which includes disability benefits.
    • Probes at the head (2025, single):
      • age 66, $40,000 of military pay and $20,000 of railroad_benefits → deduction $40,000. The statute and the form give 48,216 − 20,000 = $28,216.
      • disabled, age 50, $40,000 of military pay and $20,000 of social_security_disability → $40,000. The form gives $28,216; the statute's "retirement benefits" arguably excludes SSDI, so that one is a source-conflict candidate.
    • The diff doesn't touch this code, and before the PR, 2025 military pay was uncapped, so the PR still moves results toward the law. Worth a follow-up issue.
    • The new YAML header and the Python docstring say Railroad Retirement benefits reduce the cap, which describes the law, not the model.
  2. Test file name. id_military_retirement_benefits_deduction.yaml isn't a variable name. Its cases test id_retirement_benefits_deduction and id_retirement_benefits_deduction_relevant_income. Consider moving them into those variable-named files; Set Idaho's 2026 and 2027 retirement benefits deduction cap from SSA's maximum benefit #10717 appends to id_retirement_benefits_deduction.yaml without conflict.
  3. The filing-threshold logic is a copy of tax_unit_is_required_to_file's.
    • Any later fix to the federal thresholds would have to be repeated here. One example is a change to the 2026+ rule if section 6012(f) is found to continue past 2025.
    • The differential property in the Python test catches drift only for returns whose sole income is the retiree's wages or profit.
    • Consider a shared helper that returns the gross-income threshold for a tax unit.
  4. Python test cost (CLAUDE.md "Test design and CI cost").
    • The PR body reports no timing. CI run 42658779959 (Linux, Rest Python shard 3, group core-2) shows test_grid at 2.51 s and test_drawn_units at 1.22 s. That's cheap, and the test carries independent reference thresholds and caps, so the coverage is justified.
    • Add those figures to the PR body, and say that CI gives no peak-memory figure.
  5. Optional YAML pins. The separate-return threshold and the employed gate (needed only in 2026, where a separate filer's threshold is $0) are pinned only by the Python grid. Two YAML cases would make them visible in the ID suite, for example a 2025 SEPARATE filer with $5,000 of wages → true, and a 2026 SEPARATE filer with no wages → false.

Verified correct

  • Law. The text in the PR matches the enrolled 63-3022A on the legislature site (history: am. 2025, ch. 13 and ch. 302). Checked points:
    • (1)(b)(i)-(iii);
    • the (1)(a) age test (65, or 62 and disabled);
    • (2)(a)-(c) and (e): no deduction on a separate return;
    • the (3) single cap and gross-income limit.
    • H0040 section 2 (military text on file page 5) and section 5 (retroactive to Jan. 1, 2025, page 8); H0479 section 1 (page 2) and section 9 (retroactive, page 17).
    • 2025 Form 39R instructions, page 45: lines 8a ($48,216 / $72,324), 8b, 8c and 8e ("Classified as disabled (any age)", "Age 62 or older", "Under age 62, employed during the year, and received sufficient income from such employment to be required to file a federal return"). 2024 instructions, page 31: age 65, or 62 and disabled.
  • The Veterans Day post's summary is accurate, with four nuances:
    • the tests also apply to an unremarried survivor;
    • "worked and had to file" means income from the employment sufficient to require a federal return under 6012, not merely filing, and not Idaho's filing threshold;
    • the cap is also reduced by Railroad Retirement benefits and is shared with civil service, firefighter and police benefits;
    • a married taxpayer filing separately gets nothing.
  • Eligibility.
    • Military 62 / disabled 0 from 2025, and 65 / 62 before.
    • A head or spouse only.
    • Each person is tested on their own facts; the survivor is tested as the recipient, which matches H0040's "a person receiving such retirement benefits".
  • Cap sharing. Line 8e sums the (1)(a) benefits (with the (1)(a) age test) and the military benefits (with the (1)(b) test), and line 8f takes min(cap − Social Security, total). One cap per return, no ordering needed.
  • Pinning. Each of these fails a test if deleted:
    • in_effect, both age parameters and the disabled where;
    • head_or_spouse (the dependent aged 70);
    • the general/military split (the 40-year-old with a public pension);
    • the per-source floor (the business loss);
    • the 2025 > and 2026 >=;
    • the 2025 blindness addition and the 2026 age addition;
    • the removal of military pay from income_sources.yaml (the 2024 66-year-old would get 45,864 instead of 30,000).
    • The separate-return branch and the employed gate are pinned by the Python grid.
  • Hand checks:
    1. 2025 single, $15,750 of wages: 6012(f) needs more than $15,750 → false. $15,751 → true.
    2. 2025 blind single: 15,750 + 2,000 = 17,750; $17,750 is not more → false.
    3. 2026 single: basic $16,100 (Rev. Proc. 2025-32); $16,099 → false, $16,100 → true.
    4. 2026 joint: $32,200; $32,199 → false, $32,200 → true for the earner only.
    5. 2026 joint, spouse 66: 32,200 + 1,650 = 33,850; $33,849 → false, $33,850 → true.
    6. 2025 joint, spouse 66: 31,500 + 1,600 = 33,100; $33,100 is not more → false.
    7. 2025, age 66, $40,000 military + $20,000 public pension: min(48,216, 60,000) = $48,216.
    8. 2025, age 66, $40,000 military, $20,000 Social Security: 48,216 − 20,000 = $28,216.
    9. 2025 retired couple: 72,324 − 30,000 = 42,324 < 45,000 → $42,324.
    10. 2026, $20,000 wages and a $10,000 business loss: floor → 20,000 ≥ 16,100 → true.
    11. 2025 working 40-year-old: 50,000 > 15,750 → $30,000 deducted, and id_subtractions $30,000.
    12. The PR body's before/after table, by probe: single 45 with $30,000 → id_income_tax $355.27 (14,250 taxable; (14,250 − 4,811) × 5.3% = $500, less the $145 grocery credit). Single 66 with $80,000 → $48,216 deducted and −$75.94. That row's taxable income of 6,114 includes the $5,700 phased senior deduction and a $2,220 Medicare Part B subtraction.
  • Probes.
    • An unremarried widow aged 50 with $40,000 of wages and $25,000 of SBP → eligible, $25,000 deducted.
    • A five-person, four-household vectorized run (ID and CA, single and separate returns): the CA household gets 0; the separate filer meets the employment test but gets $0 (cap 0); the spouse with no income gets false; a disabled 30-year-old gets $10,000.
  • Entities and vectorization. Person-level formulas read tax-unit values through person.tax_unit(...). They use scalar parameter branches only, with where/&. New variables are bool and are not used as parameter keys, so the NH Add New Hampshire state supplementation for 2026 #10156 pattern doesn't apply.
  • Callers. No reader of id_military_retirement_deduction, subtractions.military_retirement.applies, the old paths, the retirement income_sources or id_retirement_benefits_deduction_relevant_income remains outside the ID retirement folder on the merged tree. Neither the partner tests nor programs.yaml reference them.
  • Removed tests. The coverage from the two removed files is retained: the survivor cases moved to id_eligible_military_retirement_income.yaml, and the dependent case to the eligible-person file.
  • Guards on the merged tree.
    • test_military_retirement_readers.py passes. The ID reader of military_retirement_pay sits under tax/, and its survivor input is read separately.
    • test_source_conflicts.py passes except test_unscannable_files_fail_closed. That is a self-test on inline strings that depends on the local Python tokenizer, and it passed in CI. test_conflict_sounding_comments_do_not_grow passes.
    • No programs.yaml entry references the removed parameter.
  • Sibling Set Idaho's 2026 and 2027 retirement benefits deduction cap from SSA's maximum benefit #10717. It changes different files. A three-way merge of main, Apply Idaho's 2025 eligibility tests and cap to military retired pay, and its disability definition to the retirement benefits deduction #10715 and Set Idaho's 2026 and 2027 retirement benefits deduction cap from SSA's maximum benefit #10717 has no conflicts. Apply Idaho's 2025 eligibility tests and cap to military retired pay, and its disability definition to the retirement benefits deduction #10715 pins no 2026 deduction amount (its YAML 2026 cases test only eligibility, and the Python test checks the cap only for 2025), so the two compose in either order. Until Set Idaho's 2026 and 2027 retirement benefits deduction cap from SSA's maximum benefit #10717 merges, 2026 military pay is capped at the uprated $49,309 rather than $49,824.
  • Changelog. Top-level fix-id-military-retirement-deduction.fixed.md and .removed.md; the types fit.

Axiom line assessment

axiom: TheAxiomFoundation/rulespec-us#2077 has no status word, so it isn't a valid form.

rulespec-us#2077 is OPEN, labelled pe-parity and names head f994b5b718. It quotes (1)(b) verbatim, gives the module gap (us-id/statutes/63-3022A), lists required outputs and test cases, and asks that the two readings be recorded.

For queued it still needs:

  • A recorded encoder blocker. "Use queued only when the signed encoder is blocked; record the blocker in the issue." The issue describes an encoding gap, not a blocker.
  • A correction or note on the offset. The issue says the cap is offset by "Social Security and Railroad Retirement" benefits, while PE-US subtracts only social_security_retirement (Suggestion 1). The oracle comparison in ask 5 would diverge on Railroad Retirement or SSDI cases.

Fix: change the line to axiom: TheAxiomFoundation/rulespec-us#2077 queued once the blocker and the offset note are in the issue. Alternatively, run the approved encoder and use <rulespec PR> encoded.

CI status

At head f994b5b718: 38 pass and 3 skipping. The skipped checks are from an earlier superseded run. Nothing pending or failed. The passing checks include Quick Feedback, all Baseline and Contrib shards, the nine Rest Python shards and Household API Partners.

Branch status

1 ahead, 40 behind main. git merge-tree --write-tree with main succeeds with no conflicts. Since the merge base, main has changed only programs.yaml (no ID entries involved) and a KNOWN_UNMARKED line for an MD file in test_source_conflicts.py. Neither touches this PR's files. It composes cleanly with #10717. No other open Idaho PR touches these files (#10278 and #10050 change other ID subtractions).

Verdict: REQUEST_CHANGES

@DTrim99 DTrim99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

MaxGhenis and others added 3 commits November 11, 2026 12:01
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>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author
  1. I added 2026 cases for $20,000 of farm profit and of specified service business profit. Dropping either entry from income_sources.yaml now fails a case.
  2. candidates.yaml records the three readings you raised plus the section 6017 one, and the variable's documentation states all four. Your joint probe ($20,000 against the spouse's $40,000) and a $5,000 business profit now have cases.
  3. The titles end #page 5,8 and #page 2,17.
  4. The line reads #2077 queued. Add data for calibration #2077 now quotes 63-3022A from the corpus, records the blocker rulespec-us holds (bulk/worklist.yaml marks the section skip-encoder-limitation, and the pinned corpus release lacks it), and notes the Railroad Retirement gap.

I took the other four suggestions and corrected the two Railroad Retirement descriptions; the offset fix itself goes to #10814. A new helper, section_6012_gross_income_thresholds, now gives tax_unit_is_required_to_file and the Idaho test the same thresholds.

@MaxGhenis
MaxGhenis requested a review from DTrim99 November 11, 2026 22:35
@DTrim99

DTrim99 commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

PR Review (round 2): Apply Idaho's 2025 eligibility tests and cap to military retired pay

Summary

All four round-1 findings are fixed at head d9664e2dea, and you took all five suggestions. I found no new critical or should-level problem in the two fix commits.

  • Pinning. The two unpinned income sources now each have a case that fails without the entry.
  • Readings. The three readings I raised, plus the section 6017 one, are in source_conflicts/candidates.yaml and in the variable's documentation, and each has a case that fails under the other reading.
  • Shared helper. section_6012_gross_income_thresholds changes no result. It has two callers, it moves the old expressions without changing them, and no parameter or variable was renamed. The federal thresholds it returns are pinned by tests this PR doesn't touch.
  • Law. I re-read Idaho Code 63-3022A and 63-3004, the 2025 Form 39R instructions (file page 45), 26 U.S.C. 6012 and 6017, and both bills. Every quote and page in the fix commits matches.

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

Finding Status Evidence
Should 1: sstb_self_employment_income and farm_operations_income unpinned Fixed id_retirement_benefits_deduction_military_employment_eligible.yaml:222-238. See mutation check 1.
Should 2: readings (a) self-employment, (b) joint threshold, (c) 6012(f) for 2025 not recorded; section 6017 not documented Fixed source_conflicts/candidates.yaml:3617-3780 holds four entries with the fields CONTRIBUTING.md step 1 requires, and adds no marker, as step 1 says. The variable states all four (id_retirement_benefits_deduction_military_employment_eligible.py:22-42). See mutation checks 2 to 5.
Should 3: titles cite two pages, give one Fixed military/employment/in_effect.yaml:13-16: titles end #page 5,8 and #page 2,17, quoted, and each href opens the first page. H0040 file page 5 has section 2's military text and page 8 has section 5 ("retroactively to January 1, 2025"). H0479 page 2 has section 1 and page 17 has section 9.
Should 4: axiom line has no status word; issue lacks a blocker Fixed See Axiom.
Suggestion 1: Railroad Retirement and disability offsets Descriptions fixed, offset deferred The YAML header (id_retirement_benefits_deduction.yaml:106-111) and the Python test docstring now say the model subtracts Social Security retirement benefits only. #10814 (open) tracks the offset. The code predates this PR and the PR doesn't touch it, so I accept the deferral.
Suggestion 2: test file name Taken All 14 cases of id_military_retirement_benefits_deduction.yaml moved unchanged: 7 to id_retirement_benefits_deduction.yaml, 7 to the new id_retirement_benefits_deduction_relevant_income.yaml.
Suggestion 3: shared threshold helper Taken policyengine_us/tools/filing_requirement.py. See "Shared helper".
Suggestion 4: Python test cost in the PR body Taken The body gives 2.51 s and 1.22 s from CI and says CI reports no peak memory.
Suggestion 5: YAML pins for the separate return and the employed gate Taken Lines 69-88 of the employment test file. See mutation check 6.

Mutation checks (each case is in id_retirement_benefits_deduction_military_employment_eligible.yaml):

  1. Income sources. "Profit from a specified service trade or business counts as income from employment." and "Farm profit counts as income from employment." (2026, single, age 45, $20,000): 20,000 ≥ 16,100 → true. Without the list entry, income from employment is $0, employed is false, and the case fails. The two inputs are separate variables from self_employment_income, so no other entry covers them.
  2. Reading (c), section 6012(f) for 2025. The 2025 cases at $15,750 (false), $15,751 (true) and the blind filer at $17,750 (false). Under the (a)(1) thresholds, 15,750 ≥ 15,750 and 17,750 ≥ 15,750 would both be true.
  3. Reading (a), self-employment. "Self-employment profit counts as income from employment." and the two cases in check 1. A wages-only list makes all three false.
  4. Reading (b), joint threshold. "2026 joint return compares the retiree's own wages with the joint threshold, whatever the spouse earns.": 20,000 < 32,200 → false, and 40,000 ≥ 32,200 → true, so [false, true]. Combined income (60,000) gives [true, true]. An unmarried threshold (16,100) also gives [true, true].
  5. Section 6017. "2025 a business profit under the section 6012 threshold does not meet the test.": 5,000 is not more than 15,750 → false. A $400 test gives true.
  6. Separate returns.
    • "2025 a married person filing separately meets the test with any wages.": the exemption amount is 0 while suspended, and 5,000 > 0 → true. Applying the standard deduction gives 5,000 > 15,750 → false.
    • "2026 a married person filing separately with no income from employment does not meet the test.": the threshold is 0 and 0 ≥ 0, so only the employed gate makes it false.

New findings

Critical

None.

Should address

None.

Suggestions

  1. Four federal backlog entries now point away from their deciding lines (source_conflicts/candidates.yaml:13399, 13434, 13494, 13797).
    • us:filing-chart-a-blindness-and-equality, us:filing-claimable-married-separate, us:filing-requirement-2026-statute-over-chart-b and us:separate-filer-zero-income-threshold list only tax_unit_is_required_to_file.py (two also list a parameter file) under pe_us.code.
    • The second fix commit moved three of the lines they describe into policyengine_us/tools/filing_requirement.py: the separate-return threshold (lines 43-47), the age-only addition (line 56), and the zero threshold for a filer without the exception (lines 58-59). The comparisons stay at tax_unit_is_required_to_file.py:89-90.
    • test_source_conflicts.py scans only variables, parameters and reforms, so it won't read a marker or a conflict-sounding comment in tools.
    • Fix: add the helper's path to pe_us.code in those four entries, and put the later # Source conflict markers on lines 89-90 of the variable.
  2. Two ruling dates precede the question (source_conflicts/candidates.yaml:3697, 3741).
    • The self-employment and joint-threshold entries say "Ruled 2026-11-08". Your comment of 2026-11-09 called both points open and asked for a call, and my review answered that day.
    • Fix: date them when the call was made (2026-11-09, or 2026-11-11 with the other two).

Verified

Law, read again for this round

  • Idaho Code 63-3022A(1)(b)(i)-(iii): the text matches the PR's quotes, including "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".
    • (2)(e): no deduction for taxpayers outside (a) to (d).
    • (3): the cap falls by "such federal railroad retirement act and federal social security act retirement benefits received by either the taxpayer or the taxpayer's spouse".
  • Idaho Code 63-3004: "the Internal Revenue Code as amended and in effect on the first day of January 2026". That code holds 6012(f) for 2025, as the first backlog entry says.
  • 2025 Form 39R instructions, file page 45:
    • Line 8a: $48,216 and $72,324.
    • Lines 8b and 8c: Railroad Retirement and Social Security.
    • Line 8e: "Classified as disabled (any age)", "Age 62 or older", "Under age 62, employed during the year, and received sufficient income from such employment to be required to file a federal return." It gives no section number.
  • 26 U.S.C. 6012:
    • (f): "In the case of a taxable year beginning after December 31, 2017, and before January 1, 2026, subsection (a)(1) shall not apply". It excuses an unmarried individual whose gross income "does not exceed the standard deduction", and a couple on combined income.
    • (a)(1)(A): excuses gross income "less than" the exemption amount plus the basic standard deduction.
    • (a)(1)(B): adds the age addition only.
    • (a)(1)(A)(iv): combines the spouses' gross income.
  • 26 U.S.C. 6017: a return for "net earnings from self-employment of $400 or more".
  • H0040 statement of purpose: the "undisabled veterans under age 62 who are also employed and earn sufficient income to owe federal income taxes" quote and the Joint Rule 18 disclaimer are both as the backlog entry gives them.

Shared helper (policyengine_us/tools/filing_requirement.py:6-60)

  • Callers. Two: tax_unit_is_required_to_file.py:86-88 and the Idaho test (id_retirement_benefits_deduction_military_employment_eligible.py:65-67). No reform redefines the federal variable, and nothing imports from its module.
  • Same expressions. The helper's two thresholds are the expressions the federal formula had before the commit, term for term:
    • the suspended-exemption amount;
    • the separate-return where;
    • standard_deduction;
    • head_spouse_count, basic_standard_deduction, bonus_guaranteed_deduction and the age count;
    • separate | separate_filer_itemizes.
    • The federal formula used the old local names only in the two comparisons, which now read the helper's results with the same > and >=.
  • No parameter or variable moved or was renamed, so no other state or federal result can change. The readers of tax_unit_is_required_to_file (tax_unit_is_filer, eitc, the state EITC helper) get the same values.
  • Idaho. The formula now evaluates both thresholds in every year, where it evaluated one before. That adds no dependency: standard_deduction already reads basic_standard_deduction and bonus_guaranteed_deduction, separate_filer_itemizes is an input, and none of them reads a state variable. The helper takes the person's tax_unit projector, as the formula did at the round-1 head.
  • Tests that pin the shared values, none changed by this PR:
    • tax_unit_is_required_to_file.yaml: the 2025 and 2026 single, joint, aged and blind thresholds a dollar apart; separate returns in both years; the 2017 exemption amounts; the separate_filer_itemizes case.
    • wftca.yaml: the bonus deduction.
    • test_filing_requirement_invariants.py: thresholds restated from published amounts.
    • The Idaho Python test also checks both variables against Chart A and Rev. Proc. 2025-32 amounts (line 325). That check stays independent now that the two share code.

Other checks

  • Moved cases, expectations unchanged:
    • min(48,216, 60,000) = 48,216;
    • 48,216 − 20,000 = 28,216;
    • 72,324 − 30,000 = 42,324;
    • separate return [0, 0];
    • widow at 50 → 0, and at 62 → 25,000;
    • id_subtractions 30,000.
  • PR body. The case counts match the files (21, 11, 7, 7 added, 5). The four readings match the backlog entries and the documentation.
  • Guards.
    • The conflict-comment count of tax_unit_is_required_to_file.py stays at 1 (the Chart B line), matching its KNOWN_UNMARKED entry. No new comment in the PR's files matches the ratchet's patterns.
    • The backlog entries have unique ids and aren't in the pinned register.
    • The Axiom corpus manifest lists the 2025 instructions packet, so the entries need no source capture.
  • Changelog. The .fixed.md and .removed.md fragments are unchanged and still fit.

Axiom

axiom: TheAxiomFoundation/rulespec-us#2077 queued is a valid form. The issue is OPEN, labelled pe-parity, and names head d9664e2dea. It has what a queued issue needs:

  • Blocker. bulk/worklist.yaml marks us-id/statute/63-3022A skip-encoder-limitation, and us-id/statutes/ has no 63-3022A module. I confirmed both in rulespec-us.
  • Law and scope. The verbatim statute with its corpus citation, the module path and six required outputs.
  • Readings. The four readings, by backlog id.
  • Offset. The note that PE-US subtracts only Social Security retirement benefits, with the Railroad Retirement case (J) left out of the oracle comparison.
  • Companion cases. Cases A to N use the same external values as the YAML tests.

CI

At head d9664e2dea: 36 checks pass, none failed or pending. They include PR validation (guard tests, lint, changelog), Quick Feedback, all Baseline and Contrib shards, the nine Rest Python shards, Microsimulation and Household API Partners.

Branch

4 ahead, 4 behind main. The merge of main in the branch had no hand-resolved conflicts.

git merge-tree --write-tree with current main succeeds. Since the merge base, main has changed one of the PR's files, source_conflicts/candidates.yaml, which merges automatically (432 entries, no duplicate id). Main changed no guard test, programs.yaml, IRS variable or tools file in that span.

The merged tree also merges cleanly with sibling #10717 (head 0551328c07).

Verdict: APPROVE

@DTrim99 DTrim99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

MaxGhenis and others added 2 commits November 21, 2026 13:37
- 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>
@MaxGhenis MaxGhenis changed the title Apply Idaho's 2025 eligibility tests and cap to military retired pay Apply Idaho's 2025 eligibility tests and cap to military retired pay, and its disability definition to the retirement benefits deduction Nov 21, 2026
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

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:

  1. Disability. A new id_retirement_benefits_deduction_disabled follows 63-3022A(4), 63-701(1)(d) and (e) and 49-117(7)(b)(iv): the person's own SSDI, a veteran fully disabled by a service-connected disability, and three stand-ins for the recognitions PolicyEngine-US has no input for (the SSI disability test and permanent and total disability for the SSA's, and is_disabled for the rest). Both the (1)(a) age-62 test and the military test read it in every year, so before 2025 a filer aged 62 to 64 who receives SSDI but has no is_disabled flag now qualifies; the pre-2025 63-3022A(d) used the same definition. is_disabled still counts, so a household that set it before this PR keeps the deduction; the variable can be set directly, for example to false.
  2. Gross business and farm income. The employment test reads gross income, as section 6012 and Chart A do, so new inputs business_gross_income (Schedule C line 7) and farm_gross_income (Schedule F line 9) feed it, defaulting to net profit floored at zero.
  3. Taxable dependent care benefits and the section 911 exclusion count as income from employment (129(a)(2)(B); 6012(c) and Form 2555 line 43, through foreign_earned_income_exclusion_gross_person).
  4. Disallowance and survivors. The separate-return and jobless-survivor cases now assert id_subtractions of zero (main gives $30,000 and $25,000), a working widow aged 50 deducts $25,000, and us-id:military-retirement-survivor-routes reads IDAPA 35.01.01.130.02's survivor rule as a sufficient condition beside the statute's tests, not an exclusive one, with captures of the rule and Form 39R.

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.

@MaxGhenis
MaxGhenis requested a review from DTrim99 November 21, 2026 15:04
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>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

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:

  1. Disability. By default id_retirement_benefits_deduction_disabled now counts only the person's own SSDI and is_disabled. The SSI disability test, permanent and total disability and is_fully_disabled_service_connected_veteran no longer count by themselves: 63-701 lists neither the SSI test nor permanent and total disability, and 63-701(1)(e) counts a VA service-connected rating only for "A disabled veteran of any war engaged in by the United States", which needs wartime service PolicyEngine-US doesn't record. In 2024 a 63-year-old with a $20,000 public pension and only one of those flags deducts nothing, as on main. A new input, id_retirement_benefits_disability_classification (DISABLED, NOT_DISABLED or the default UNSPECIFIED), replaces setting the calculated variable directly. One person's entry doesn't change anyone else's classification, except that Core, as with every input, carries an entry into a later year only when no one has an entry for that year, so the docstrings say to enter each person's classification for every year calculated.
  2. Gross business and farm income. The inputs are now business_gross_income_reported (Schedule C line 7) and farm_gross_income_reported (Schedule F line 9). Each defaults to -1, meaning not supplied, so a person without one keeps their own net profit, floored at zero, when someone else in the household enters one, and an entry of zero counts as zero.
  3. Section 911 and dependent care. For Form 2555 line 43, a supplied foreign_earned_income_exclusion_gross_person_reported comes first, zero included. Otherwise a sole filer gets the return's foreign_earned_income_exclusion_gross, as entered or from the line 36 and 42 leaves, and the legacy worksheet amount, which can include the line 50 housing deduction, never stands in: no inputs can show that it equals line 43, so a filer who knows line 43 enters it as foreign_earned_income_exclusion_gross_person_reported. Idaho counts the federal Form 2441 line 26, which since Correct historical federal taxes and add annual 2017–2026 tests #10854 needs the line 16 qualified expenses; without them, all W-2 box 10 benefits count. Subtract Form 2441 line 14 forfeitures from employer dependent care benefits, and take a supplied line 26 #11222 adds lines 13 and 14 to the federal calculation, so benefits entered as forfeited or carried forward stop counting; line 26 stays calculated from the form's lines rather than becoming a separate input. Once it merges, this PR adds round 3's case: a head of household with $23,000 of box 1 wages and $5,000 in box 10, $1,000 of it forfeited, with $4,000 of qualified expenses.
  4. Mutation claims. The PR body now reports mutations run at e4d0ecf57f against the current source list and fallback formulas.

The fourth and last round of the independent review checks these fixes once #11222 merges and that case is in.

@MaxGhenis
MaxGhenis marked this pull request as draft November 22, 2026 00:22
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 DTrim99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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 federal variables/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_disabled is not an award). But it doesn't count actual SSI receipt on the basis of disability (for example is_ssi_disabled with ssi > 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 only social_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.yaml has 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-17 and disabled.yaml:16-17 cite 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.py under code:;
    • 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.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants