Skip to content

Add AOTC student eligibility inputs#8170

Open
MaxGhenis wants to merge 2 commits intoPolicyEngine:mainfrom
MaxGhenis:codex/fix-aotc-eligibility
Open

Add AOTC student eligibility inputs#8170
MaxGhenis wants to merge 2 commits intoPolicyEngine:mainfrom
MaxGhenis:codex/fix-aotc-eligibility

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis commented Apr 28, 2026

Summary

  • add lower-level American Opportunity Credit eligibility inputs for the statutory student, documentation, institution, identification, residency, improper-claim, and filing-status predicates
  • compute is_eligible_for_american_opportunity_credit from those predicates instead of leaving it as an unpopulated input
  • model the section 25A(g)(1) identification transition: TINs through 2025, qualifying SSNs for tax years beginning after December 31, 2025
  • gate Form 1098-T/payee-statement and institution-EIN requirements with time-varying AOTC eligibility parameters instead of hardcoded formula years
  • update AOTC variable and parameter references to statute sources

Primary sources

  • 26 U.S.C. § 25A for AOTC amount, eligible-student limits, first-four-years, prior claim years, felony drug conviction, eligible institution, identification, 1098-T/payee statement, institution EIN, nonresident-alien, improper-claim, MFS, and refundability rules
  • 20 U.S.C. § 1091(a)(1), incorporated by 26 U.S.C. § 25A(b)(3)(A), for the recognized-credential enrollment rule
  • 26 U.S.C. § 24(h)(7), incorporated by 26 U.S.C. § 25A(g)(1)(C) for years beginning after December 31, 2025, for the qualifying-SSN definition
  • 26 U.S.C. § 6013(g)-(h), referenced by 26 U.S.C. § 25A(g)(7), for resident treatment elections relevant to the nonresident-alien disallowance

Tests

  • uv run ruff format policyengine_us/variables/gov/irs/credits/education/american_opportunity_credit policyengine_us/parameters/gov/irs/credits/education/american_opportunity_credit policyengine_us/tests/policy/baseline/gov/irs/credits/education/american_opportunity_credit && uv run ruff check policyengine_us/variables/gov/irs/credits/education/american_opportunity_credit policyengine_us/parameters/gov/irs/credits/education/american_opportunity_credit policyengine_us/tests/policy/baseline/gov/irs/credits/education/american_opportunity_credit
  • uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/irs/credits/education -c policyengine_us

Follow-up data PR: PolicyEngine/policyengine-us-data#843

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.47%. Comparing base (8675371) to head (ddf1767).
⚠️ Report is 103 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main    #8170      +/-   ##
===========================================
- Coverage   100.00%   94.47%   -5.53%     
===========================================
  Files            3       18      +15     
  Lines           39      199     +160     
  Branches         0        2       +2     
===========================================
+ Hits            39      188     +149     
- Misses           0       10      +10     
- Partials         0        1       +1     
Flag Coverage Δ
unittests 94.47% <100.00%> (-5.53%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

@MaxGhenis MaxGhenis force-pushed the codex/fix-aotc-eligibility branch from 4cb43ae to 37bf0fb Compare April 28, 2026 13:39
@MaxGhenis MaxGhenis force-pushed the codex/fix-aotc-eligibility branch from 37bf0fb to 605ddc3 Compare April 28, 2026 16:01
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