Skip to content

fix: round-2 TY2025 engine fixes from the accuracy eval - #164

Merged
a7ul merged 26 commits into
mainfrom
codex/eval-fixes-round2
Oct 19, 2026
Merged

a7ul merged 26 commits into
mainfrom
codex/eval-fixes-round2

Conversation

@a7ul

@a7ul a7ul commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Result on the 38 eval returns

Headline = AGI, taxable income, total tax, refund and amount owed all within $1.

OpenTax Headline match Lines matched
main (after #147) 16 / 38 504 / 747 (67%)
this branch 18 / 38 559 / 747 (75%)

Fixes

Each fix is one commit with a synthetic regression test and an IRS citation.

Area Fix
W-2 Age-50 catch-up before code D excess review; box 6 without box 5; box 11 NQDC/457 payout to Schedule 1 line 8t
Form 7206 Self-employed health insurance from premiums and the return
Form 8880 Incomplete form leaves the credit unclaimed instead of aborting
NOL A fully used carryforward no longer needs the base standard deduction
1099-G Taxable state refund from prior-year Schedule A facts
1099-R Prior-year Roth contribution basis for code J
Schedule C Line 15 and Part V beside Form 8829; auto_expense line 9; DOT meals at 80%
Schedule E Rental car expense on line 6; mixed-use unit limited by rental days (280A(e))
  • Each issue came from a return where OpenTax was wrong under the 2025 IRS instructions, or couldn't take an input the tax software used.
  • Lines where the tax software looked wrong are excluded from scoring, not fixed toward.
  • No previously matching line stopped matching, except two lines in one return that matched on main only because Schedule C crashed (that return goes from 7 to 16 matching lines).
  • The Form 8995 QBI changes and the Form 4952 investment-income change were dropped: they broke MeF export for multi-business and 1099 returns. They'll come back with their MeF projection.

🤖 Generated with Claude Code

a7ul and others added 26 commits October 19, 2026 14:52
…d the return

A premium-only self-employed health insurance entry threw, asking for an
identified Form 7206 plan with monthly policy records. The entry now sends
premiums (less those for months eligible for a subsidized employer plan) to
Form 7206, which limits them for one profitable Schedule C by its net profit
less the Schedule 1 line 15 SE tax deduction and line 16 retirement
deduction (2025 Instructions for Form 7206, lines 1-14). Other business
mixes still need the Form 7206 plan entry.

Synthetic regression: Schedule C net 80,000, premiums 12,000: line 7 5,652,
line 14 12,000 on Schedule 1 line 17 (base: input node threw).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit e06c5db00e5dd1ebc65fce86f665c5d830bc780e)
…ad of aborting

A Form 8880 failure inside the Form 1040 node (for example missing student
or dependent answers) threw and zeroed every Form 1040 line. Form 1040 now
leaves the saver's credit unclaimed and reports a warning; nodes can return
warnings, the executor collects them separately from failures, and the CLI
return summary prints them.

Synthetic regression: MFJ, AGI 48,000, code D 2,000 per spouse, no Form 8880
answers: one warning, tax after credits 1,653 (base: f1040 node failure).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 4bc6aa27e2326d4eaec2d79023bc890843bf05fb)
The line 1h excess-deferral review fired whenever a person's code D passed
23,500, ignoring the IRC 414(v) catch-up, and its failure dropped the whole
W-2. The start node now gives the W-2 node each filer's birth date from the
general information, and the review applies only above the owner's 2025
limit: 23,500, 31,000 at age 50 or older, 34,750 at ages 60-63 (Form 1040
instructions, line 1h; 2025 limits).

Synthetic regression: MFJ, spouse born 1971, one W-2 with wages 46,386 and
code D 31,000: wages and withholding kept, no line 1h excess (base: W-2
node failure).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 67654baeceda149ed50d377e108a54468af3f913)
A W-2 with Medicare tax in box 6 and no box 5 Medicare wages (common on Form
4852 substitutes built from a final pay stub) was rejected, losing its box 1
wages and box 2 withholding. The W-2 now keeps those lines (2025 Form 1040
instructions, lines 1a and 25a), is left out of Form 8959, whose lines 1 and
19 need the box 5 base, and reports a warning.

Synthetic regression: wages 113,698, withheld 20,306, SS tax 7,429, Medicare
tax 1,737, no box 3/5: line 1a 113,698, line 25a 20,306, one warning (base:
W-2 node failure).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit b17fdac2400289536836bc16c2af2dbbfc8c08a8)
The W-2 node now joins each owner's birth date from the general information
(for the elective deferral catch-up), so the patron reconciliation compared
those parsed rows against retained copies that never carry it and rejected
six sample patron returns in check:mef. The comparison drops the joined
field. Also shrinks the year-pin baseline for the removed Form 8880 year
check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 37ec82e143f853769e4673b87a706dad6a2e61e3)
…rd deduction

