Skip to content

fix: update SCP baby bonus reform to use Person-level variable#1481

Merged
MaxGhenis merged 1 commit intomainfrom
fix/scp-reform-person-level
Jan 17, 2026
Merged

fix: update SCP baby bonus reform to use Person-level variable#1481
MaxGhenis merged 1 commit intomainfrom
fix/scp-reform-person-level

Conversation

@vahid-ahmadi
Copy link
Collaborator

@vahid-ahmadi vahid-ahmadi commented Jan 17, 2026

Summary of Changes

File Change
scottish_child_payment_reform.py Updated to use Person entity (matching base variable)
in_effect.yaml Now true starting 2027-04-01 (was false forever)
baby_bonus.yaml Bonus is £0 before 2027-04-01, £12.85 after
scottish_child_payment_baby_bonus.yaml Tests updated to use 2028, added test for pre-effective date
changelog_entry.yaml Added note about effective date fix

Key Fixes

  1. Structural reform pattern: Reform now properly uses Person-level variable with is_scp_eligible and would_claim_scp (was incorrectly using BenUnit entity). Reform entity type must match base variable entity type - verified against other reforms (CB_HITC, marriage_allowance) which all follow this pattern.

  2. Effective date: Policy only takes effect from fiscal year 2027-28 (April 2027) per the Scottish Budget 2026-27:

    We will begin work in 2026-27 to introduce an additional payment for children under 1... which will be paid in 2027-28.

Test plan

  • Run policyengine-core test policyengine_uk/tests/policy/reforms/scp_baby_bonus -c policyengine_uk
  • Verify reform correctly applies £12.85/week bonus for under-1s (2028+)
  • Verify pre-2027 periods get standard rate only

🤖 Generated with Claude Code

@vahid-ahmadi vahid-ahmadi self-assigned this Jan 17, 2026
The scottish_child_payment variable was refactored from BenUnit to Person
entity, but the baby bonus reform was not updated to match. This caused
a mismatch where applying the reform would try to replace a Person-level
variable with a BenUnit-level variable.

Changes:
- Update reform to use Person entity instead of BenUnit
- Use parameterized baby_bonus rates instead of hardcoded values
- Leverage is_scp_eligible and would_claim_scp variables
- Fix effective date to 2027-04-01 (fiscal year 2027-28) per Scottish Budget
- Add unit tests for the reform

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vahid-ahmadi vahid-ahmadi force-pushed the fix/scp-reform-person-level branch from 489332c to 28031c0 Compare January 17, 2026 18:15
@MaxGhenis MaxGhenis merged commit 6b3d463 into main Jan 17, 2026
2 checks passed
@MaxGhenis MaxGhenis deleted the fix/scp-reform-person-level branch January 17, 2026 18:33
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