Skip to content

Terminate clean-energy credits under Pub. L. 119-21#8901

Merged
MaxGhenis merged 2 commits into
mainfrom
codex/clean-energy-terminations
Jul 5, 2026
Merged

Terminate clean-energy credits under Pub. L. 119-21#8901
MaxGhenis merged 2 commits into
mainfrom
codex/clean-energy-terminations

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Summary

Applies the One Big Beautiful Bill Act (Pub. L. 119-21, the 2025 reconciliation law) terminations of four clean-energy tax credits.

  • Residential clean energy credit (IRC 25D, § 70506) — Sets the applicable percentage to 0 for expenditures made after 2025-12-31 and removes the now-dead IRA phasedown entries (2033: 0.26, 2034: 0.22, 2035: 0). The credit's formula already reads applicable_percentage, so no code change was needed.
  • Energy efficient home improvement credit (IRC 25C, § 70505) — Turns off in_effect at 2026-01-01 (property placed in service after 2025-12-31). The formula already gates on in_effect, so no code change was needed. The 25C(h) product-identification-number (PIN) requirement remains unmodeled — see Update section 25C energy efficient home improvement credit for current law #8703.
  • New and used clean vehicle credits (IRC 30D/25E, §§ 70502/70501) — Adds eligibility/in_effect parameters under clean_vehicle/new/ and clean_vehicle/used/ and gates the two eligibility variables (new_clean_vehicle_credit_eligible, used_clean_vehicle_credit_eligible) on them. Because the downstream credit, credit-limit, and potential variables are all defined_for the eligibility variables, gating eligibility to False zeroes the entire credit chain — no hardcoded values in formulas.

Clean vehicle acquisition-date caveat

The statute terminates the vehicle credits for vehicles acquired after September 30, 2025 (an intra-year date, confirmed against 26 U.S.C. §§ 25E(g), 30D(h)). PolicyEngine models annual periods, so this cutoff is approximated as the credit ending for tax years after 2025 (2026-01-01), rather than mid-2025. This is documented in both in_effect.yaml files and the two formula comments. It is not exact: vehicles acquired in Q4 2025 are treated as eligible here even though they are not under current law. Representing the intra-2025 cutoff exactly would require an acquisition-date input at sub-annual resolution (the adapter/design ask in #8760).

Tests

Added YAML tests asserting each credit is nonzero in 2025 and zero in 2026 (residential clean energy potential, EEHIC potential, and new/used clean vehicle eligibility), and updated the stale residential-clean-energy 2033 phasedown test (previously asserted 26%, now 0). Added changelog.d/clean-energy-terminations.fixed.md.

Ran locally against Python 3.14 (policyengine-core test ... -c policyengine_us):

  • residential_clean_energy: 5 passed
  • energy_efficient_home_improvement: 44 passed
  • clean_vehicle: 30 passed

Parameter tree loads cleanly; boundary values verified: 25D applicable percentage 0.3 (2025) → 0 (2026); 25C in_effect True (2025) → False (2026); new/used vehicle eligibility.in_effect True (2025) → False (2026).

Fixes #8694
Addresses #8703 (PIN requirement unmodeled)
Addresses #8760 (acquisition-date sunset approximated at annual resolution; adapter/design ask open)

MaxGhenis and others added 2 commits July 4, 2026 22:43
Apply the One Big Beautiful Bill Act (Pub. L. 119-21, 2025 reconciliation
law) terminations of four clean-energy tax credits:

- Residential clean energy credit (IRC 25D, section 70506): set the
  applicable percentage to 0 for expenditures made after 2025-12-31 and
  remove the now-dead IRA phasedown entries (2033/2034/2035).
- Energy efficient home improvement credit (IRC 25C, section 70505): turn
  off in_effect for property placed in service after 2025-12-31. The
  25C(h) product-identification-number requirement remains unmodeled.
- New and used clean vehicle credits (IRC 30D/25E, sections 70502/70501):
  add eligibility/in_effect parameters and gate the eligibility variables.
  The statutory cutoff is vehicles acquired after 2025-09-30; because
  PolicyEngine models annual periods, this is approximated as termination
  for tax years after 2025 (2026-01-01), documented in the parameters and
  formulas.

Add YAML tests asserting each credit is nonzero in 2025 and zero in 2026,
and update the stale residential-clean-energy 2033 phasedown test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pub. L. 119-21 sections: 70505 terminates the energy efficient home
improvement credit and 70506 the residential clean energy credit
(70501/70502 are the vehicle credits).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f9e58e7) to head (3d9c11d).
⚠️ Report is 69 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #8901   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         2    -1     
  Lines           55        44   -11     
  Branches         0         2    +2     
=========================================
- Hits            55        44   -11     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Update residential clean energy credit termination after Pub. L. 119-21

1 participant