Conversation
Since #1896, UC counts income only for the claimant, partner and UC children, and presumes an adult under 20 who is 16 or more years younger than another to be their child. The capital-income property test's single-count expectation summed every member's listed income, so a family aged 19 and 57 failed (model £0, expected £1,000), though CI's 10 fixed examples never drew one. Set is_claimant_or_partner True for generated adults and False for children, as 207e225 did for other fixtures, here and in the State Pension property test, whose 18- or 19-year-old partner draws had stopped testing a mixed-age couple. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
The capital-income property file passes at 60 examples on head 9ab7554: 4 passed, 1 xfailed (the strict #1942 marker), in 20 min. That run used a copy of the file with 🤖 Generated with Claude Code |
Collaborator
Author
|
The State Pension property file also passes on head 9ab7554: 4 passed, 1 xfailed, in 4 min 40 s locally. The first CI 🤖 Generated with Claude Code |
This branch has not been deployed
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.
Summary
This fixes a latent flake in two property tests: the one that #1950 added and the State Pension test inverted while landing #1950.
Since #1896,
uc_unearned_incomecounts income only for the claimant, the partner and UC children. Without relationship inputs, the model presumes that an adult under 20 who is at least 16 years younger than another adult is that adult's child.The capital-income property test's single-count expectation summed every member's listed income. So for a family aged 19 and 57, with £1,000 of private pension on the 19-year-old:
A family aged 25 and 57 agrees at £1,000. CI stayed green only because its 10 fixed Hypothesis examples never draw such a family; at 60 examples they do. The independent review of #1950's final head found this.
The fix is in the test fixtures only. Generated adults get
is_claimant_or_partner = Trueand childrenFalse, as the FRS supplies it. That follows the pattern of 207e225 for the other UC and CTR property fixtures, and it is applied in:test_uc_income_from_capital_properties.py, where the 19-and-57 family failed before and passes after;test_uc_state_pension_properties.py, where an 18- or 19-year-old "partner" draw was presumed the pensioner's child, so those draws had stopped testing a mixed-age couple.Tests
Impact
Tests only. The diff touches two test files and a changelog fragment, and no model code, so model outputs are unchanged.
axiom: n/a, test fixtures only.
🤖 Generated with Claude Code