Skip to content

Fix Pension Credit savings credit formula#1754

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/fix-savings-credit-standard-mg-20260604
Jun 4, 2026
Merged

Fix Pension Credit savings credit formula#1754
MaxGhenis merged 1 commit into
mainfrom
codex/fix-savings-credit-standard-mg-20260604

Conversation

@MaxGhenis
Copy link
Copy Markdown
Collaborator

Fixes #1753.

Summary

  • annualize the Savings Credit threshold in is_savings_credit_eligible
  • require qualifying income to exceed, not merely equal, the threshold
  • compute the maximum Savings Credit from standard_minimum_guarantee, not the full minimum_guarantee with additions
  • compute the amount-B reduction from pension_credit_income, while keeping savings_credit_income as qualifying income for amount A
  • add focused YAML tests for the annual threshold, standard-minimum cap, and amount-B income source

Validation

  • uv run ruff format --check policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/is_savings_credit_eligible.py policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/savings_credit.py
  • uv run ruff check policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/is_savings_credit_eligible.py policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/savings_credit.py
  • uv run policyengine-core test policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/savings_credit/is_savings_credit_eligible.yaml policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/savings_credit/savings_credit.yaml -c policyengine_uk -> 7 passed

This was identified by the Axiom UK State Pension Credit section 3 oracle comparison: TheAxiomFoundation/axiom-encode#533 and TheAxiomFoundation/rulespec-uk#11.

@MaxGhenis MaxGhenis merged commit 2e84114 into main Jun 4, 2026
9 checks passed
@MaxGhenis MaxGhenis deleted the codex/fix-savings-credit-standard-mg-20260604 branch June 4, 2026 20:35
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.

Savings Credit maximum should use the standard minimum guarantee

1 participant