Repository navigation
Count AFIP as attendance allowance in UC housing cost contributions - #2815
Conversation
… housing cost contributions UC Regs 2013 reg 2 defines "attendance allowance" to include armed forces independence payment, and Sch 4 para 16(2)(d) exempts a non-dependant who receives it. Add uc_receives_attendance_allowance, which applies the reg 2 definition through gov.dwp.universal_credit.attendance_allowance_benefits, read it in uc_non_dep_deduction_exempt, and name it in the shared accommodation rate exception list in place of its two entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ifferential The docs and test comments now say who defines and who deducts. A property test checks that the shared accommodation rate exception list gives the same result as its previous entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The model stores amounts as 32-bit floats, so a generated AFIP of 5e-324 reached it as zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe what afcs holds, name who acts in the docs, and pin a penny of armed forces independence payment in two fixed cases. A new property checks that one non-dependant's payment moves only their own exemption. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The per-person property now checks that the renter's total falls by the recipient's contribution and no more, and the docstring limits invariant 4 to where AFIP starts no Pension Credit. 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
Standard reform costings (change in gov_balance)
The report suppresses a reform's costing and target change in these years, for the reasons below (
Standard reforms: change in each reform's target
Household net income by decileNo household's net income changes in any year. No change in any year: receipts by tax head; government balance, each component counted once; model totals; household income totals; population; poverty rates; people in poverty; inequality; mean household net income in each side's own deciles. Checks failing on both base and head (1)
Counted-once checkEach of 92 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
|
juaristi22
left a comment
There was a problem hiding this comment.
Reviewed exact head 7e657d4e51929ad42af0e4ddf1166c10a723a91c. Review COMPLETE, with no findings or material evidence gaps.
The recipient-level AFIP exemption and shared-accommodation list change match the reviewed GB/NI provisions. 84 focused checks passed, including a non-dependant couple with only one AFIP recipient. The final-outcome check removes £1,158.60 of contribution and raises the renter's UC from £9,940.20 to £11,098.80, with the same £1,158.60 increase in household income. The separate benefit unit's UC and income tax remain unchanged. This validates the changed UC component's income effect; full AFIP cash accounting was outside this fix.
The actual rulespec-uk #519 record supports the queued Axiom line, with source-derived cases and its stated corpus/encoder-approval blocker. Exact-head CI is green.
This PR remains a draft, so I am recording the completed review without approving it yet. Retain the documented integration instruction: whichever of this PR and #2017 lands second must use uc_receives_attendance_allowance for the renter exemption, so the remaining part of #2802 is completed. No merge was performed.
|
I marked this ready at the head you reviewed, 🤖 Generated with Claude Code |
juaristi22
left a comment
There was a problem hiding this comment.
Rechecked 7e657d4e51929ad42af0e4ddf1166c10a723a91c after it was marked ready. COMPLETE; no findings or material gaps.
The head, actual description and relevant evidence are unchanged from my completed review. The prior 84 passing checks and native final UC/household-income proof remain applicable; no tests were rerun. The source cache and queued Axiom evidence were revalidated, and current-head required checks pass.
The #2017 integration note remains: whichever change lands second must use the new receipt predicate for the renter exemption. This approval covers this PR's adopted recipient-level correction, with the scope qualifications in the previous review retained.
Addresses #2802
What and why
In regulation 2 of the Universal Credit Regulations 2013, the Secretary of State defines "attendance allowance" to include armed forces independence payment (AFIP, head (f)). Under Schedule 4 paragraph 16(2)(d), DWP deducts no housing cost contribution for a non-dependant "in receipt of attendance allowance".
uc_non_dep_deduction_exemptread onlyattendance_allowance, so the model deducted a contribution for a non-dependant who receives AFIP. In 2026-27 that took £1,158.60 a year (12 × £96.55, Sch 4 para 14(1)) off the renter's housing costs element.This PR:
uc_receives_attendance_allowance(Person, bool), which applies the regulation 2 definition through a new list parameter,gov.dwp.universal_credit.attendance_allowance_benefits:attendance_allowance(head (a)) andarmed_forces_independence_payment(head (f));uc_non_dep_deduction_exemptfor paragraph 16(2)(d);gov.dwp.LHA.shared_accommodation_exception_benefitsin place ofattendance_allowanceandarmed_forces_independence_payment, so the list holds the three heads of paragraph 29(5) that the model has variables for: (a) DLA care at the middle or highest rate, (b) attendance allowance and (c) PIP daily living. The model gives the same shared accommodation rate result as before (see the differential below).The model holds no separate amount for regulation 2's other heads: (b) an increase of disablement pension under SSCBA 1992 s.104 or 105, (d) Personal Injuries (Civilians) Scheme 1983 payments and (e) attendance additions to a war disablement pension.
iidbholds one reported amount,afcsholds one reported amount for war disablement pensions and Armed Forces Compensation Scheme payments, with no separate attendance addition, and no variable holds Personal Injuries (Civilians) Scheme payments. So the model does not count a person who receives only one of those. For Northern Ireland, the Secretary of State defines the term with the same five payments in reg 2 of the Universal Credit Regulations (Northern Ireland) 2016.We ran the issue's household on
mainand on this branch: a single claimant aged 40 in the North West with no earnings, renting from the council at £6,000 a year, and a non-dependant aged 25 earning £20,000 in a benefit unit of their own (2026).In the first four rows, the branch computes the award DWP pays under the regulations: Universal Credit equals 12 × £424.90 (the reg 36 standard allowance) plus £6,000 less the contributions. The model gives the same results at the non-dependant's earnings of £0 and £100,000. In the last row, DWP deducts no contribution under paragraph 15(2)(c) and pays £11,098.80. The branch still gives £9,940.20 until #2017 adds that exemption.
Scope
mainholds no paragraph 15 renter exemption (#2014). Draft PR #2017 adds one,uc_non_dep_deductions_renter_exempt, which readsattendance_allowance. This PR leaves the renter exemption to #2017, so it addresses #2802 without closing it. A renter on AFIP still bears contributions until the second of this PR and #2017 to land applies the first merge note below, and that PR closes #2802.Merge notes
uc_receives_attendance_allowanceinuc_non_dep_deductions_renter_exemptfor paragraph 15(2)(c), in place ofattendance_allowance > 0. Then a renter who receives AFIP bears no contribution for any non-dependant.3efa8bd60) it conflicts in the same 7 Housing Benefit and Council Tax Reduction files asmain(2da212abc) does, and it auto-mergesuc_non_dep_deduction_exempt.py. Apply each scheme's own non-dependant test to the LHA shared accommodation rate #2030 and Count other families' children and add the foster and overnight-care bedrooms in the LHA size criteria #2016 conflict with this head in the same files as withmain.uc_is_excepted_from_education_conditionreadsattendance_allowanceandarmed_forces_independence_paymentdirectly. It gives the same result today. In regulation 14(1)(b) the Secretary of State writes "entitled to", not "in receipt of", so whoever lands the second of the two decides whether to route it throughuc_receives_attendance_allowance.armed_forces_independence_paymenttoshared_accommodation_exception_benefitsfrom an older base and already conflict withmainin that file. Whoever resolves them keepsuc_receives_attendance_allowanceand leaves AFIP out of the list, since the new variable already counts it.Invariants
Each holds for every input with non-negative benefit amounts:
uc_receives_attendance_allowanceholds exactly when attendance allowance or AFIP is positive.Test plan
ruff formatandruff checkon the changed Python files (equivalent ofmake format).changelog.d/2802.fixed.md.We ran each file alone at
9079310d6:non_dep_deductionfiles (15),uc_receives_attendance_allowance.yaml(9),integration/uc_afip_housing_contribution.yaml(9),integration/uc_child_responsibility_housing_contribution.yaml(12),uc_housing_costs_element.yaml(7),claims_universal_credit.yaml(22),claims_as_single_person.yaml(33),legacy_closure_ineligible_partner.yaml(1),housing_benefit_lha_category.yaml(9),LHA_claimant_composition.yaml(17) andrent_of_sharers_boarders_and_lodgers.yaml(19).test_uc_afip_housing_contribution_properties.py(3, Hypothesis),test_uc_non_dep_pension_credit.py(3),code_health/test_aggregation_lists.py(8),code_health/test_variables.py(2) andtest_parameter_descriptions.py(24).At
9079310d6,test_uc_legacy_closure_properties.py(4),test_household_head_agreement_properties.py(3) andtest_pension_credit_tax_branch_reuse.py(3) pass. An independent reviewer rantest_uc_single_claim_properties.py(8),test_benefit_cap_lha_scheme_split_properties.py(7),test_carer_support_payment.py(10) andtest_rent_of_sharers_boarders_and_lodgers_properties.py(6) at926099dfa, and all passed. The commits since then change only docstrings, comments, parameter descriptions and tests.On
mainwith the tests as they stood at4ffa8a774,test_afip_never_lowers_uc_and_exempts_the_non_dependantfails on the issue's household (invariant 2), and 4 of the 7 integration cases in that version fail: the four in which a non-dependant receives AFIP.Across the 151 YAML cases at
4ffa8a774, 8 move betweenmainand that head, and each gives someone a positive AFIP. In each of the two cases added since, someone receives a penny of AFIP. Case 8 moves (maincharges £1,158.60); Case 9 doesn't, sincemain's list already names AFIP. The comparison leaves out 3 cases that change parameters or apply a reform. In one of the 8,housing_benefit_lha_category.yaml's single renter on AFIP, only that person's ownuc_non_dep_deduction_exemptflag moves, and no contribution or award changes. The list differential found no difference between the new shared accommodation list and its previous four entries over up to 10 generated batches of 12 renters and one fixed batch.Each of three mutations fails a test. Dropping
armed_forces_independence_paymentfromattendance_allowance_benefitsfails both property tests and 4 integration cases; readingattendance_allowance > 0inuc_non_dep_deduction_exemptagain fails the AFIP property test and the same 4 cases; droppinguc_receives_attendance_allowancefrom the shared accommodation list fails the list differential (4 of 12 renters).Five more mutations change the threshold or the unit. At
9079310d6, setting the test at more than £1 inuc_receives_attendance_allowancefails integration Cases 8 and 9, setting AFIP above £1 inuc_non_dep_deduction_exemptfails Case 8, and clearing the household's whole total for any exempt non-dependant failstest_one_persons_afip_moves_only_their_own_exemption. Atde6a84762, summing AFIP over the benefit unit inuc_receives_attendance_allowance, or testing any household member in the exemption, fails the same test. The independent review's nine mutants at926099dfaeach failed a test.Reproducer
Reproducer: policyengine_uk/tests/test_uc_afip_housing_contribution_properties.py::test_afip_never_lowers_uc_and_exempts_the_non_dependant; policyengine_uk/tests/policy/integration/uc_afip_housing_contribution.yaml
axiom: TheAxiomFoundation/rulespec-uk#519 queued
🤖 Generated with Claude Code