Skip to content

Pin UC vs Housing Benefit mutual-exclusion contract (#201)#1638

Merged
MaxGhenis merged 1 commit intomainfrom
uc-legacy-mutex-test-201
Apr 20, 2026
Merged

Pin UC vs Housing Benefit mutual-exclusion contract (#201)#1638
MaxGhenis merged 1 commit intomainfrom
uc-legacy-mutex-test-201

Conversation

@vahid-ahmadi
Copy link
Copy Markdown
Collaborator

Summary

Why this is the right scope

Other legacy benefit consistency is already enforced by:

The HB ↔ UC exclusion is the only live "code-level" consistency check. That's what this test pins.

Test plan

  • policyengine-core test policyengine_uk/tests/policy/baseline/finance/benefit/family/uc_legacy_mutual_exclusion.yaml -c policyengine_uk — 2/2 pass.
  • make format clean.

🤖 Generated with Claude Code

Add yaml regression tests for `housing_benefit_eligible` exercising
the `& ~claiming_uc` clause that prevents a benunit on Universal
Credit from also being eligible for Housing Benefit. The contract
already holds today via the explicit guard in the eligibility
formula, but nothing pinned it as a test, so a future refactor
could silently allow simultaneous UC + HB awards.

Other legacy benefit consistency is enforced via:
- Reported anchors (`jsa_income`, `esa_income` only pay reported
  amounts, so unreported families don't double-up with UC).
- `active.yaml` flags shutting Tax Credits, Income Support and
  income-based JSA off post-managed-migration (PRs #1619, #1631).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@MaxGhenis MaxGhenis left a comment

Choose a reason for hiding this comment

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

Pure regression-test addition pinning the existing housing_benefit_eligible UC-exclusion contract. No logic change. Approving.

@MaxGhenis MaxGhenis merged commit 858fff8 into main Apr 20, 2026
8 checks passed
@MaxGhenis MaxGhenis deleted the uc-legacy-mutex-test-201 branch April 20, 2026 11:24
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.

Check for consistency between UC and legacy benefit claims_* variables

2 participants