The standard deduction step threw whenever an NOL existed and the deduction
was not the base filing-status amount (age 65 addition, Schedule 1-A, or
itemizing), even for a pre-2018 loss with no 80% limit. When the
carryforward is used in full, the deduction only matters if it leaves less
taxable income than the loss needs: pre-2018 losses in full plus post-2017
losses divided by 80% (IRC 172(a)(2); Pub. 536). The check now uses that
threshold and asks for the keyed taxable income only below it.

Synthetic regression: single, age 66, wages 120,000 and a 20,000 NOL from 2017:
line 8a 20,000, no override needed (base: standard_deduction threw).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 1fe32155d86a36efb2b7ffce38853b6bfa5a0480)
… Schedule 1 line 8t

A W-2 box 1 amount that is a distribution from a nonqualified deferred
compensation or nongovernmental section 457(b) plan (also in box 11) was
always reported as wages on Form 1040 line 1a. The 2025 Instructions for
Form 1040 (line 1a) and Schedule 1 (line 8t) put it on line 8t instead. A new
box11_nqdc_distribution field moves that part to line 8t (MeF
NonqlfyDeferredCompensationAmt, PDF f1_32) and out of earned income; total
income is unchanged.

Synthetic regression: box 1 60,000 with a 10,000 457 distribution: line 1z
50,000, Schedule 1 line 8t 10,000, line 9 60,000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 27d7b381e4479bcee44908d4cd5273fee8e05f14)
…e A facts

A 1099-G box 2 state income tax refund required a pre-computed taxable
recovery and a workpaper reference. It can now carry the 2024 return facts
(Schedule A lines 5d, 5e and 17, the 2024 standard deduction and taxable
income), and the taxable part is figured with Pub. 525 Worksheet 2a (the
SALT-limited excess) and Worksheet 2 (itemized deductions over the standard
deduction, limited by negative taxable income). A refund after a
standard-deduction year is not taxable and needs no review.

Synthetic regressions from Pub. 525 Examples 30 and 32: refund 400 with a
1,500 excess is taxable in full; a 2,100 refund with a 250 excess gives 250.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ae09d33b82eef27422b00fafeedbae56c6b1e409)
…nt income

Form 4952 took 1099-INT and 1099-DIV income only from items explicitly
marked as investment property, so a return with investment interest expense
and ordinary bank or brokerage income had all of it disallowed. Under the
2025 Instructions for Form 4952 (line 4a), interest and ordinary dividends
from property held for investment are investment income; qualified
dividends stay out of line 4c unless elected. Unmarked items now reach Form
4952 as default sources, used when no item was marked and no royalty debt
trace is present; an item marked false is left out.

Synthetic regression: investment interest 3,000, unmarked interest 2,000
and dividends 1,500 (500 qualified): line 4c 3,000, deduction 3,000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit a4053742df715886a3c61c1151df5388dc30ced5)
…stributions

A nonqualified Roth IRA distribution (code J) was nontaxable only with a
first-year contribution record or a full per-year Form 5498 inventory;
there was no input for the basis carried from prior years. A code J Form
1099-R can now carry roth_prior_contribution_basis (2025 Form 8606 line
22), and the taxable amount and the Form 5329 early-distribution amount are
the distribution over that basis (Form 8606 lines 22-25; Pub. 590-B
ordering rules). One basis per owner.

Synthetic regression: 8,644 against 16,500 basis: line 4a 8,644, line 4b 0,
Form 5329 early distribution 0; 20,000 against the same basis: 3,500 taxable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ccf55631b0360f4d665b0cc151b27d89d023d634)
The Form 8829 projection rejected any Schedule C with line 15 insurance
or Part V other expenses as a duplicated home expense, so an ordinary
business with an owned-home office could not compute. Those lines are
business expenses, not expenses of the home (Form 8829 instructions,
line 8 and lines 18-22; Schedule C instructions, lines 15 and 27a).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 5fe5308dc7190d1e21ec49e4e43541f33cd5e1e2)
auto_expense sends its Schedule C deduction as a top-level
line_9_car_truck_expenses, which no business row read, so the standard
mileage or actual-cost deduction was dropped and line 31 was too high.
Fold it into the sole business's line 9 (Schedule C instructions, line 9;
Rev. Proc. 2019-46 standard mileage), and refuse an ambiguous fold when
there are several businesses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 8dc5e2cad922253e143ef121805d94731bb60d00)
…line 6

