Repository navigation
Conversation
108290a to
e70d955
Compare
|
Corrected the existing disabled-worker test to expect (£20 + £17.10) × 52 = £1,929.20 and removed its obsolete known-limitation description. No formula, parameter or input changes. The altered earnings-disregard YAML file passed 30 tests; the special-disregard file passed 6 tests, sequentially. Formatting/lint and git diff --check passed. No full suite or CI polling. Dependent branches were not rewritten; preserve this correction when rebasing them. |
|
Parent-gated build hand-off. Head remains Tests for this child: 0 executed in this job; no claim is made about the current head's CI. Preserve Anthony's corrected disabled-worker earnings-disregard regression (£1,929.20) when updating the base. Draft status unchanged; no merge/readiness/closure action. Once #2211 lands, the pending commands are: git fetch origin main add-hb-special-disregard
git switch add-hb-special-disregard # create tracking branch if absent
git merge --no-ff origin/main
# Resolve, run focused foreground tests with -n 2 after load1 <=110 and
# os.statvfs available disk >=55 GB decimal; commit fixes and push once.
gh api -X PATCH repos/PolicyEngine/policyengine-uk/pulls/2225 -f base=mainOpen items: parent landing; merge/test/push/body refresh as needed; retarget; hub independent review. #2219 remains gated on this PR's landing. |
juaristi22
left a comment
There was a problem hiding this comment.
Reviewed at 6e68f23fafef3a1e0a1718bd5d1e4bc0fa860c72. No actionable findings from independent policy/source and code reviews of the special earnings-disregard component.
The GB and NI schedules support the automatic £20 routes, lone-parent precedence and documented externally assessed residual route. The new amount replaces the ordinary selection rather than stacking it.
Validation: 36 focused tests passed. A 70-year-old blind pension-age claimant with actual earnings, pension and rent selects £1040 rather than the £260 ordinary control, raising final HB from £3884.66 to £4391.66, exactly £507. Qualification and eligibility were not forced. The input-contract boundaries and parent merge order remain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three property tests that predate this PR assumed the £5/£10/£25 standard disregards only. The PR is a draft, so CI had not run them: - test_pension_age_and_working_age_schedules_agree compared the two schedules for every family. The special £20 routes differ by design (working age: a disability or severe disability premium; pension age: receipt of a listed benefit, blindness or a carer premium), so the test now compares the disregards only where the model's eligibility flag agrees, and asserts that the flag agrees for every family with no disabled adult. - test_differential_against_the_old_flat_formula now expects min(£20 x 52, net earnings) for a qualifying single person or couple; a lone parent keeps £25. - The para 18 differential's statutory reference now takes the para 3 special £20 from the model's eligibility flag, as it already takes the para 17(2) work condition. test_housing_benefit_earnings_disregard_properties.py tests the flag itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Aggregate impact on certified data: passBase Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 0 (thresholds in Notes
Moves flagged for reviewNone. Spending by benefit and service
Caseloads
Government balance, each component counted once
Model totals
Household income totals
Inequality
Mean household net income in each side's own deciles
Standard reform costings (change in gov_balance)
Standard reforms: change in each reform's target
Household net income by decileMean change in household net income per household, and as a share of the decile's base income; households stay in the base run's deciles.
No change in any year: receipts by tax head; population; poverty rates; people in poverty. Checks failing on both base and head (1)
Counted-once checkEach of 88 components was raised by £1 per unit in 2026-27, and every head of its totals was read household by household: its own head must rise by exactly £1, no other tax head may move, no other benefit may rise, and the model's own total must move by what its heads moved. A head that breaks a rule is measured again twice: with every other head held at its baseline value, and with every other head held at its value after the first £1 while the component rises again. It fails where either still shows the response. 0 failed; 0 were skipped.
Provenance
Dataset: Receipts by tax head: head levels
Spending by benefit and service: head levels
Caseloads: head levels
Government balance, each component counted once: head levels
Model totals: head levels
Household income totals: head levels
Population: head levels
Poverty rates: head levels
People in poverty: head levels
Inequality: head levels
Mean household net income in each side's own deciles: head levels
Standard reform costings (change in gov_balance): head levels
Standard reforms: change in each reform's target: head levels
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Include SDA and disability-related WTC, retain claimant/partner boundaries, and pin the selected standard directly alongside GB/NI receipt regressions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply lone-parent and special precedence and pin the 18/34 couple and disabled single regressions with explicit roles inherited from main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test every family with eligibility held false and true, independently assert natural eligibility, freeze the special amount, and check selected-standard bounds and statutory precedence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
r1 fixes are committed at
Validation on this head: 44 changed YAML tests passed; 367 full HB YAML tests passed; 147 Python tests passed ( Two mutations killed under Still pre-assessed/unmodelled: long-term IB status; prescribed mobility supplements; main-phase ESA, assessed/excepted LCW/LCWRA and incapacity duration; protected earlier awards/continuity; unverified Scottish PADP/SADLA/ADP mappings; existing working-age history/occupation and partial person/job earnings allocations. The existing changelog covers these fixes. PR stays draft. CI reruns have started (Code changes, Aggregate impact); no new local population-impact claim is made. The axiom line is retained. Main advanced during the resource wait; a final read-only merge-tree against |
The cross-module property reads special eligibility from the model, so a regression that made a disabled working-age single ineligible would still pass it. A deterministic test now asserts eligibility and the £1,040 standard directly (no hours, so no additional sum; tax credits have ended by 2026, so the working tax credit route is off). The eligibility docstring now names the working-age premium route too, and the Housing Benefit property docstring notes that its pension-age "not special" check relies on YEAR falling after tax credits end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #2224
Adds the approved £20 Housing Benefit special standard earnings disregard. It replaces £5/£10 rather than stacking with them, preserves lone-parent precedence, caps the deduction at net earnings and participates in the additional-disregard threshold.
Automatic routes distinguish the statutory regulation set: working-age disability/severe premiums; pension-age qualifying benefit receipt (including SDA and an actual WTC award with either disability element), blindness or carer premium, restricted to claimant/partner. Other full-amount cases can use the single pre-assessed Boolean. Existing premium qualification approximations are inherited, not audited or expanded here.
Important boundary: working-age carer/occupation provisions can restrict the deduction to a particular person's/job's earnings. A supplied Boolean must establish that the full amount is legally available across the unit's earnings. Category membership alone does not suffice. Partial allocations below £20 are not reconstructed. Pension paragraph 5 routes still requiring pre-assessment are long-term Incapacity Benefit status, prescribed war/personal-injury mobility supplements, main-phase ESA, continuous incapacity, assessed/excepted LCW or LCWRA, and protected earlier awards with eight-week continuity. Scottish PADP/SADLA/ADP mapping to existing receipt categories is unverified. The false fallback can omit qualifying awards. No verified dataset mapping for residual pre-assessment.
Government references are embedded in the monetary parameter and all formulas: GB working-age Schedule 4, GB pension-age Schedule 4, NI working-age Schedule 5, NI pension-age Schedule 5. The £20 amount is not CPI-uprated.
The full-amount pre-assessment remains a single Boolean input; no occupation/history flag matrix.
Validation at
1db09c3e86b670b44aa35775de71b40d20918c55(review fixes on top of a clean merge of maine54d354f6):housing_benefitYAML directory: 367 passed.pytest -n 4 policyengine_uk/tests/test_housing_benefit*.py policyengine_uk/tests/test_council_tax_reduction_pensioner_earnings_disregard_properties.py: 147 passed, using the existingcloned_uk_tax_benefit_systemfixture for independent model state without repeated source loading. This includes the formerly failing cross-module oracle, independent natural eligibility, both ages with eligibility fixed false and true, the £20 freeze, and direct selected-standard bounds/precedence with 72 explicit boundary combinations.run_capped.py --rss-gb 2: selection order (1 failed / 13 passed) and net-earnings cap (3 failed / 11 passed). Both isolated clones returned YAML exit 1, with successful harness exits. Paragraph 17 special-term mutation was not run: 25 five-minute resource checks over 2:00:41 found only 39.54–50.84 decimal GB free (final 40.48 GB), below the required 52 GB. The idle wait was stopped; no paragraph 17 mutant/test process launched and no kill is claimed.make format,uvx ruff format --check .(1,984 files), andgit diff --checkpassed.Python 3.13.9; core 3.33.2, pytest 9.1.1, Hypothesis 6.169.0 and xdist 3.8.0 match
uv.lock. All local test commands were gated by load1 ≤110 and at least 52 decimal GB free disk. No full repository suite or local population simulation was run; the focused checks cover this change. Hosted CI reruns have started on this head; these local results do not establish its outcome.Reproducer: policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/applicable_income/housing_benefit_special_disregard.yaml
Impact: the Aggregate impact report at head
05246aa1d(merge commit1ed307fa49againsteb0b8087d8, onenhanced_frs_2024_25.h5from policyengine-uk-data 1.58.1) passes with no flagged moves. Housing Benefit spending rises by £0.1m a year from 2025-26 to 2028-29 and is unchanged from 2029-30 to 2031-32. Household net income moves by the same amount and the government balance falls by it. No check breaks; one check fails on both sides.Main advanced during the disk wait. A final read-only
git merge-tree --write-tree HEAD origin/mainagainsteb0b8087d821b92d4faa75cf51a92d15aa2a3c45exited 0. The local test results above are for the pushed head with its setup-time main merge.Merge dependency: merge before the permitted-work and childcare/accommodation composition, preserving each later replacement and calculation.
axiom: TheAxiomFoundation/rulespec-uk#375 queued
The special and permitted-work earnings disregards extension to rulespec-uk#375, with the law, required outputs and companion tests: TheAxiomFoundation/rulespec-uk#375 (comment) (UK hub, 24 Oct).