Repository navigation
Calculate contributory JSA for assessed whole-week claims - #2983
juaristi22 wants to merge 4 commits into
Conversation
Partially addresses #2947. NI qualification and claim-history assessment remain external to this ordinary whole-week financial component.
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
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 101 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
|
|
Fixed The test includes the exact CI counterexample containing two families and retains all original monetary, claimant, benefit cap and childcare assertions and tolerances. Local validation passed 8 Python tests and 40 policy cases; hosted CI for this update is pending. |
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Quick pass on the calculation.
- Order of the steps. The rate by age (reg. 49), less earnings above £5 (reg. 59 and the Schedule) and pension above £50 (reg. 51), with the 10p minimum tested on the weekly amount before multiplying (reg. 52). That is the right order.
- Exact arithmetic. Working in pence avoids float drift in the 10p test.
- Payable weeks. Capping them at 26 for one contribution-year pair matches s.5.
- Switch logic. Reported amounts stay the default. The assessed mode replaces them, including a reported zero, and
would_claim_jsa_contribgates it. - Downstream readers. Income tax, tax credits income, and the UC and Pension Credit young-person tests now all read the canonical
jsa_contrib, so a supplied award flows through consistently.
Two small points:
- The age-related rate uses the annual
age, so someone who turns 25 partway through the assessed weeks gets one rate for all of them. That's fine under the "stable whole weeks" contract, but worth a line in the docs page. - The UC cap fixture gained an extra child to keep its assertions, and the companion case checks that the young JSA recipient doesn't trigger the child-related cap. Good.
Review drafted with AI assistance and checked against the code at 14ae89901343ed28e3ba23da4941937c365ccf7d.
|
Following the annual-age documentation point: Should-address fixedThe assessed-awards page now states that annual VerificationThe wording matches the annual-age lookup and the existing stable-whole-weeks contract. Static source/document comparison, whitespace checks, formatting and lint passed. This change only adds the documentation sentence; model tests and a documentation build were unnecessary and were not run for this fix. |
Partially addresses #2947.
Contributory JSA currently returns reported amounts only. This adds an explicit financial-calculation mode for ordinary Great Britain claims with supplied assessed conditions, claim choice, whole payable benefit weeks, weekly net earnings and qualifying pension payments. It applies the age rates, earnings and pension disregards, 10p weekly minimum and 26-week limit for one assessed contribution-year pair.
Reported amounts remain the default source. Assessed mode replaces that source, including a reported zero. Income tax, Tax Credits income, and the UC and Pension Credit young-person receipt tests now read the selected canonical award, including directly supplied
jsa_contribvalues.NI qualification, claim-history assessment, part weeks, special-service earnings and population take-up remain outside this component. The documentation explains the complete-fact input contract and source choice; #2947 stays open. Registry status and verified years are unchanged.
One existing UC cap fixture now includes another eligible child to preserve its accounting assertions. A companion case verifies that the original young JSA recipient does not establish the child-related cap.
Validation:
make format,git diff --checkandmake documentationpassed; the documentation build included the new page.Reproducer: policyengine_uk/tests/policy/baseline/gov/dwp/jsa_contrib/assessed_awards.yaml
axiom: needed