Skip to content

Fix Georgia retirement exclusion capital loss handling#7955

Open
PavelMakarchuk wants to merge 1 commit intomainfrom
fix/ga-retirement-capital-loss
Open

Fix Georgia retirement exclusion capital loss handling#7955
PavelMakarchuk wants to merge 1 commit intomainfrom
fix/ga-retirement-capital-loss

Conversation

@PavelMakarchuk
Copy link
Copy Markdown
Collaborator

Summary

Fixes #7951.

Georgia's retirement income exclusion was using raw person-level capital_gains, which let unlimited capital losses wipe out the exclusion. It also summed earned income and other retirement income in one bucket, even though Schedule 1 Page 2 floors those amounts separately before applying the age-based cap.

Changes

  • add ga_retirement_exclusion_countable_capital_gains, backed by federal loss-limited person capital gains
  • update retirement exclusion sources to use the loss-limited capital gains input instead of raw capital_gains
  • refactor ga_retirement_income_exclusion_retirement_income to match the worksheet:
    • floor countable earned income at zero
    • floor lines 6-13 income at zero
    • add the two floored amounts together
  • floor the final person exclusion at zero in ga_retirement_exclusion_person
  • add regressions for:

Why this structure

The durable fix is broader than swapping one source variable. Georgia Schedule 1 Page 2 treats earned income and the remaining retirement income sources as separate worksheet sections, each with its own zero floor, before combining them. Matching that structure prevents capital losses from incorrectly offsetting countable earned income.

Verification

  • python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/subtractions/retirement/ga_retirement_income_exclusion_retirement_income.yaml --batches 1
  • python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/integration.yaml --batches 1
  • python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/subtractions/retirement --batches 1
  • python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/gov/states/ga/tax/income --batches 1

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7955   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         3    +2     
  Lines           17        41   +24     
=========================================
+ Hits            17        41   +24     
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 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.

@PavelMakarchuk PavelMakarchuk marked this pull request as ready for review April 8, 2026 23:08
Copy link
Copy Markdown
Collaborator

@DTrim99 DTrim99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the Georgia retirement exclusion capital-loss fix. I did not find any actionable issues.

I checked the refactored retirement-income aggregate, the updated source list, the new loss-limited capital-gains wrapper, the per-person exclusion clamp, and the new regression coverage against the 2024 IT-511 Schedule 1 worksheet structure. The separation between line 5 earned income and line 14 non-earned retirement income matches the form.

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.

GA retirement income exclusion ignores federal capital loss limit

2 participants