Conversation
…ew of #2018) - Document that the input must be countable capital (after Sch V disregards and reg 19 valuation), that it replaces every capital source, that capital source reforms do not reach a unit that records it, and that any negative value means none recorded; drop the unsupported "no one else's" from s.5. - Say why an unrecorded unit's proxy is not reduced by another unit's recorded capital (unlike uc_assessable_capital). - Monotonicity: the guarantee credit never rises with reported capital; total entitlement only where all income is savings credit qualifying. Pin the intended SPCA s.3 exception (contributory ESA: +20p a week per 500 pounds). - Locality gets its own strategy so a leak into the other unit would show. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #2018, which merged before its independent review came back. This PR applies that review (Opus 5.5 via Subfleet, REQUEST_CHANGES on wording only). The review confirmed the code: the -1 default is a no-op, the sentinel stays negative under uprating, and the nine YAML expectations are correct by hand.
Changes (docs and tests only; no formula changes)
A stated invariant was false. Let a dataset supply each benefit unit's own Pension Credit capital #2018 claimed that entitlement never rises with reported capital. Under SPCA 2002 s.3 it can:
The property now asserts that the guarantee credit never rises, and that total entitlement never rises where all income qualifies (the generated households have no excluded income). The counterexample is pinned as a labelled intended exception.
Documentation of
pension_credit_reported_capitalnow says:corporate_wealthand the Lifetime ISA;pension_credit_assessable_capitaldocuments a deliberate difference fromuc_assessable_capital. Another unit's recorded capital is not subtracted from the household capital an unrecorded unit's proxy shares, because the two come from different measures.The other difference: this input is uprated with
savings, whileuc_reported_capitalis not.Locality test. The reviewer found that only 2 of the 17 two-unit draws could detect a leak. It now has its own strategy: the other unit always has someone over State Pension age, records nothing, and shares non-zero household capital. The test asserts that unit's capital is positive before comparing.
Nit: the YAML header's "(2025: 52 weeks a year)" now reads "times 52 weeks a year".
Not changed here (follow-ups)
uprating_factors.csvif needed.Tests
tests/test_pension_credit_reported_capital_properties.py: 5 passed (the strengthened locality and monotonicity properties, plus the pinned exception).pension_credit_reported_capital.yaml: 9 passed.ruff formatandruff checkare clean.Impact
None. Only documentation and tests change.
axiom: n/a: documentation and tests only
🤖 Generated with Claude Code