Repository navigation
Explain migration for the removed couple carer-premium parameter - #2451
Merged
Merged
Conversation
vahid-ahmadi
left a comment
Collaborator
There was a problem hiding this comment.
Looks right, fine to approve.
@juaristi22, this is a small, correct change. Main already resolves each removed path's parent from the path itself, so the one new REMOVED_PARAMETERS entry is all the fix needs. The message points to the right replacement: carer_premium.single is the per-person amount, and carer_premium.py:73 pays it once for each qualifying claimant or partner.
- nit,
policyengine_uk/utils/parameters.py:163: #2490 also edits this file. I merged the two branches locally and they merge cleanly. Whichever lands second should still rerun this test file.
What I checked
- Read the issue, the PR body and the full diff. Read
add_removed_parameter_aliaseson main and confirmed it already walks the parent path. - Ran
pytest policyengine_uk/tests/test_removed_carer_premium_parameter.py: 6 passed. Withutils/parameters.pyreverted to main: 5 failed, 1 passed (the valid-reform control). ruff checkandruff format --checkon both changed Python files: clean.- Hosted CI on 413de23 is green.
- Process: the changelog fragment is
.fixed.md; the Reproducer and axiom lines are present; the Fix evidence check is green. - Not checked: the policyengine.py or API layers that read the parameter tree.
🤖 Generated with Claude Code
vahid-ahmadi
approved these changes
Oct 18, 2026
vahid-ahmadi
left a comment
Collaborator
There was a problem hiding this comment.
Approving, per my review above. The shoulds and nits can follow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2137
Saved reforms and Scenarios that set the removed
gov.dwp.carer_premium.coupleparameter now receive migration directions naminggov.dwp.carer_premium.single, the per-person weekly amount. They previously failed with a bare lookup error.Register the removed path with the existing generic alias installer. Valid per-person reforms and the State Pension/OBR migration aliases retain their behavior; no benefit formula, policy value or alias-installation function changes.
Validation: 179 focused tests passed (6 new regressions and 173 existing migration, reform, Scenario and carer controls). Before the change, the new regressions produced 5 failures and 1 passing control.
make format, Ruff andgit diff --checkpassed. The tests cover the public entry points, correct alias parent, hidden removed-parameter metadata and valid replacement reforms.Local Python 3.13.14 / Core 3.32.27 differs from locked Core 3.33.2. Full
make test, documentation builds and private-data simulations were not run for this diagnostic-only registry change; hosted full CI remains required.Reproducer: policyengine_uk/tests/test_removed_carer_premium_parameter.py::test_removed_carer_premium_reforms_give_migration_directions
axiom: n/a: migration diagnostics only; no policy provision, parameter value or benefit calculation changes.