auto_expense sends its Schedule E deduction as a top-level
expense_auto_travel, which no property row read, so it was dropped.
Fold it into the sole rental property's line 6 before computing and
carry the finalized rows to every reader (Schedule E instructions,
line 6; Rev. Proc. 2019-46 standard mileage). Several rentals need a
per-property route and are refused instead of guessed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0e0751b2273bdba68dc8865c56dee93c4bfe931b)
A rental with personal-use days deducted 100% of its expenses. IRC
280A(e)(1) and Pub. 527, chapter 5 (Dividing Expenses) allow only
rental days / total days used of each expense whenever there is any
personal use, whether or not the unit is a home under 280A(d). Each
expense line is divided before the 280A(c)(5) limit, the finalized rows
are marked expenses_are_rental_portion so they are not divided twice,
and a filer can set that flag when entering the rental share already.
Rows with a reviewed occupancy_percent split and units rented under 15
days (280A(g)) are left as they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit df2eb9fedaa03bbe5f893db84f9452b593aaf449)
…eals

Schedule C had one line_24b_meals amount at a single rate, so a business
with both ordinary meals (50%) and meals during DOT hours-of-service duty
(80%) could not be entered. Add line_24b_meals_dot_hours_of_service,
deducted at 80% (IRC 274(n)(3)) beside line_24b_meals at its own rate
(IRC 274(n)(1); Schedule C instructions, line 24b), through the node,
MeF, PDF, the owned-business filing and the Form 8863 cost inventory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ad2533ed0f38c594438a932144d6de2a027c17fc)
Form 8995/8995-A threw whenever a Schedule C met another QBI source, so
the deduction was lost. A per-business calculation now follows the 2025
Form 8995/8995-A instructions: Schedule A applicable percentage for
specified service businesses, Schedule C netting of current losses and the
prior-year carryforward against the positive businesses in proportion to
their QBI (a net loss carries forward), the per-business W-2 wage/UBIA
limit and phase-in, the REIT/PTP component, and the 20% taxable income
limit. Partnership K-1s now send one row per business (box 20 code Z QBI,
W-2 wages, UBIA, specified-service flag); the Schedule C share of the SE
tax deduction reduces its QBI. A Form 8582 suspended loss is placed on a
single K-1 loss row.

The route applies to K-1 rows with another source, a loss or a specified
service business, and to fully allowed Schedule C losses the bounded route
cannot identify for filing; other mixes keep their existing routes. MeF
and printed Form 8995 refuse this route until its business rows have a
projection. Not covered: S corporation K-1 rows, Schedule F and Schedule E
trade-or-business rows, and allocating health insurance or retirement
deductions to businesses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 9f671ebce8a496b241d7f9f1050e7e83ed6b2ed8)
…hrowing

Form 8995 threw "net QBI loss needs a sourced carryforward filing route"
when Schedule C, F, E or K-1 QBI netted below zero outside the bounded
routes, so the return lost its QBI result. The 2025 Form 8995
instructions (lines 2-5 and 16) give no QBI component and carry the net
loss forward; REIT/PTP dividends still deduct. A loss disallowed under
section 461(l) is QBI only in the year it is allowed, so it is excluded
from the current-year loss, including on the multi-source route. Filed
Form 8995 loss routes keep precedence over the multi-source route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 9206ea1f82c5fa93a95aa0e74bb9c30934558502)
Form 8995-A line 28 threw unless the return had one identified business
and a single REIT-only 1099-DIV of 1,500 or less. Line 28 is the total
qualified REIT dividends (1099-DIV box 5) held past the 45-day period
(Reg. 1.199A-3(c)(2)(ii); 2025 Form 8995-A instructions), so the general
calculation now takes any number of reviewed funds, including mixed funds
whose box 1a exceeds box 5, when their box 5 total matches line 28. The
single-business filing route and MeF export keep the one-fund rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 3bfb79a380e37cad7b4fffc30499669535a3901d)
…orm 4952 by default

1099 interest and dividends now reach Form 4952 as default sources on every
return, so the hint can't treat any Form 4952 entry as the expense already
being entered there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed Form 4952

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s feed Form 4952 by default"

This reverts commit 133f10f.
@a7ul
a7ul merged commit 3add1ba into main Oct 19, 2026
1 check passed
@a7ul
a7ul deleted the codex/eval-fixes-round2 branch October 19, 2026 17:02
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.

1 participant