Repository navigation
Count SSI and net Schedule E losses in Maine fairness credit income - #11185
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11185 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 3 +2
Lines 24 64 +40
Branches 0 2 +2
=========================================
+ Hits 24 64 +40
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:
|
hua7450
left a comment
There was a problem hiding this comment.
Thanks, David. Counting the head's and spouse's SSI, leaving out Maine's state supplement and netting the Schedule E items on Schedule 1 line 5 all match 36 M.R.S. 5213-A and 5219-KK. The per-line arithmetic, max(net, 0) per line, equals Schedule PTFC/STFC line 2a plus line 2d. SSI adds no cycle, no new inputs are added, and all 20 new expected values check by hand. Two fixes before I approve.
Before merge
-
Netting on Schedule 1 lines 3 and 6 and Form 1040 line 7. The statute adds back "Trade or business losses; capital losses; ... and farm losses included in federal adjusted gross income". It keeps "any net loss resulting from combining" for the Schedule E items only, which suggests the other losses are added back gross. The PR follows Schedule PTFC/STFC line 2d, which adds back only the net loss on each line. Two examples:
- $10,000 of Schedule C income and a $3,000 SSTB loss: 7,000 under the PR, 10,000 under the statute (as on main).
- One spouse with a $10,000 gain and the other with a $4,000 loss.
The PR body acknowledges this, but CONTRIBUTING ("Source conflicts") says the statute comes first and asks the PR to record any other reading in
source_conflicts/candidates.yaml. Please either net only line 5 and keep main's per-source floor for lines 3, 6 and 7, or keep the schedule's netting and add the candidate entry (statute against line 2d, 2021-2025) explaining why it is a true tie. -
+=inme_fairness_credit_federal_income.py(lines 53-54). The repo style isline_income = line_income + ..., and the same forline_losses. No value is wrong today.
Optional
me_fairness_credit_ssirebuildstax_unit_non_dep_addby hand;return tax_unit_non_dep_add(tax_unit, period, ["ssi"])gives the same result.- Line 8p (follow-up, same on main). Line 2a is Form 1040 line 9, which includes the Schedule 1 line 8p excess business loss adjustment, and federal total income leaves it out. This only matters for business losses above the section 461(l) threshold (about 313,000 single in 2025).
- Tests. "SSI is a payment received under the federal Social Security Act." repeats the senior renter SSI case, and the SSI boundary pair re-pins the 25,450 edge the rental-loss pair already covers. The new names also don't follow the "Case N," convention.
fbc98f6 to
a24bc83
Compare
|
Thanks, Ziming. Fixed in a24bc83, rebased on main. I updated the title and body to match. Fixed (your "Before merge" items)
Skipped (optional, not in this round):
Verification:
|
hua7450
left a comment
There was a problem hiding this comment.
Thanks, David. Both items are fixed. Only the Schedule 1 line 5 items net now, the three deleted line parameters have no readers, and no += is left. The us-me:fairness-credit-loss-add-backs entry is complete, and its quotes match 5219-KK and the 2021 and 2025 schedules. The changed and new expected values all check by hand. One gap before I approve.
Before merge
-
One filer's short-term and long-term results still net against each other.
capital_gainsadds a person's short-term and long-term gains, andirs_gross_incomefloors that sum. So, by code trace: a 2025 single filer with $20,000 of wages, a $10,000 long-term gain and a $4,000 short-term loss gets 26,000. Put the same Schedule D items on two spouses of a joint return and the model gives 30,000. The new entry says capital losses are "added back in full", which holds only in the second case. Two existing cases also disagree:- 2,000 of distributions with a 5,000 long-term loss gives 22,000;
- a 2,000 short-term gain with the same loss gives 20,000;
yet both returns have the same Schedule D, the same −3,000 on line 7 and the same AGI. Main already nets this way, but the PR now registers the opposite reading.
Please either:
- add back each filer's negative short-term and long-term amounts separately (the part netted inside one person is
max_(0, -st) + max_(0, -lt) - max_(0, -(st + lt))per head and spouse; the part beyond the gains is already back throughirs_gross_income), so the code matches the entry (my preference, since it follows the statute the entry cites); or - net capital results across the whole return, both spouses together, and say so in the entry.
Either way, please add a single-filer case with offsetting short-term and long-term results. PR 11178 has the same question for Vermont, so it's worth answering both the same way.
Optional
- The 2024 schedule has the same line 2d text on page 4 (found through the Wayback Machine), so the entry's "2024 unchecked" can be dropped.
- Line 8p. With the statute reading, only the allowed part of a business loss is in AGI, so the model's result matches the statute. The schedule's line 2a route would add the 8p amount. Noting that difference in the entry is optional.
- Tests. The two new cases in
me_sales_and_property_tax_fairness_credit_income.yamlrepeat cases inme_fairness_credit_federal_income.yaml. - From the first round, still open: the
tax_unit_non_dep_addrewrite ofme_fairness_credit_ssi.
Maine's sales and property tax fairness credits count payments under the federal Social Security Act, which include SSI (Schedule PTFC/STFC lines 1a and 2b), and add back only a federal line's net loss (line 2d). The income now adds ssi and starts from federal total income with each line's net loss added back, so a rental loss offsets partnership income on Schedule 1 line 5 and spouses' Schedule C, Schedule F and capital results net on their lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Covers the false side of the gross-income-source check in me_fairness_credit_federal_income, which codecov flagged as a partial line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The income list summed ssi over every tax unit member, so a dependent's SSI counted in the family's income, and a dependent's pension, by lowering that SSI, could raise the credit. Rule 813 bases the credits on the claimant's individual income or a married couple's joint income, so the list now holds me_fairness_credit_ssi, the head's and spouse's SSI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…credit income, per 36 M.R.S. 5219-KK Federal income for the Maine sales and property tax fairness credit is now irs_gross_income minus the netted Schedule 1 line 5 losses. Other federal lines keep losses floored per source, as 36 M.R.S. 5213-A(1)(B)(1) and 5219-KK(1)(D)(1) provide. Removes the unused line 3, line 6 and Form 1040 line 7 parameters, updates the affected test expectations, adds the reviewer examples, and records the statute vs. form line 2d conflict in source_conflicts/candidates.yaml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er's gains in Maine fairness credit income Add me_fairness_credit_netted_capital_loss, which adds back the capital losses that one filer's short-term/long-term netting absorbs (including Schedule D line 13 distributions and the line 14 long-term carryover), for the head and the spouse, so every capital loss in federal AGI comes back once. Extend the YAML cases, the source-conflict entry, and the changelog fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a24bc83 to
e83633e
Compare
|
Thanks, Ziming. Fixed in e83633e, rebased on main. I took your preferred option and answered it the same way as Vermont's #11178. I updated the PR body and changelog to match. Fixed (your "Before merge" item)
Also done (your optional item): I found the 2024 Schedule PTFC/STFC through the Wayback Machine, and its page 4 has the same line 2d text. The entry now covers 2021-2025, with no "2024 unchecked". Skipped (optional, not in this round):
Verification:
|
hua7450
left a comment
There was a problem hiding this comment.
Thanks, David. me_fairness_credit_netted_capital_loss now adds back the loss netted inside one filer, so each filer's income carries gross capital gains. That matches the statute and the register entry. Last round's examples now agree: 30,000 for the single filer and for the same items split between spouses, and 22,000 for both cases that disagreed. The 3,000 limit still holds and nothing is counted twice. Approving.
Optional:
- PR body. It still says main already adds capital losses back in full, and "Who is affected" leaves out filers whose income now rises.
- Shared helper (follow-up). The new helper repeats Vermont's within-person netting from PR 11178 line for line. Once both are merged, one federal calculation could replace the two.
- Earlier optional items, still open: the 2024 schedule in the entry's sources, the
tax_unit_non_dep_addrewrite ofme_fairness_credit_ssi, and the duplicate test cases.
Part of #10812 (state credit income audit).
What was wrong
me_sales_and_property_tax_fairness_credit_incomeaddedirs_gross_income,tax_exempt_social_securityandtax_exempt_interest_income. Two parts of the statute's income were wrong.SSI never counted. 36 M.R.S. 5213-A(1)(B)(3) and 5219-KK(1)(D)(3) add "Payments received under the federal Social Security Act and railroad retirement benefits to the extent not included in federal adjusted gross income". The Schedule PTFC/STFC instructions for line 1a, which line 2b points to, say "all payments received under the federal Social Security Act, including regular social security benefits, social security disability benefits and supplemental security income" (2025, page 3; 2021, page 3).
Schedule E losses were dropped before they were combined. 5213-A(1)(B)(1) and 5219-KK(1)(D)(1) add back "Trade or business losses; capital losses; any net loss resulting from combining the income or loss from rental real estate and royalties, the income or loss from partnerships and S corporations; the income or loss from estates and trusts, the income or loss from real estate mortgage investment conduits and the net farm rental income or loss; any loss associated with the sale of business property; and farm losses included in federal adjusted gross income". Schedule PTFC/STFC line 3 adds federal total income (line 2a, Form 1040 line 9) and line 2d: "the amount of any negative amount (net loss) included on federal Form 1040 or Form 1040-SR, line 7 and federal Schedule 1, lines 3, 4, 5, 6, and 8a through 8z" (2025, pages 1 and 4; the 2021 schedule has the same lines).
irs_gross_incomedrops each person's loss from each source on its own, so a rental loss never offset partnership income on Schedule 1 line 5, and the partnership income reached the credit income in full. The statute nets only these Schedule E items ("any net loss resulting from combining"). Trade or business, capital and farm losses are added back in full, which main already does.What changes
me_fairness_credit_ssi, the head's and spouse's SSI, is added toincome_sources.yaml. MRS Rule 813 .01(B) and (C) base the credit on the claimant's "individual income" or a married couple's "joint income", and .03 on "the taxpayer's federal adjusted gross income" (pages 1 and 4), so a tax unit dependent's SSI is the dependent's own.me_fairness_credit_federal_income, replacesirs_gross_incomein the list. It starts fromirs_gross_incomeand, for Schedule 1 line 5 only, subtracts the losses that offset income on that line: the smaller of the line's income and its losses, over the head and spouse together. Only the line's net loss is added back. Every other source stays as inirs_gross_income, each person's loss from each source left out, so trade or business, capital and farm losses are added back in full. One more piece completes that for capital losses.capital_gainsadds a person's short-term and long-term results beforeirs_gross_incomefloors them, so a new helper,me_fairness_credit_netted_capital_loss, adds back the loss absorbed by the same filer's other-term gains, for the head and spouse. It handles Schedule D line 13 distributions and the prior-year long-term carryover the same way as Vermont's Add back losses and listed deductions in Vermont renter credit income #11178.gov.states.me.tax.income.credits.fairness.federal_lines:rental_income,partnership_s_corp_income,estate_income,farm_rent_incomeOnly sources that federal gross income counts are netted, so a reform that drops a source from gross income stays consistent. A tax unit dependent's items stay out, as in
irs_gross_income.Reading for lines 3, 6 and 7 (statute over the schedule). Schedule PTFC/STFC line 2d adds back only the net loss on Form 1040 line 7 and Schedule 1 lines 3 and 6, as well as line 5. The statute says "net loss resulting from combining" only for the Schedule E items, and adds back trade or business, capital and farm losses "included in federal adjusted gross income" without netting. Following CONTRIBUTING ("Source conflicts"), the model follows the statute on lines 3, 6 and 7 and keeps main's treatment there. The conflict is registered as
us-me:fairness-credit-loss-add-backs(2021-2025; the 2024 schedule has the same line 2d text). The two readings differ for a return with two Schedule C businesses (or two farms) of opposite sign, or spouses with opposite capital results. A first version of this PR followed the schedule on those lines, and review moved it to the statute.Who is affected
Maine residents claiming the property tax fairness credit or the sales tax fairness credit (both refundable credits against Maine income tax):
Both new variables leave a tax unit dependent's SSI and losses out. The list itself is still summed over every member, so a dependent's nontaxable Social Security and tax-exempt interest still count, as on main; #10647 and #9894 switch that sum to the head and spouse, and both new entries are tax-unit amounts that work unchanged under that switch. An earlier commit here listed
ssiitself, summed over every member, and CI'stest_dependent_retirement_income_state_invariants.pycaught it: an elderly dependent's pension lowered the dependent's own SSI, which lowered the family's credit income and raised the credit.Tests
Moved from #10812 (
me_sales_and_property_tax_fairness_credit_income_audit.yaml) into a newme_sales_and_property_tax_fairness_credit_income.yaml(main has no such file; #10722 and #10647 create it too), values unchanged:Added, with arithmetic in each comment:
me_fairness_credit_federal_income.yaml, 10 cases, including one for a source a reform takes out of federal gross income (23,000): a Schedule 1 line 5 net loss is added back only to zero (20,000); estate and farm rental losses net with rental income (3,000); a loss on one line does not offset another (25,000); a dependent's rental loss stays on the dependent's return (10,000). Off line 5, losses are added back in full: two kinds of Schedule C business (10,000), joint spouses' Schedule C (30,000), farm (8,000) and capital (30,000) results, and capital gain distributions with a capital loss (22,000).me_fairness_credit_federal_income.yaml, within one filer: a 2025 single filer with 20,000 of wages, a 10,000 long-term gain and a 4,000 short-term loss gives 30,000, the same as splitting those items across spouses. Also cases for line 13 distributions, a long-term carryover,capital_gainsgiven without its parts, and a dependent's own netting (left out).me_sales_and_property_tax_fairness_credit_income.yaml, the two review examples: 10,000 of Schedule C income with a 3,000 SSTB loss gives 10,000, and joint spouses with a 10,000 capital gain and a 4,000 capital loss give 10,000.Existing tests changed: inputs only, no expected value.
me/tax/income/integration.yaml, case "taxsim_record_22242_2024.yaml (Property Tax Fairness Credit Debug)": the 77-year-old spouse has only 847.58 of interest and dividends between the two of them, so the model computes about 11,139 of SSI for her. Counting it cut the property tax fairness credit by 4% of that (445.57), andme_income_taxcame out -924.43 instead of -1,370 (runw1-me-a). The case reproduces a TAXSIM record, which holds tax inputs only, and it already setssnap: 0andtanf: 0for that reason; it now setsssi: 0for both people as well, and -1,370 stands.Not in this PR
me_ssp) is left out. 22 M.R.S. 3271 makes it a state program "in supplementation of" federal SSI, not a payment under the federal Social Security Act, and the line 1a instructions name only Social Security, Social Security disability and SSI.axiom: needed (rulespec-us has no us-me module for 36 M.R.S. 5219-KK, and its 5213-A module does not encode the (1)(B) income definition; no encoder run was authorized for this PR)
After the review fixes, tested locally: the two changed test files (21), the Maine fairness credit directory and the Maine integration file (34), the Maine invariant tests (16) and
test_source_conflicts.py(251) all pass. Before them, tested on Modal: runw1-me-c, 251/251 passed (249 YAML files: the Maine folder, every partner file, the changed files and the 20 tests outside the Maine folder with a Maine household; plustest_source_conflicts.pyandtest_dependent_retirement_income_state_invariants.py, 4 of 4). Runw1-me-afailed only the integration case above.🤖 Generated with Claude Code