Repository navigation
Include Armed Forces Independence Payment in household income - #2880
juaristi22 wants to merge 4 commits into
Conversation
|
Review of 6ad6334. I read the diff and the issue (#2872), grepped every reader of Nit
Checked and fine
CI at 6ad6334: lint, changelog, fix evidence, smoke imports (3.11 to 3.14), docs, YAML and Python shards 1, 2, 3 and 6 pass. Python 4, 5 and 7 and Aggregate impact were still running when I posted. Verdict: a small, correct fix. The two nits are optional. 🤖 Generated with Claude Code |
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 New warnings
Notes
Moves flagged for reviewNone. Spending by benefit and service
Caseloads
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; standard reform costings (change in gov_balance); standard reforms: change in each reform's target. Checks failing on both base and head (1)
Counted-once checkThe check raised each of 102 components by £1 per unit in 2026-27 and read every head of its totals 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 response that is not finite breaks every rule. The check measures a head that breaks a rule twice more: once holding every other head at its baseline value, and once holding every other head at its value after the first £1 while the component rises again. The head fails where either measurement still shows the response. The check cannot hold a head at a value that is not finite. In each unit where another head is not finite after the first £1, it holds that head at its baseline value, and the second measurement judges no household the unit belongs to. There a head fails wherever it first broke a rule, or wherever the check could not confirm whether its response contains the component. 0 failed and the check skipped 0.
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
|
|
@vahid-ahmadi Addressed both nits in
The complete AFIP file passed all eight native cases at the unchanged £0.01 margin. The original seven cases remain byte-exact, and the citation move preserves the full executable AST. Formatting, Ruff and independent verification passed. Fresh checks for the follow-up head are pending, so the PR remains draft. |
|
Round 2 at 126d78b. I read the diff from 6ad6334 and hand-checked the new YAML case. I did not run it locally, so for test results I am relying on CI.
No new findings. CI at 126d78b: everything passes, including Python shards 1 to 7, YAML and Aggregate impact (zero AFIP spending and caseload on certified data, as expected, and no moves flagged). Verdict: both nits are resolved. From my side this is ready to come out of draft. 🤖 Generated with Claude Code |
Fixes #2872
Reproducer:
policyengine_uk/tests/policy/baseline/gov/dwp/afip.yamlaxiom: n/a: Emulator cash-accounting mapping for the existing reported AFIP input; no entitlement, rate, threshold or taxable-income rule is added or amended.
Reported Armed Forces Independence Payment (AFIP) now contributes once to household benefits, gross and net income, income after housing costs, HBAI income and its state-support subtotal, government spending and fiscal breakdowns. AFIP remains separate from Armed Forces Compensation Scheme (AFCS) receipts.
For example, the regression supplies £2,400 of annual AFIP and no other cash income or tax. The income and spending totals include £2,400; £600 of rent leaves £1,800 after housing costs. Other cases cover multiple benefit units, an unaffected household, separate AFCS and PIP recipients, zero AFIP, the HBAI zero floor, benefit uprating and council-tax abolition. A matched pair of debt-free single UC claimants in 2024 receives £4,721.40 of computed UC in each household; supplying £2,400 AFIP raises only the second household’s cash and HBAI totals to £7,121.40. These are supplied cash amounts, not calculated statutory awards.
The HBAI treatment applies DWP's all-benefits income definition to MOD's identification of AFIP as a benefit paid by DWP. This is a category-definition inference; the source does not name AFIP in a separate HBAI derivation.
Add a distinct reported-cash budget term and Person fiscal spending head, append AFIP to the spending and HBAI lists, and preserve the existing budget ordering. No eligibility calculation, award amount or data imputation changes.
The UC regression uses DWP’s named AFIP income exclusion and the 2024/25 single-claimant standard allowance: £393.45 × 12 = £4,721.40. UC is calculated normally. The existing Tax-Free Childcare citation now sits beside its own HBAI list entry.
Test plan:
6ad63346: pass 348 Python tests and 36 policy cases, including all seven original AFIP cases.make formatand Ruff; complete independent code/source and final validation review.126d78bcbefore marking ready for review.Both income omissions were reproduced as failing tests before their fixes. The follow-up preserves the original seven cases byte-exact and the complete executable HBAI AST. Eight native cases passed in the focused follow-up; this is not a new run of the broader initial suite. All 21 hosted checks passed at
126d78bc, including Aggregate impact. The full data-dependent checks run in hosted CI.