Test that AFCS payments never confer severe disability; document AFCS vs AFIP (stacked on #1946) - #2003
Test that AFCS payments never confer severe disability; document AFCS vs AFIP (stacked on #1946)#2003MaxGhenis wants to merge 1 commit into
Conversation
|
Review pass (Claude Code, on Vahid's behalf), on closing this in favour of #1946. #1946 already contains this PR's fix. At What #1946 doesn't have yet, and should carry over before this closes:
Timing. #1946 is a draft stacked on #1896, so closing this delays the AFIP fix until both land. If #1896 isn't close to merging, I'd merge this first and rebase #1946 over it; otherwise consolidating is fine. |
… vs AFIP Stacked on #1946, which reads armed_forces_independence_payment (not afcs) for CTC Regs 2002 reg 8(5) / WTC reg 17(4). This adds what #1946 lacks: - afcs_reported documented as FRS benefit code 8 (AFCS including guaranteed income payments, and war disablement pensions); armed_forces_independence_payment documented with AFCS Order 2011 art 24A. - YAML cases: AFCS with DLA care middle / PIP daily living standard; CTC severely disabled child element, WTC severe disability element (AFCS 0, AFIP 1,705 in 2024-25) and the UC higher disabled child addition (AFCS 0, PIP enhanced 5,950.44 in 2025-26). - Hypothesis properties: differential against the tax credit condition (CTC reg 8(3)-(5) + WTC reg 17(2) higher-rate AA); AFCS invariance of the flag and of every amount that reads it; AFIP monotone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
296934c to
abef7e9
Compare
|
Agreed: consolidated rather than raced. #1896 has merged and #1946 is next in the train. I kept the formula change out of this PR so #1946 stays on its tested head. This PR is now stacked on #1946 (
On this head the YAML file passes 16 of 16, the 3 properties pass, and the code-health tests pass. Against pre-#1946 🤖 Generated with Claude Code |
Stacked on #1946. Retarget to
mainonce #1946 merges. This PR carries no formula change: it is tests and documentation only.Summary
#1946 fixes
is_severely_disabled_for_benefitsparagraph 5. It readsarmed_forces_independence_paymentinstead of anyafcspayment, as Child Tax Credit Regulations 2002 reg 8(5) and Working Tax Credit Regulations 2002 reg 17(4) require. This PR adds what #1946 does not have, as listed in the review on this PR:afcs_reported: what FRS benefit code 8 covers.armed_forces_independence_payment: its legal basis, and that it is not part ofafcs.is_severely_disabled_for_benefits.yaml. They check that AFCS payments confer nothing, alone or next to a lower award, through every amount that reads the flag.The first version of this PR made the formula change itself on
main. #1896 has now merged and #1946 is next in the merge train, so the formula change is left to #1946. Making it here as well would knock #1946 off its tested head.What
afcsholdsafcsaddsafcs_reported, which policyengine-uk-data builds from FRS benefit code 8:AFIP is one of six injury benefits in the AFCS Order 2011 art 15(1): lump sum, supplementary award, guaranteed income payment, AFIP, fast payment and medical expenses. CTC reg 8(5) and WTC reg 17(4) name only AFIP. UC Regs 2013 reg 24(2)(b) names no armed forces payment.
Tests
Appended to
tests/policy/baseline/finance/benefit/family/is_severely_disabled_for_benefits.yaml: 7 cases, computed by hand from the law.The file passes in full on this head: #1946's 9 cases plus these 7.
New
tests/test_severe_disability_afcs_properties.py. Each example is a population of 10 to 20 random families with random DLA care, PIP daily living and Attendance Allowance categories, AFCS payments and AFIP.On this head, all 3 properties pass, and so do the code-health tests. Against the formula on
mainbefore #1946, all 3 fail. The populations are not vacuous: across the 10 examples (333 people), 33 people have an AFCS payment and nothing else, and the UC addition, CTC element, WTC element and premium are each positive for 64 to 111 people or benefit units.Effect
There are no formula or parameter changes, so model output is unchanged.
For context on #1946's AFCS change, two real
Microsimulationcomparisons, 2024-25 to 2030-31, on private copies of the Enhanced FRS 2024-25 with weights unchanged:is_severely_disabled_for_benefits, andbuild_from_multi_year_datasetsets every stored column as an input for every year, so the stored flag wins. Main7b9fc379against a branch with only the AFIP formula, on the same copy, gave every reported aggregate identical: benefits, premiums, net income and poverty.Not changed here
Axiom
axiom: n/a: tests and documentation only. The provision changes in #1946. For #1946's change, CTC Regs 2002 reg 8 and the WTC reg 17(2)-(6) qualifying benefits are queued as a dispatch-ready addendum on TheAxiomFoundation/rulespec-uk#361 (addendum to be posted after review). uk:regulations/uksi/2013/376/24 is already correct:
higher_rate_disabled_child_addition_applieshas no armed forces input.🤖 Generated with Claude Code