Repository navigation
Stop deciding a household's UC health element rate by its position - #2251
Merged
Merged
Conversation
The UC rebalancing modifier gave the new-claimant LCWRA rate by a seeded draw over every benefit unit in a simulation, situations included, so a household's award depended on its position among the others (5 of 40 identical households in one situation got £217.26 on main) and no situation could state the claimant's status. Add uc_receives_new_claimant_health_element (benefit unit, default false). A supplied value is used as given; data without one keeps the seeded draw, recorded as an input; a situation without one gets the protected amount. Microsimulation results are unchanged. Fixes #2250 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Address the review of #2251: - Look the status up with sim.get_array, which reads the simulation's branch and the branches it inherits from; the holder's get_array read only the default branch, so a branch-supplied status was ignored. A new test sets a branch's status, checks the branch and a nested branch get the new-claimant rate and the parent is unchanged; it fails on the old lookup. - uc-rebalancing.md: the seeded draw applies only to data without a supplied status; situations default to the protected amount and can set the status per year. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
fix-uc-health-claim-status
branch
from
October 10, 2026 12:13
fa87c3c to
af865c6
Compare
MaxGhenis
marked this pull request as ready for review
October 11, 2026 13:17
Collaborator
Author
|
Merging on the gates.
🤖 Generated with Claude Code |
This was referenced Oct 11, 2026
MaxGhenis
added a commit
that referenced
this pull request
Oct 11, 2026
Main push runs were cancelled when a newer commit landed, so 83001d5 and cfa0c55 never finished a Test on 11 October, and a conflict between #2251 and #2270, each green alone, showed only at 7343f94. Remove the main push workflow's concurrency group so every merged commit finishes its run. pr_code_changes.yaml also runs on merge_group, so a merge queue on main can require the same checks and test each pull request merged onto the latest main before it lands; the Changes job compares a group with the main it merges onto. Main then moves only to a commit the queue tested, so the main push workflow's new Tested job skips the suite for a commit that already has a passing "Test / Result" check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 11, 2026
MaxGhenis
added a commit
that referenced
this pull request
Oct 11, 2026
Brings in #2258 (120-minute Test job), #2180 (NICs thresholds indexed by September CPI after 2030-31), #2063 (salary sacrifice needs pay), #2038 (winter payments to the member a benefit is paid to), #2259, #2248, #2251, #2262, #2266, #2270, #2285, #2288, #2294 and #2021. Conflict: test_legacy_award_readers_properties.py imports. Kept both hypothesis.event (this branch's screened-out events) and hypothesis.example (#2294's found families). The rest of the file merged cleanly: #2294's without/silent/with-other comparison, the severe disability premium bound and the held benefit cap sit alongside this branch's work generators, screened reference and outside-member tests. Two comments now say the ESA and JSA readers also read the members' work. _legacy_award_payee.py merged cleanly: #2038's can_claim (Pension Credit) and this branch's own_report_is_paid are independent. The shared NI parameters already match main (#2058); #2180 changes only 2031-32 onward. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 11, 2026
This was referenced Oct 11, 2026
Relieve pension contributions to relevant earnings and charge the annual allowance excess once
#2240
Open
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 #2250
Stacked on #2248, the protected LCWRA amount; the diff below is relative to it. Retarget to
mainonce #2248 merges.What was wrong
add_universal_credit_reformgave the new-claimant LCWRA rate by a seeded draw over every benefit unit in a simulation, household situations included:The law
UC Regs 2013 reg. 36 gives the new-claimant rate to claimants other than a pre-2026, severe conditions criteria or terminally ill claimant. That is a fact about the claimant, which a household calculation should be able to state.
Changes
uc_receives_new_claimant_health_element(new, benefit unit, bool, default false).uc_reform.pydecides the status per year in_new_claimant_health_element_status, reading the simulation's own branch (sim.get_array):Invariants (tested)
Tests
test_uc_rebalancing.py:test_household_award_does_not_depend_on_its_position(40 households). On main, the same check finds 5 of 40 at £217.26.test_new_claimants_use_fixed_health_elementnow states the status rather than forcing the draw.test_data_without_a_status_keeps_the_seeded_drawandtest_data_that_supplies_the_status_overrides_the_drawuse in-memory datasets.test_a_branch_can_state_its_own_status: a branch's status, and a nested branch's inherited status, give the new-claimant rate while the parent is unchanged. It fails on the default-branch lookup.Local runs:
test_uc_rebalancing.py,code_health/test_cached_arrays_not_written_in_place.pyandtest_income_support_esa_entered_directly.py: 71 passed.Impact
None in microsimulation. Household situations without the status now always get the protected amount; previously about 11% of benefit units got the new-claimant rate in 2026, depending on position.
axiom: n/a: input plumbing, and no rule or amount changes. rulespec-uk
uk/regulations/uksi/2013/376/36.yamlalready takes the claimant's pre-2026 status as an input (claimant_is_pre_commencement_lcwra_claimant).🤖 Generated with Claude Code