Repository navigation
Limit Kansas itemized deductions to the four K.S.A. 79-32,120(a) categories at each year's shares - #10095
Conversation
…gories Kansas allows charitable contributions (100%), medical care, qualified residence interest and real and personal property taxes (50% in 2015-2017 without medical, 50% in 2018, 75% in 2019, 100% from 2020). Main summed every federal non-SALT itemized deduction, including investment interest, casualty losses, pre-2018 miscellaneous deductions and the 2020-2021 non-itemizer charitable deduction, at 100% in all years. Before 2021, (a)(1)(A) lets only federal itemizers itemize in Kansas. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Picking this up for the US hub. I'll post a hand-off comment here when it's ready. Generated by Claude Code |
Bring the branch up to date with main before review; the merge was clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fmi4DmuA9GyXnRKdV
This PR replaces the comment that quoted the 2021 K-40 instructions, so the file no longer has a conflict-sounding comment and the ratchet in test_source_conflicts.py requires its line to go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fmi4DmuA9GyXnRKdV
|
Picking this up for the US hub, continuing an earlier session's work on this PR (that session pushed nothing). I'll post a hand-off comment here when it's ready. Generated by Claude Code |
|
Ready for hub review Head: This continues an earlier session that pushed nothing to this PR. The commit from 2026-10-11 is kept unchanged; this session added a clean merge of Blocker: primary sources not re-readThis session's network policy refused The brief also asks how the statute changed from 2013. I couldn't read it, and the parameters start in 2015. The federal model raises Items
Hand computations
Tests run (merged head)
Mutants
CIDraft, so Pull request CI skips it; it has not run at this head. Judgment calls
Proposed follow-up
Generated by Claude Code |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10095 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 2 +1
Lines 37 35 -2
Branches 0 1 +1
=========================================
- Hits 37 35 -2
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:
|
|
Hub review in progress This interim note is superseded by the final review: #10095 (comment) Generated by Claude Code |
|
Ready for hub review The PR's head has not moved past FindingsP1. Qualified residence interest leaves out mortgage insurance premiums
The PR body also states this wrongly: "Qualified residence interest is P2. A direct
|
| Case | Statute | Main | PR | PR + fix |
|---|---|---|---|---|
| 2019, $8,000 interest + $1,000 premiums, wages $40,000 | 0.75 × 9,000 = 6,750 | 9,000 | 6,000 | 6,750 |
| 2021, $1,000 premiums | 1,000 | 1,000 | 0 | 1,000 |
| 2026, $8,000 interest + $1,000 premiums | 9,000 | 9,000 | 8,000 | 9,000 |
2025, deductible_mortgage_interest: 9_000 input |
9,000 | 9,000 | 0 | 9,000 |
(The values are ks_itemized_deductions. Main gives 9,000 in 2019 because it applies 100%, which is the defect this PR fixes.)
Fix: replace lines 26–28 with:
# 26 U.S.C. 163(h)(3)(E) treats deductible mortgage insurance premiums
# as qualified residence interest.
qualified_residence_interest = add(
tax_unit,
period,
["deductible_mortgage_interest", "deductible_mortgage_insurance_premiums"],
)nc_mortgage_and_property_tax_before_limitation.py reads the same two variables. With this change on a scratch copy of the head:
ks_itemized_deductions.yaml: 7 passed.ks_taxable_income.yaml: 6 passed.ks_2025_integration.yaml: 13 passed.ks_integration.yaml: 2 passed.- The four probe cases above: 4 passed.
Cases 1 and 2 still pass with their deductible_mortgage_interest_tax_unit: 9 input, because the person-level variable derives from it.
Add these cases to ks_itemized_deductions.yaml (I hand-computed each from (a)(4) and (a)(5) and 163(h)(3)(E); the 2019 case's wages keep AGI under the $100,000 premium phase-out start):
# K.S.A. 79-32,120(a)(4) counts qualified residence interest under section
# 163(h), and 163(h)(3)(E) treats mortgage insurance premiums as such interest
# (2019 Schedule S, line C4).
- name: Case 8, 2019 mortgage insurance premiums count at the 75% share.
period: 2019
input:
state_code: KS
employment_income: 40_000
home_mortgage_interest: 8_000
mortgage_insurance_premiums: 1_000
output:
# 0.75 * (8,000 + 1,000)
ks_itemized_deductions: 6_750
- name: Case 9, 2025 a direct deductible mortgage interest input counts.
period: 2025
input:
state_code: KS
deductible_mortgage_interest: 9_000
output:
ks_itemized_deductions: 9_000Then change the body sentence to: "Qualified residence interest is federal deductible mortgage interest and points (deductible_mortgage_interest) plus deductible mortgage insurance premiums, which 26 U.S.C. 163(h)(3)(E) treats as qualified residence interest. Investment interest, the rest of interest_deduction, does not count."
P3. The parameter reference title says "lines C3"
policyengine_us/parameters/gov/states/ks/tax/income/deductions/itemized/rate/qualified_residence_interest.yaml:14: 2017 Form K-40 instructions, Schedule S Part C, lines C3 should read line C3. I could not open the 2017 booklet to confirm the line numbers in this file or the other rate files.
P3. The body leaves out (b) and has no quotes
The adopting session removed the statute quotes. From the hub's reading, the body can carry these, each under 25 words:
- (a)(1)(A): "For all tax years prior to tax year 2021, if federal taxable income of an individual is determined by itemizing deductions ..."
- (a)(1)(B): "regardless of whether or not such individual's federal taxable income is determined by itemizing deductions"
- (a)(2): "(B) 50% of the amount of qualified residence interest as provided in section 163(h)"
- (a)(2): "(C) 50% of the amount of taxes on real and personal property as provided in section 164(a)"
- 2019 Schedule S line C2: "Real estate taxes from line 5b of federal Schedule A"
Add this sentence: "K.S.A. 79-32,120(b) reduces the total by income taxes deducted federally and by depreciation claimed for certain credits. None of the four categories includes income taxes, and the model has no input for that depreciation, so (b) changes nothing here."
The hand-off's "Draft, so Pull request CI skips it" is out of date. The PR is not a draft, and the Pull request run at this head concluded success, with every job passing (none were cancelled or skipped).
Overlap with #10038 and #10070
Both PRs conflict with this one at the same places in ks_itemized_deductions.py: the reference tuple (this PR's lines 10–14) and the return (this PR's lines 30–35). I confirmed this from their diffs. If this PR lands first, the second PR to land must make these changes:
- Count gambling winnings in federal gross income and fix the wagering losses deduction #10070: drop its
ks_itemized_deductions.pyedit (thewagering_losses_deductionsubtraction and its reference line) and keep its YAML cases. The closed list never reads wagering losses, so its expected 0 and 3,000 still hold. I worked that out from the formula; I did not run its cases, because they need Count gambling winnings in federal gross income and fix the wagering losses deduction #10070's federal changes. - Model the claim of right repayment deduction and credit (26 U.S.C. 1341) and North Carolina's rules that depend on it #10038: drop its formula edit and reference line. In its new case, change
interest_deduction: 9_000tohome_mortgage_interest: 9_000. That input feeds bothinterest_deduction(so itsitemized_deductions_less_salt: 14_000still holds) and this PR's qualified residence interest, with or without the fix above. Its expectedks_itemized_deductions: 12_000then holds. I did not run this, for the same reason.
The open-PR search for ks_itemized_deductions, ks_taxable_income and "kansas itemized" found no other overlap.
Mutants
I ran each mutant in its own process on a scratch worktree, then restored it and confirmed git status was clean.
| Mutant | Killed by |
|---|---|
| Medical share 1 from 2015 (hand-off) | itemized Case 6, 2017 |
federal_itemization_required false from 2015 (hand-off) |
taxable Case 4, 2019 non-itemizer |
| 2018 medical share 0.75 | itemized Case 5, 2018 |
| Federal itemizing gate still applied in 2021 (false moved to 2022) | taxable Case 6, 2021, and taxable unit test 2 |
| Mine: qualified residence interest steps to 75% in 2018 | itemized Case 5, 2018 |
None survived. P1 survives the existing suite, since no case enters mortgage insurance premiums. Case 8 above kills it.
Checked and sound
-
Defect reproduced. I restored main's two formulas over the head and ran the PR's tests. 4 of 7 itemized cases failed (Cases 3, 4, 5, 6) and 1 of 6 taxable cases failed (Case 4), matching the body. Itemized Case 7 passes on main too.
-
Share table. Against the hub's reading of (a)(2)–(a)(5), year by year:
- charity is 100% from 2015;
- medical is 0 in 2015–2017, 50% in 2018, 75% in 2019 and 100% from 2020;
- qualified residence interest and property taxes are 50% in 2015–2018, 75% in 2019 and 100% from 2020.
Every parameter date and value matches.
-
Hand values. I computed each before reading the tests:
- 2017: 1,000 + 0.5 × (8,000 + 4,000) = 7,000;
- 2018: 1,000 + 0.5 × 14,000 = 8,000;
- 2019: 1,000 + 0.75 × 14,000 = 11,500;
- 2025: 3,000 + 2,000 + 9,000 + 5,000 = 19,000.
The tests carry the same values. In full-household runs, a single filer with $2,000 charity, $14,000 mortgage interest and $9,000 real estate taxes gets 13,500 in 2018 (2,000 + 0.5 × 23,000) and 19,250 in 2019 (2,000 + 0.75 × 23,000). Single and joint filers both run, with no cycle through
tax_unit_itemizesin 2018–2021. -
The itemizing gate.
ks_taxable_income.py:23-26appliestax_unit_itemizesonly whilefederal_itemization_requiredis true, which is 2015–2020. That matches (a)(1)(A) and (B). The filer takes the larger deduction only when allowed.tax_unit_itemizescompares federalincome_taxonly, as 35 other state formulas already rely on. -
The SALT cap. "As provided in section 164(a)" names the deductible taxes. The cap sits in 164(b)(6), and line C2 takes line 5b, before line 5e's cap. The formula adds
real_estate_taxesuncapped. Sound. -
(b)'s income tax reduction. None of the four inputs includes income taxes, so the reduction cannot reach the total. I agree.
-
Personal property taxes. Main has no input for them.
personal_propertyis a property value (quantity_type = STOCK), not a tax. The body already states the limit. Follow-up: add a personal property tax input and count it in Kansas (a) and line C3. -
Medical.
medical_expense_deductionis net of the federal AGI floor, which matches section 213 and federal Schedule A line 4. -
Charity.
charitable_deductionis the section 170 itemized amount, after ceilings and the 2026 floor. It does not include the 2021 non-itemizer deduction (Case 7). -
2013–2014. A 2014 Kansas household raises
ParameterNotFoundErrorongov.irs.gross_income.retirement_contributions.limit[401k], so the body's "does not run before 2015" holds. -
Tests run at the head.
ks_itemized_deductions.yaml7 passed;ks_taxable_income.yaml6 passed;test_source_conflicts.py103 passed. TheKNOWN_UNMARKEDdeletion is right, since the counted comment is gone. -
Readers.
ks_taxable_income→ks_income_tax_before_credits. Both variables are also listed in thestate_itemized_deductionsandstate_taxable_incomesaggregates, which only report them. No other reader changes. -
Scope. The PR touches nothing under
.github/ortests/policy/baseline/partners/. The changelog fragment is a top-level.fixed.md. Theimpact:andaxiom:lines are present. -
Baseline. The diff moves outputs at baseline in every year:
- investment interest, casualty and theft losses and miscellaneous deductions leave the Kansas total;
- 2018–2019 shares fall below 100%;
- before 2021, federal non-itemizers lose the Kansas itemized deduction;
- with the PR as it stands, mortgage insurance premiums drop from 2026.
The hub's population check should compare
ks_income_taxon the data years, split by whether the unit hasdeductible_mortgage_insurance_premiumsor investment interest.
What I couldn't check
- Sources. This VM's proxy refused every source host I tried: ksrevisor.gov, ksrevenue.gov (the 2017, 2018, 2019 and 2025 booklets), kslegislature.gov, govinfo.gov, uscode.house.gov, ecfr.gov, law.cornell.edu and web.archive.org. Each statute and booklet reading above is the hub's reading, as the brief gives it. That includes the line numbers in the parameter reference titles and the
#page=anchors. - Overlap. I did not run Model the claim of right repayment deduction and credit (26 U.S.C. 1341) and North Carolina's rules that depend on it #10038's and Count gambling winnings in federal gross income and fix the wagering losses deduction #10070's Kansas cases on a merged tree.
- Population impact. I ran no population-data impact.
Generated by Claude Code
|
Picking this up for the US hub. I'll post a hand-off comment here when it's ready. Generated by Claude Code |
K.S.A. 79-32,120(a) counts qualified residence interest "as provided in section 163(h)", and 26 U.S.C. 163(h)(3)(E) treats deductible mortgage insurance premiums as such interest. Reading deductible_mortgage_interest (person level) also lets a direct input of it reach Kansas, as it did on main through interest_deduction. Adds 2019, 2021, 2025 and 2026 cases and fixes the "lines C3" reference title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FTrmW4gEEVCH3jdrF
|
Ready for hub review Head: What the item asked and how I resolved it
Tests run at the new head (one file per process)
CIThe Pull request run at Judgment calls
Proposed follow-up
Generated by Claude Code |
|
Hub review in progress This interim note is superseded by the final review: #10095 (comment) Generated by Claude Code |
|
Ready for hub review The head has not moved past
The code applies this correctly in every year, filing status and entity I tried. Cases 8–11 return my hand values, every test file passes, and CI is green. The findings below are a wrong merge rule in the body's Overlap section (P2), a misdescribed statute trigger in the (b) sentence, one surviving mutant, two page anchors and a missing comment (all P3). None changes a model output. The P2 and the (b) P3 are body edits the hub can make when it fills the FindingsP2. The Overlap rule fails if #10038 or #10070 lands firstWhere: PR body, "Overlap" section, first paragraph. The body says: "Whichever lands second drops its own formula edit and keeps its YAML cases. #10038's new case then sets That is right only when this PR lands first. If #10038 (or #10070) lands first, this PR is "second". It must then keep its own formula and drop the other PR's subtraction. It must also make the edit to #10038's case, which by then is on main. Failure scenario: a session that follows the sentence literally after #10038 or #10070 lands would drop the closed list. Five of this PR's cases then fail. If it keeps the formula but leaves #10038's case alone, as the body assigns that edit to #10038, that case fails instead. What I ran: I merged #10038's head (
So the right resolution is the same in either order. Replace the paragraph with:
P3. The (b) sentence names the wrong trigger for the depreciation reductionWhere: PR body, the paragraph that starts "K.S.A. 79-32,120(b) reduces the total…". The body says (b) reduces the total "by depreciation claimed for certain credits". (b) reduces it by "the amount of all depreciation deductions claimed for any real or tangible personal property upon which the deduction allowed by K.S.A. 79-32,221" or seven other sections "is or has been claimed". I read all eight sections on ksrevisor.gov:
The conclusion still holds. Replace the paragraph with:
P3. No case pins the deductible premium amount, so a raw-premium mutant survivesWhere: Each premium case has AGI under $100,000 and falls in a year when premiums are deductible. So no case tells Failure scenario: a later edit swaps in the raw input. Kansas would then count premiums in 2022–2025 and above the AGI phase-out, and every case would still pass. My mutant M7 below does exactly that and survives all 17 cases in the two files. The federal variable's own tests pin the years and the phase-out, but nothing pins that Kansas reads the deductible amount. The hand-off's judgment call left the phase-out to the federal tests. Add after Case 11. I computed each by hand before running. Both pass at the head. Run against M7, Case 12 gives 9,000 (expects 8,000) and Case 13 gives 6,750 (expects 6,375). # 163(h)(3)(E)(iv) ends the premium deduction after 2021, and P.L. 119-21
# sec. 70108 restores it only from 2026 (2025 Kansas Schedule A line 8d is
# reserved).
- name: Case 12, 2025 mortgage insurance premiums do not count.
period: 2025
input:
state_code: KS
home_mortgage_interest: 8_000
mortgage_insurance_premiums: 1_000
output:
# 1 * 8,000
ks_itemized_deductions: 8_000
# 163(h)(3)(E)(ii) cuts premiums by 10% for each $1,000, or fraction of one,
# of AGI above $100,000.
- name: Case 13, 2019 premiums after the AGI phase-out count at the 75% share.
period: 2019
input:
state_code: KS
employment_income: 104_500
home_mortgage_interest: 8_000
mortgage_insurance_premiums: 1_000
output:
# AGI exceeds 100,000 by 4,500: 5 steps, so premiums fall 50% to 500.
# 0.75 * (8,000 + 500)
ks_itemized_deductions: 6_375P3. Two 2025 references open page 14, but the charity and interest rules are on page 15In the 2025 booklet, page 14 holds the Kansas Schedule A lines for medical care and taxes. Page 15 holds:
Fixes:
The other titles and pages check out (see below). P3. Case 7 has no arithmetic, and the body's source caveat is now out of date
MutantsEach mutant ran on a scratch copy of the head. Each test file ran in its own process (
The hand-off's six all die on the cases it names. My M8 confirms that Case 9 is the only case guarding round 1's P2. My M7 survives, which is the P3 above. Against the fix briefThe commit does every item the round 2 brief asked for:
Both body errors above came from the brief's own wording, copied verbatim:
Checked and soundSources confirmed in this session:
The qualified residence interest rule:
Hand values. I derived these from the statute and the federal rules. The brief had already given the expected values, and the delta diff showed the YAML before I wrote mine down. Then I ran them. All passed at the head.
My cases W1–W12 (all pass at the head; run with
|
PR Review: Limit Kansas itemized deductions to the four K.S.A. 79-32,120(a) categories at each year's sharesPR #10095 (author: MaxGhenis), head
No partner test file is touched. Path prefixes:
SummaryThe model change is right in every claimed year. I read K.S.A. 79-32,120 on ksrevisor.gov myself. Its history ends at L. 2021, ch. 93, so no later amendment applies. I also read the 2015, 2017, 2018, 2019 and 2025 K-40 booklets. The statute defines the Kansas itemized deduction as a closed list of four federal amounts:
Each has a dated share:
(a)(1)(A) limits the Kansas itemized deduction to federal itemizers "for all tax years prior to tax year 2021", and (a)(1)(B) removes that limit from 2021. Every parameter date and value matches. The formula reads the right federal amounts. The gate is applied correctly and vectorizes. All 12 new expectations and the 5 retained ones check out by hand. No critical findings. Two should items:
Five suggestions: pin the deductible premium amount, add Case 7's arithmetic, fix two PR-body paragraphs, and track the missing personal property tax input. CI and branch. CI is 38/38 green at this head. The merge with CriticalNone. Should addressS1. The Where. The PR body ends with Related issue, but not a match. rulespec-us#1672 (OPEN,
Fix. Choose one:
S2. The 2025 references open page 14, but the charitable and interest rules are on page 15. What the booklet shows. I extracted the 2025 K-40 booklet (ip25.pdf); PDF page numbers equal the printed numbers here.
Problems.
Fix.
SuggestionsG1. No case pins that Kansas reads the deductible premium amount, not the raw premiums. Gap. Cases 8, 10 and 11 all fall in years when premiums are deductible, and all have AGI under $100,000. So swapping
It isn't a should, because deleting the term does fail Cases 8, 10 and 11. Suggested cases (hand-computed from
G2. Case 7 has no arithmetic. The body says each new case carries its arithmetic, but G3. The body misdescribes the (b) depreciation trigger. The body says (b) reduces the total "by depreciation claimed for certain credits". The statute reduces it by depreciation on property "upon which the deduction allowed by K.S.A. 79-32,221, 79-32,227, … or 79-32,256 … is or has been claimed". Those sections grant amortization deductions; 79-32,221, for example, allows "a deduction from Kansas adjusted gross income with respect to the amortization of the amortizable costs of a new refinery". The conclusion still holds (no input, no effect), so only the wording needs to change. G4. The body's Overlap rule only works if this PR lands first. Problem. "Whichever lands second drops its own formula edit" means that if #10038 or #10070 (both still open) lands first, this PR would drop its closed-list formula. Its share cases would then fail. Correct rule, in either order:
G5. Personal property taxes are still missing. The statute counts "taxes on real and personal property", and every booklet has a personal-property line: 2017 C2, 2018/2019 C3 and 2025 line 6. The model has no input for them, so only Verified correctStatute and booklets, all read directly:
Formula and entities:
Mutation check. Removing each new value or guard fails at least one test:
Hand-checks (17 expectations):
The 2019 Kansas standard deduction (single $3,000) and exemption ($2,250), and the 2021 single standard deduction ($3,500), match the booklets. Housekeeping:
Axiom line assessmentInvalid (S1). CI status
Branch statusThe branch is 6 commits behind Sibling note. #10038 and #10070 (both open) edit the same lines of Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
Requesting changes: 0 critical, 2 should (the axiom line isn't a valid form, and rulespec-us#1672 doesn't cover the 2015-2019 shares, the gate or premiums; the 2025 charitable reference points to page 14, but the section 170 rule is on page 15). The formula and every parameter match K.S.A. 79-32,120 in each claimed year. Full report in the comment above.
|
Picking this up for the US hub. I'll post a hand-off comment here when it's ready. Generated by Claude Code |
#10038 changed ks_itemized_deductions.py to subtract the federal claim of right deduction from the federal total and added a case for it. The resolution keeps this branch's closed-list formula, which already leaves that deduction out. Its reference tuple already has the statute line #10038 added. Both branches' YAML cases stay. #10038's case now sets home_mortgage_interest: 9_000 in place of interest_deduction: 9_000, because the closed list reads qualified residence interest, not the federal interest total. Its expectations (14,000 and 12,000) are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…emiums The 2025 K-40 booklet gives the Kansas Schedule A medical and tax rules on page 14 and the qualified residence interest and charitable rules on page 15. The charitable share's reference now opens page 15 and names lines 10 to 13. The variable's Schedule A reference spans both pages, so it gets a "PDF pages 14-15" comment. No case told the deductible mortgage insurance premiums apart from the raw premium input. Case 12 (2025, when 163(h)(3)(E)(iv) bars premiums) and Case 13 (2019, AGI 4,500 above the phase-out start) now do. Case 7 gets its arithmetic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ready for hub review This round merges main and resolves DTrim99's review 5775421275 (comment 6641541106) at 1. Main
2. FindingsI checked each finding against its source before relying on it. G1's gap shows in mutant MA below: only the two new cases catch it.
3. Source conflictsNo finding turns on two sources that disagree, so I added no
Rulings for the hub: none. No change reverses a reading in the body, 4. AxiomThe body's line stays as it is. If the hub's rulespec-us#1672 extension doesn't already carry them, this addendum covers this round's new companion rows:
I couldn't check the corpus citation or the module path, because rulespec-us is outside this session's access. 5. MutantsOne process each on
Under MA, the other 12 cases, including all 11 from before this round, pass. That reproduces G1. S2 and G2 change a reference and a comment, so no test can fail on them. I checked S2 against the booklet instead. 6. Tests at
|
| File | Result |
|---|---|
ks_itemized_deductions.yaml |
14 passed |
ks_taxable_income.yaml |
6 passed |
ks_2025_integration.yaml |
13 passed |
ks_integration.yaml |
2 passed |
ks_income_tax_before_credits.yaml |
8 passed |
test_source_conflicts.py |
103 passed |
ruff format --check and ruff check pass on ks_itemized_deductions.py.
CI: Pull request run 42643458213 at 9a2ccc7705 was queued when I posted this. I didn't wait for it, so I can't yet say whether it skipped or cancelled any job.
7. Body
Every section now matches this head:
- What changes: main's formula now shows Model the claim of right repayment deduction and credit (26 U.S.C. 1341) and North Carolina's rules that depend on it #10038's claim of right subtraction.
- The (b) sentence: the G3 wording.
- Sources: the 2025 booklet line names pages 14 and 15.
- Source caveat: "as the hub read the sources (this build session's network refused …)" became "confirmed against the sources in the round 2 review", as the hub's last review suggested.
- Overlap: rewritten for Model the claim of right repayment deduction and credit (26 U.S.C. 1341) and North Carolina's rules that depend on it #10038 merged and Count gambling winnings in federal gross income and fix the wagering losses deduction #10070 open.
- Tests: the new counts, and the cases main's formula fails.
- CI: the new run.
- impact:
impact: the hub will measurebecameimpact: pending a comparison at the final head. - axiom: unchanged.
- Session URL: I removed it, since it's an internal id.
Judgment calls
- Who changed the axiom line. The line changed between DTrim99's review and this round, presumably by the hub. I treated S1 as handled by that change and drafted only an addendum.
- Reference title. I renamed the charitable reference "Kansas Schedule A, lines 10 to 13" to match the medical reference's "lines 1 to 4" style.
- The (b) range. The new (b) sentence names the eight sections as "K.S.A. 79-32,221 to 79-32,256", the span (b) lists, rather than all eight numbers.
- Mutant MC. It swaps in main's formula, which tells the body how many cases need this PR. It isn't a mutant of a fix from this round.
Follow-up issue proposed
- Add a personal property tax input for Kansas itemized deductions. K.S.A. 79-32,120(a) counts "taxes on real and personal property" under section 164(a), and every K-40 booklet has a personal property line. The model has only
real_estate_taxes, so Kansas itemizers with personal property taxes get too small a deduction.
DISMISSAL MAP
- Critical: none in the review.
- S1 (axiom line not a valid form): the body's line changed after the review to
rulespec-us#1672 queued, extended with a comment, and I kept it. Addendum drafted above; I couldn't check rulespec-us from this session. - S2 (2025 references open page 14): fixed at
charitable_contributions.yaml:13-14(page 15, lines 10 to 13) andks_itemized_deductions.py:13(# PDF pages 14-15). - G1 (no case pins the deductible premiums): fixed with Cases 12 and 13 (
ks_itemized_deductions.yaml:146-154,:158-169); mutant MA dies on both. - G2 (Case 7 has no arithmetic): fixed at
ks_itemized_deductions.yaml:92. - G3 (body misdescribes the (b) trigger): fixed in the body.
- G4 (the overlap rule works only if this PR lands first): applied in the merge at
7cc2e5450a, with the body updated; mutant MB dies on Model the claim of right repayment deduction and credit (26 U.S.C. 1341) and North Carolina's rules that depend on it #10038's case. - G5 (personal property taxes missing): not in this PR; follow-up proposed above.
Generated by Claude Code
PR Review (round 2): Limit Kansas itemized deductions to the four K.S.A. 79-32,120(a) categories at each year's sharesPR #10095 (author: MaxGhenis), head Since then the branch has gained:
Path prefixes:
SummaryBoth should items are fixed, and so are G1–G4.
The model change is the same as in round 1. At the head, Both merge blocks are resolved correctly. The new and changed expectations all check out by hand. CI and branch. CI is 38/38 green at the head. The merge with current main is clean. Open items. Nothing critical or should is open. Three suggestions remain:
Prior findings
New findingsCriticalNone. Should addressNone. SuggestionsN1. Two stale lines in the PR body.
Also fill the N2. A short addendum to rulespec-us#1672. The extension comment was written at
The PR's YAML now also carries #10038's case from the merge:
Neither #1672 nor #10038's issue (rulespec-us#1657, which covers 26 U.S.C. 1341 and N.C. Gen. Stat. 105-266.2) has this row. The author drafted an addendum in the hand-off comment but could not post it. Posting it, with the claim-of-right row added under the "only the listed Kansas components" invariant, would keep the issue row-for-row with the head. This isn't a should, because the round's changes were not material to behavior. G5 (carried over). Open the proposed issue for a Kansas personal property tax input, so the gap is tracked in this repository as well as in #1672. VerifiedMerge block 1:
Merge block 2:
Fix commit
All other PR files are byte-identical to round 1 in their PR-side changes:
Law behind the new comments:
Hand-checks of every new or changed expectation:
New cases kill the obvious mutants.
PR body counts are correct:
Main-side guards on the tree merged with current main:
Round 1 verification still holds. The formula and parameters are unchanged, so the round 1 statute, booklet and 17-expectation checks stand. AxiomValid. The line is Issue status. #1672 is OPEN and labelled What the extension comment contains:
Match with the head. The issue matches the head's behavior. The one row it lacks is #10038's merged claim-of-right case, covered by suggestion N2. CI
BranchThe branch is 6 commits behind Main's 6 newer commits touch none of this PR's files and nothing it reads:
Sibling note. #10070 (open) edits the same lines of Verdict: APPROVE |
DTrim99
left a comment
There was a problem hiding this comment.
Round 2: both shoulds (axiom line; 2025 page anchors) are fixed, the mortgage-insurance mutant is now pinned, both merge resolutions are correct, and CI is green. Three optional suggestions remain.
|
US + core hub merge audit, us#10095 at
🤖 Generated with Claude Code |
What changes
K.S.A. 79-32,120(a) defines the Kansas itemized deduction as four federal itemized categories, each at a share that has changed by year:
Main computes
itemized_deductions_less_salt - claim_of_right_deduction + real_estate_taxes; #10038 added the subtraction. That gives 100% of every other federal itemized deduction except SALT in every year, including investment interest (insideinterest_deduction), casualty and theft losses, and pre-2018 miscellaneous deductions. This PR adds four dated share parameters undergov.states.ks.tax.income.deductions.itemized.rateand sums only those categories. Qualified residence interest is federal deductible mortgage interest and points (deductible_mortgage_interest) plus deductible mortgage insurance premiums, which 26 U.S.C. 163(h)(3)(E) treats as qualified residence interest. Investment interest, the rest ofinterest_deduction, does not count. Personal property taxes have no separate input, so onlyreal_estate_taxesenters, uncapped by the federal SALT limit as before.It also applies (a)(1): before 2021, only a filer who itemizes on the federal return may take the Kansas itemized deduction; from 2021 any filer may take the larger of the two. Main let every filer take the larger in every year. The new
federal_itemization_requiredparameter is true from 2015 to 2020.K.S.A. 79-32,120(b) reduces the total by income taxes deducted federally, and by depreciation on property that also took one of the eight Kansas amortization deductions it lists (K.S.A. 79-32,221 to 79-32,256). None of the four categories includes income taxes or depreciation, and the model has none of those amortization deductions, so (b) changes nothing here.
The parameters start in 2015. The federal model does not run before 2015, so the 2013–2014 Kansas rules are not modeled.
Sources
Statute and form text, each quote checked against its source:
Overlap
#10038 merged on 2026-11-07 and edited the same lines of
ks_itemized_deductions.py: thereferencetuple and thereturn. The merge of main at7cc2e5450akeeps this PR's formula, which already leaves out the claim of right deduction, and keeps both PRs' YAML cases. #10038's case now setshome_mortgage_interest: 9_000in place ofinterest_deduction: 9_000, with its expectations unchanged.#10070 (open) edits the same lines too. It conflicts with this head in the same 8 files it conflicts with on main, including both Kansas files. In either landing order, the merged file keeps this PR's formula, which already leaves out wagering losses, and drops #10070's formula edit and reference line. Each PR's YAML cases are kept.
This PR also deletes the file's
KNOWN_UNMARKEDline intest_source_conflicts.py, because it replaces the comment that quoted the 2021 instructions.Tests
ks_itemized_deductions.yaml: 14 cases, 11 new (2017, 2018, 2019, 2021 and 2025 shares; 2019, 2021, 2025 and 2026 mortgage insurance premiums, including the 2019 AGI phase-out; a 2025 directdeductible_mortgage_interestinput), each with its arithmetic. Main's 3 cases keep their expectations. The Kansas formula no longer readsinterest_deduction, so unit tests 1 and 2 now enter mortgage interest asdeductible_mortgage_interest_tax_unit, and Model the claim of right repayment deduction and credit (26 U.S.C. 1341) and North Carolina's rules that depend on it #10038's case enters it ashome_mortgage_interest. Main's formula fails 6 of the 14: Cases 3, 4, 5, 6, 8 and 13.ks_taxable_income.yaml: 6 cases, 3 new on the federal itemizing condition. 1 fails with main's formula.CI: the Pull request run at
9a2ccc7705, 42643458213, passed all 36 jobs. It tested this head merged into main at3e5a1dff6b.Invariants
Microsimulation impact
We estimate that limiting Kansas itemized deductions to the four statutory categories lowers them by $167.8m (1.6%) in 2026 on the default dataset, and raises Kansas income tax by $9.2m (0.17%). We compared
mainatba9bfdea75with this branch at9a2ccc7705.Kansas itemized deductions fall for 189 sampled tax units (187,463 weighted), by at most $41,384. Kansas taxable income and Kansas income tax rise for 171 sampled tax units (175,793 weighted), and no tax unit's Kansas income tax rises by more than $2,309. Household net income falls by the same $9.2m. Federal income tax and household benefits don't change.
ks_itemized_deductionsks_taxable_incomeks_income_taxstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsimpact: Kansas income tax +$9.2m (+0.17%) in 2026 (171 sampled tax units, 175,793 weighted), as Kansas itemized deductions fall by $167.8m; federal income tax and household benefits don't change
axiom: TheAxiomFoundation/rulespec-us#1672 queued, extended with two comments (2015–2019 shares, the pre-2021 federal-itemizer condition, mortgage-insurance companion cases, and #10038's claim of right case); it waits on historical corpus and version verification, ingestion of missing sources, and a signed-release re-pin as needed.
🤖 Generated with Claude Code