Skip to content

feat(ty2026): PDF export for Form 1040 and Schedules 1, 2, 3 on the IRS 2026 drafts - #161

Merged
a7ul merged 20 commits into
mainfrom
ag41-ty26-pdf-scope
Oct 19, 2026
Merged

a7ul merged 20 commits into
mainfrom
ag41-ty26-pdf-scope

Conversation

@a7ul

@a7ul a7ul commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

TY2026 PDF export used to be refused for every return. It now fills Form 1040 and Schedules 1, 2 and 3 on the IRS 2026 drafts (irs.gov/pub/irs-dft). The PDFs keep the IRS "DRAFT — DO NOT FILE" watermark, and both the PDF and the CLI say to file the MeF XML.

  • Where the PDFs come from: same as 2025. They are fetched at runtime, cached in .pdf-cache and checked against a pinned SHA-256. No PDFs are committed. If the IRS reposts a draft, export fails on the digest until the mapping is reviewed.
  • 2025 → 2026 layout changes:
    • 1040: two new citizenship questions (left blank). Line 12f added. Lines 13a and 13b swapped. Line 24 became 24a/b/c and line 32 became 32a/b/c; 24c and 32c print the same as 24a and 32a. Every page-2 field shifted. The line 28 opt-out box is gone.
    • Schedule 3: line 5b is reserved, and a new line 13e moves lines 14 and 15.
    • Schedule 2: Part II is regrouped into 2026 lines 4–21. The new subtotals are computed, the Form 8959 and Form 5329 taxes are split across lines, and line 21 is checked against the 2025 total.
  • Code:
    • The 2026 overlays in forms/f1040/2026/pdf/ reuse the 2025 projections and rename only the fields that moved.
    • The shared builder now takes the tax year.
    • The 2025 PDF modules are loaded when an export runs, because importing them up front crashed the compiled binary (__promiseAll is not defined, Bun 1.4.2).
  • Still refused for TY2026, each with a named message:
    • Any other form; its 2025 template is named in the message.
    • 1040 lines 27a–30, which need Schedule 3-A.
    • Schedule 2 line 13z and Schedule 3 line 5b.
    • The rest of the 1040 set (Schedules 1-A, A–E and SE, Forms 8863, 8889, 8995 and 2441) is the next batch. Schedule 8812 has no 2026 draft yet.
  • The release smoke now also exports a TY2026 W-2 return as PDF. It uses --force, because the IND-002 and IND-689-01 filing-date rules reject TY2026 until the 2027 processing year.

Verification

  • check:structure, check:sandbox, check:cases, test:unit, check:cli and check:oracle pass.
  • test:forms: no new failures.
  • check:mef: 373/374.
  • check:ty2026: 231/374.
  • The release smoke passes, including the new TY2026 PDF.
  • bench f1040 2025: 22/109.
  • New tests in forms/f1040/2026/pdf/builder.test.ts run pdftotext and check key lines on each form, refuse an unmapped form by name, and check that every mapped field exists on its pinned template.

Not verified

  • The PDFs were checked as pdftotext output only, not visually.
  • The drafts may still change before the final forms are released.
  • test:forms and the MeF, CLI and oracle checks ran before the last two commits (the lazy-load fix and the smoke update); CI covers them.
  • The Form 8959 and 5329 Schedule 2 splits are not tested end to end, because those forms are still refused.

Generated by Claude Code

claude added 20 commits October 19, 2026 09:24
…urn's context

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sm4GSdgHFQ4sJqLdRaK6pQ
… context

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sm4GSdgHFQ4sJqLdRaK6pQ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sm4GSdgHFQ4sJqLdRaK6pQ
…rn's year

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sm4GSdgHFQ4sJqLdRaK6pQ
…return's year

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sm4GSdgHFQ4sJqLdRaK6pQ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sm4GSdgHFQ4sJqLdRaK6pQ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sm4GSdgHFQ4sJqLdRaK6pQ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sm4GSdgHFQ4sJqLdRaK6pQ
…the return year

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sm4GSdgHFQ4sJqLdRaK6pQ
@a7ul
a7ul merged commit a82a3b2 into main Oct 19, 2026
1 check passed
@a7ul
a7ul deleted the ag41-ty26-pdf-scope branch October 19, 2026 11:37
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