Repository navigation
Leave federally excluded income out of North Dakota renter's refund income - #10697
Conversation
…ncome N.D.C.C. 57-02-08.1(5)(c) counts income from all sources but excludes "any amount excluded from income by federal or state law with the exception of income from social security benefits". nd_renters_refund_income sums market_income, which counts wages before payroll deductions and the tax-exempt parts of interest, pensions and retirement distributions in full, so $5,000 of tax-exempt interest raised the income by $5,000. nd_renters_refund_federally_excluded_income now subtracts each part of market_income that federal gross income leaves out: the pre-tax payroll deductions (401(k) and 403(b) deferrals, payroll health premiums and HSA contributions, dependent care assistance within the IRC 129 limit), tax-exempt interest, the nontaxable parts of pensions and retirement account distributions, disability benefits from a plan the recipient paid for, and alimony under an instrument executed after 2018. It replaces the separate subtractions of pre-tax premiums and excluded disability benefits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lict Property tests check that every market_income component has a stated treatment, that each excluded part lies between zero and its component, that renter's refund income equals irs_gross_income on shared sources, and that a dollar moved to its excluded form leaves income. The candidate entry records the statute against the guideline's item 10 and the application's lines 5 to 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The federal model takes four exclusions from gross income as above-the-line deductions, so market_income still holds the income they exclude: savings bond interest spent on higher education (IRC 135), employer adoption assistance (IRC 137), and income from Puerto Rico and the specified possessions (IRC 931, 933). North Dakota's renter's refund income now subtracts them from the tax unit's market income left after the person-level exclusions, never from social security. A new property test classifies every federal above-the-line deduction as a deduction or an exclusion, so a new one fails until someone classifies it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10697 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 2 +1
Lines 37 52 +15
Branches 0 3 +3
=========================================
+ Hits 37 52 +15
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:
|
|
These scripts produced the 2026 impact in the description. Each PYTHONPATH=<checkout at 5e7e8f35fa> python nd_impact.py v3_base_2026.json 2026
PYTHONPATH=<checkout at 1eef8ca2f0> python nd_impact.py v3_head_2026.json 2026
python compare_impact.py v3_base_2026.json v3_head_2026.json 5e7e8f35fa 1eef8ca2f0 compare_v3_2026.json
python gainers.py v3_base_2026.json v3_head_2026.json
|
The note on us-nd:renters-refund-federally-excluded-income said the income tax reductions in N.D.C.C. 57-38-30.3(2) lower taxable income without excluding amounts from income. The Legislative Assembly added the statute's exception for social security in House Bill 1174 (2019), the Act that created the social security reduction, so the text doesn't settle the question that flatly. A new entry, us-nd:renters-refund-state-income-tax-reductions, sets out both sides and follows the Tax Commissioner's reading, which counts military pensions and net gains. A YAML case pins the result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
#10725 counts |
#10725 added the refund to household and SPM benefits, so the income changes in this pull request now reach both net incomes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Heads-up from #10727 (strike benefits in federal gross income). Whichever of the two PRs merges second should reconcile these:
|
…wer the 1eef8ca reviews - nd_renters_refund_income: savings bond interest (IRC 135) now comes out of the tax unit's taxable interest and adoption assistance (IRC 137) out of its wages after payroll deductions, so a loss elsewhere in the unit no longer keeps either in. Puerto Rico and possession income still come out of the market income left. None comes out of social security. - YAML: loss cases for both, a specified possession income case, and the state law case now sets military_retirement_pay, which North Dakota's reduction reads, with the three reductions as outputs. - Property tests: every run moves a nonzero amount of all seven sources, with a business loss; the bounds test checks each part alone, draws losses and the tax unit exclusions, and checks that social security counts in full. - Citations: Roth 401(k) and 403(b) distributions sit in retirement distributions (402A(d)(1), 403(b)(8)); labels for repealed deductions. - Register: the federal entry answers the "other retirement benefits" text and states what "excluded" means; the state-law entry sets out the 2019 record on both sides. Changelog no longer says "every". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… losses Answers the df1ba6f review. - IRC 931 reaches only a possession with an implementing agreement in effect, and only American Samoa has one (26 CFR 1.931-1(c)). The parameter comment, the register and the tests now say so. - Puerto Rico and American Samoa income can sit in any market income component, so it now comes out of market income before losses (a new parameter, market_income_components, lists the components), less the other exclusions. A rental or self-employment loss no longer keeps it in. - Savings bond interest comes out of the interest North Dakota counts (interest_income less tax_exempt_interest_income), so a household that reports interest only as a total still gets the exclusion. - New YAML cases pin each cap; the bounds test checks that, with no loss in income, renter's refund income never falls below social security. - The state-law register entry cites the Senate hearing minutes, N.D.C.C. 57-38-04 and Letter Opinion 2008-L-12, and quotes the sponsor's full exchange. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssion 26 CFR 1.931-1(c)(1) limits IRC 931 to a possession with an implementing agreement in effect but names none; IRS Publication 570 applies section 931 only to American Samoa. The register, the parameter and the test comment now cite each source for what it says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shift test now also marks a dollar of income as employer adoption assistance, Puerto Rico income or American Samoa income beside a business loss, and expects renter's refund income to fall by that dollar. A formula that takes Puerto Rico and American Samoa income out of net market income fails it. Invariant 2's lower bound now names the condition it needs (no loss and no medical costs), and the TANF input in the rental-loss case says why it is there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A YAML case puts $10,000 of Puerto Rico income beside only social security and expects income to stay at $20,000, as the American Samoa case does. The shift test gains an explicit example with $1,000 of wages, so its adoption assistance line moves a dollar on every run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…042 do The register note now says, as us-nd:renters-refund-federally-excluded-income and TheAxiomFoundation/rulespec-us#2042 do, that the exclusion removes what a statute or regulation leaves out of income, including by repealing the provision that counted it, and not a doctrine with no statutory basis such as the general welfare exclusion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged by admin at 524e04d, the head the last review read.
🤖 Generated with Claude Code |
…042 do The register note now says, as us-nd:renters-refund-federally-excluded-income and TheAxiomFoundation/rulespec-us#2042 do, that the exclusion removes what a statute or regulation leaves out of income, including by repealing the provision that counted it, and not a doctrine with no statutory basis such as the general welfare exclusion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efund income #10697 merged first, so this PR reconciles the two. N.D.C.C. 57-02-08.1(5)(c) leaves out "any amount excluded from income by federal or state law", and IRC 102(a) excludes the strike benefits a union pays as a gift (Pub. 525). nd_renters_refund_federally_excluded_income now subtracts strike_benefits_excluded_from_gross_income, capped at the benefits received, so renter's refund income holds the part federal gross income holds under current law and under source reforms. The ND invariant test moves strike_benefits from the components gross income omits to the partly excluded ones and draws strike benefits with a gift part; the source-reform test adds North Dakota; ND YAML cases cover the gift part and a gift input above the benefits received. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follows #10663. North Dakota counts a renter's income "from all sources" for its renter's refund but excludes "any amount excluded from income by federal or state law with the exception of income from social security benefits" (N.D.C.C. 57-02-08.1(5)(c)). On main,
nd_renters_refund_incomesumsmarket_income, which counts wages before payroll deductions and the tax-exempt parts of interest, pensions, retirement distributions and alimony in full. So $5,000 of municipal bond interest raises a renter's income by $5,000. Of the parts federal law excludes, main subtracts only pre-tax health premiums and, since #10663, disability benefits from a plan the recipient paid for.What changes
nd_renters_refund_incomenow subtracts the parts ofmarket_incomethat federal law leaves out of gross income, in two pieces, and floors the result at zero as before.nd_renters_refund_federally_excluded_income(new, person) adds up the excluded part of each of a person'smarket_incomecomponents. It takes each part at zero or more and at most the component it comes from, so an input that reports only a component's total keeps all of it as income.employment_incomepre_tax_contributions: traditional 401(k) and 403(b) deferrals, pre-tax health premiums, HSA payroll contributions, and dependent care assistance up to the IRC 129 limit (employment_incomelessirs_employment_incomeandtaxable_dependent_care_benefits)interest_incometax_exempt_interest_incomepension_incometax_exempt_pension_incomeretirement_distributionstax_exempt_retirement_distributions(IRA, 401(k), 403(b) and SEP)disability_benefitstax_exempt_disability_benefitsalimony_incomealimony_incomelesstaxable_alimony_income)gov.states.nd.tax.property.renters_refund.excluded_deductions(new parameter) lists four federal exclusions that the federal model takes as above-the-line deductions, somarket_incomestill holds the income they exclude: savings bond interest spent on higher education (us_bonds_for_higher_ed, IRC 135(a)), employer adoption assistance (qualified_adoption_assistance_expense, IRC 137(a)), and income from Puerto Rico and American Samoa (puerto_rico_incomeandspecified_possession_income, IRC 933 and 931(a)). IRC 931 reaches only a possession with an implementing agreement in effect (26 CFR 1.931-1(c)(1)), and IRS Publication 570 applies it only to American Samoa.nd_renters_refund_incometakes each of the four out of the tax unit's income that holds it, so a loss elsewhere in the unit keeps none of them in, and none comes out of social security. Households may record savings bond interest and adoption assistance on a dependent (gov.irs.ald.filer_amounts_recorded_on_dependents), so the formula takes the first out of the unit's interest that North Dakota counts and the second out of the unit's wages after payroll deductions. Puerto Rico and American Samoa income enter as tax unit inputs that can sit in any component, so the formula takes them out of the unit's market income before losses, less the other exclusions. A second new parameter,market_income_components, lists the components it counts at zero or more for that step.These replace main's separate subtractions of pre-tax premiums and excluded disability benefits, which the person-level variable now covers. Main subtracted pre-tax premiums in full, and the payroll part can't exceed wages, so premiums reported above wages no longer lower income. No North Dakota record in the dataset reports pre-tax premiums.
What stays in, and why
veterans_benefits.foreign_earned_income_exclusiondocuments that "Other income inputs are the amounts left after the exclusion", so nothing comes out for them.strike_benefits, but IRS Publication 525 counts strike benefits as income unless the union meant them as gifts.gi_cash_assistance) counts as a gift, which IRC 102 excludes, or as public assistance, which North Dakota counts, depending on who pays it, and the input doesn't record the payer.Readings
PolicyEngine logs these readings in
source_conflicts/candidates.yamlasus-nd:renters-refund-federally-excluded-incomeandus-nd:renters-refund-state-income-tax-reductions.us-nd:renters-refund-insurance-proceeds(Count every taxed cash source in SPM market income #10663). The definition also counts "social security, or other retirement benefits", but the exception names only social security, so the exclusion reaches the parts of other retirement benefits that federal law leaves out.Invariants
Each holds for every input.
policyengine_us/tests/test_nd_renters_refund_income_exclusions.pytests invariant 1 against the source lists and invariants 2 to 4 with Hypothesis over random households.market_incomecomponent in full, subtracts the part federal law excludes, or counts it although the federal model's gross income leaves it out (with the reason). The test also sorts each above-the-line deduction in the federal model into a deduction, which leaves its income in, or an exclusion, which North Dakota subtracts. A new component or deduction fails the test until someone classifies it, so a widermarket_incomecan't bring excluded income back, as Count every taxed cash source in SPM market income #10663's did. The test also holdsmarket_income_componentstomarket_income's list.market_incomeand federal gross income share, renter's refund income equalsirs_gross_incomeless the deducted exclusions. For wages and alimony both sides read the same federal variables, so the YAML cases, invariant 4 and a test of alimony by divorce year check those against the law.These tests use Python because they draw random amounts over many households at once and read lists from the source files, while YAML pins one household per case. The file lands in the
remainingRest group.Against main at 5e7e8f3, six of the seven tests fail. The differential test gets $74,000 on its explicit example, where the statute gives $39,000. In the dollar-for-dollar test, moving $2,000 of taxable interest to tax-exempt interest leaves income unchanged. Alimony under a 2019 or 2024 instrument counts in full ($22,000, where the statute gives $10,000). The two classification tests stop because main has no list of market income components or of deducted exclusions, and the bounds test because main has no excluded-income variable. A formula that takes the four deducted exclusions out of the tax unit's net market income fails the dollar-for-dollar test: beside a $3,000 business loss, marking $2,000 of taxable interest as savings bond interest spent on higher education leaves income unchanged. A formula that takes only Puerto Rico and American Samoa income out of net market income fails it too, on $2,000 of Puerto Rico income beside the same loss, and fails the two YAML cases that put a loss beside that income.
The PR adds 22 YAML cases to
nd_renters_refund_income.yamland 5 tond_renters_refund_federally_excluded_income.yaml, with expected values from the statute and the IRC sections each case cites.2026 impact
We ran the microsimulation once at main (5e7e8f3) and once on this PR merged with that main (1eef8ca), each on the default dataset, Populace US 2024 (
populace-us-2024-spm-20260909), for 2026. A comment below holds the scripts that ran and compared them. In the model, the PR's later commits change only how the four exclusions the model deducts above the line come out, and no record in the dataset holds any of them. North Dakota refunds part of the rent of renters aged 65 or over or permanently and totally disabled whose income is $70,000 or less, when 20% of their rent exceeds 4% of their income. The model applies the age and disability test to a tax unit's head or spouse, and we estimate 26,243 such tax units in the state (69 sample records).Checks run locally
These ran on a local merge of the head, 524e04d, with main at 75aee22, on macOS with Python 3.14.
ruff format --checkandruff checkon the changed Python files: clean.policyengine_us/tests/test_nd_renters_refund_income_exclusions.py: 7 passed.policyengine-core test policyengine_us/tests/policy/baseline/gov/states/nd: 476 passed.policyengine_us/tests/code_health/test_source_conflicts.py: 103 passed, andtest_known_dead_reference_urls.py, which also readssource_conflicts/: 40 passed.policyengine_us/tests/code_health: 533 passed, 1 skipped.policyengine_us/tests/test_household_spm_resource_parity.py: 67 passed, andtest_cash_income_never_lowers_spm_net_incomefailed on a Connecticut draw. There, $1 of partnership income takes a single filer's Connecticut AGI from $500,000 to $500,001. Connecticut's high-tax recapture adds $50 for each $5,000 of AGI above $500,000, or part of $5,000, so that first dollar adds a full $50 and lowers SPM net income by $49.41. Main at 75aee22 gives the same numbers.Follow-ups
nd_renters_refund_income.yamlkeeps $6,000 of SSI out, though the statute counts "any county, state, or federal public assistance benefits".debt_relief,salt_refund_incomeandtaxable_roth_conversions, whichmarket_incomedoesn't hold, so renter's refund income leaves them out although the statute counts income "from all sources".us_bonds_for_higher_edandqualified_adoption_assistance_expensein full, without the limits and income phase-outs of IRC 135(b) and 137(b), andnd_renters_refund_incomesubtracts the same full amounts (Savings bond (26 USC 135) and employer adoption assistance (26 USC 137) exclusions are deducted as supplied, with no cap or phase-out #10523).specified_possession_incomecarries the label "Income from Guam, American Samoa, or the Northern Mariana Islands", though IRC 931 reaches only American Samoa.qualified_adoption_assistance_expensecarries the label "Qualified adoption expense". The federal model deducts it as employer adoption assistance (IRC 137(a)), andnd_renters_refund_incomesubtracts it the same way, while the Ohio adoption credit and the Arizona subtraction read it as a family's own adoption expenses.axiom: TheAxiomFoundation/rulespec-us#2042 queued (North Dakota's income definition)
🤖 Generated with Claude Code