Conversation
Income-related ESA (WRA 2007 Sch 1 para 6(1)(e), (f); ESA Regs 2008 regs 41-43, 45) and income-based JSA (Jobseekers Act 1995 ss.1(2)(e), 1(2B)(b), 3(1)(e); JSA Regs 1996 regs 3A, 51) are barred when the claimant, or the other member of the couple, is engaged in remunerative work. The screens applied only the capital test. - ESA claimant: paid work other than exempt work (£20 a week, or under 16 hours within 16 x NMW), on net earnings. - ESA partner: 24 hours, except a carer (reg 43(2)(c)). - JSA: 16 hours for a claimant, including each member of a joint-claim couple; 24 for a partner otherwise; no carer exception. - Candidates are the claimant and partner when either reports the award. The income_related_*_award helpers are unchanged; they read the screens. The Income Support property reference now applies the same tests, holding the JSA joint-claim status fixed in the invariance property and allowing work that ends a barring award in the monotonicity property. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rameters The stored higher limit equals 16 x the National Minimum Wage rounded up to the next 50p (ESA Regs 2008 reg 45(9A)) at every rate in DMG ch. 41 Appendix 5, and DWP's published £183.50, £195.50 and £203.50. The JSA hours parameters match the older gov.dwp.JSA.hours ones. The new property tests run 20 examples each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Takes is-remunerative-work-jsa-conditions at bfff081 (with #2013 at 97b7a1c). In test_income_support_eligibility_properties.py, #2025's version is kept and the work tests are re-applied: the reference's award on the claimant's and partner's reports, and explained_by_reports' award on everyone's reports, pass the ESA and JSA work screens; monotonicity allows a gain only where a calculated award was lost. Excluded members are now adults only, so the invariance property needs no joint-claim hold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nding - JSA: a member of a joint-claim couple whose partner works 16 to under 24 hours can claim alone (JSA Regs 1996 reg 3E(1), (2)(g), since 19 March 2001), so the other member's limit is 24 hours for every couple. The joint-claim switch, is_jsa_joint_claim_couple and its parameters are removed. - ESA earnings: pay under reg 96(3); self-employment under reg 98(3) and reg 99 (notional basic-rate tax above the personal allowance, main-rate Class 4, half the personal pension premium); a self-employment loss is no longer set against pay (reg 98(11)). The documentation calls the PAYE attribution an approximation, not the reading most favourable to the claimant. - The projected higher earnings limit rounds up to 50p (reg 45(9A)). - The Income Support monotonicity property allows a gain only where a calculated esa_income or jsa_income award actually ended. - esa_income and jsa_income documentation names the work tests. - YAML: two self-employment cases, JSA couples without children at 15, 16, 20, 23 and 24 hours, and a couple with a placed child. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pers Comment-only. In esa_income.py and jsa_income.py the helpers keep #2025's docstrings ("fails the screen in esa_income_eligible" / "jsa_income_eligible"), so they stay identical to #2025 and #2013; the variables' documentation names the capital and remunerative work tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #2013's 3402629 and #2025's round-4 changes: the IS gate compares direct awards in the stored dtype, documents the value convention's boundary, and adds direct-input tests. Clean merge; the property file's docstring and the work-screen reference sit side by side. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ish rate - A self-employment loss larger than the pay no longer reaches the tax on the pay through the shared allowances (pension_contributions_relief goes negative there). The pay side is PAYE on the pay alone: taxable pay less employee pension contributions and the personal and blind person's allowances, less tax reductions. - Reg 99(1): the notional tax allows the blind person's allowance. - Reg 99(3)(a): Class 2 is deducted until 5 April 2024, from the small profits threshold and, from 6 April 2022, above the lower profits threshold (two dated parameters). - The Scottish basic rate is the first Scottish band before 2018-19 and the second once the starter rate came in. - YAML: a loss larger than the pay, the blind person's allowance, and a 2017-18 Scottish profit with Class 2. - The reference applies National Insurance only below state pension age and covers pay with profit and a loss larger than the pay. The differential property also compares weekly earnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The pay side takes only the married couple's allowance reduction, up to the tax on the pay itself, instead of the shared income_tax_subtractions. The shared capped_mcad is capped against the whole liability, which a loss moves through negative pension relief, and other_tax_credits holds credits settled through a tax return, such as foreign tax credit relief. - YAML: the married couple's allowance with a £20,000 loss, and a foreign tax credit on property income. - Documentation: the notional National Insurance follows the model's Class 2 and Class 4 parameters. Their 2015-16 and 2023-24 values are out of date; a separate fix is chip task_21085692. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #2025's stored-award convention wording, its tolerance tests and test_direct_awards_match_the_reference_deterministically. In test_income_support_eligibility_properties.py the monotonicity waiver for a lost calculated award is kept and the new deterministic test follows it; reference_eligibility's signature is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Correct the dated National Insurance amounts reg 99's notional contributions read: the 2015-16/2016-17 Class 2 small profits threshold (£5,965), the 2023-24 Class 2 rate (£3.45) and lower profits limit (£12,570), the 2022-23 Class 4 rates (9.73%/2.73%, Health and Social Care Levy (Repeal) Act 2022 s.2(2)) and the 2023-24 additional rate (2%). The four 2023 NI tests now take hand-derived statutory values, including the reg 100 annual maximum (£1,748.60). - Take the ESA pay's tax and primary Class 1 on the pay alone: statutory sick, maternity and paternity pay are not earnings (reg 95(2)(b)), so the shared taxable pay and Class 1 bases, which include them, are not used. - YAML: SSP/SMP/SPP controls, a shared-base isolation control, the 2023 regression and threshold-equality cases for 2023-24 and 2015-16. - Properties draw statutory payments; describe ages on both sides of pension age and the JSA carer rule as no exception for carers doing unrelated paid work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The NI parameter corrections this PR carries (review r4 finding 1) now have their own PR off The hunks are not byte-identical. #1888 already held the Class 2 fix in a different form (every value cited, new Every value in this branch's NI hunks is in #2058 with the same number:
The four 2023 test expectations match too (179.40; 1,568.70; 3,393; 1,748.60). #2058 also has:
When #2058 lands, merge git checkout origin/main -- policyengine_uk/parameters/gov/hmrc/national_insurance/class_2 policyengine_uk/parameters/gov/hmrc/national_insurance/class_4 policyengine_uk/tests/policy/baseline/gov/hmrc/national_insuranceChecked against this branch. I overlaid #2058's NI parameter, variable and test files onto head e38ea0c in a probe worktree.
Not covered by #2058: the Class 1 rates and thresholds that changed mid-year in 2022-23 and 2023-24 (#1807). Axiom: rulespec-uk#353 (s.11) and rulespec-uk#423 (s.15 and regulation 100) are the queued parity issues for the NI history. |
- YAML: in 2023-24, £1 of profit over the lower profits threshold brings reg 99(3)(a)'s fixed Class 2 in and the work under the £167 limit (£165.22 against £168.65). This is the intended statutory cliff, labelled as such. - The monotonicity property's docstring now names its tested years (2025-26) and this pre-April-2024 exception. - Changelog: the shared NI corrections also change historical NI, net income and means tests in those years. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Cross-PR note from #2075 (stacked on #2027 + #2025): #2075 switches #2075 does not edit Because the gate now reads a calculated variable, a test that changes |
Fixes #2043
Stacked on #2025 (base
is-remunerative-work-jsa-conditions, which is stacked on #2013, #2001 and #1896). It needsis_claimant_or_partner(#1896) and the Income Support gate's readers of the screened awards (#2013, #2025). Retarget tomainafter #2025 merges.What the law says
Income-related ESA. Welfare Reform Act 2007 Sch 1 para 6(1): the claimant "(e) is not engaged in remunerative work; (f) is not a member of a couple the other member of which is engaged in remunerative work".
The claimant (reg 41(1)). ESA Regs 2008 reg 41(1) defines the claimant's remunerative work as "any work which a claimant does for which payment is made or which is done in expectation of payment, other than work listed in paragraph (2) of regulation 40". Reg 40(2)(f) includes the exempt work in reg 45:
So the claimant's test is not an hours threshold. Earnings of £20 a week or less never bar the award. Above £20, work of 16 hours or more bars it, and work under 16 hours bars it only above the higher limit.
The partner (reg 42(1)). Paid work "for not less than 24 hours a week". Under reg 43(2)(c), a partner who would satisfy IS Regs Sch 1B para 4 (a carer) "is not to be treated as engaged in remunerative work".
Income-based JSA. Jobseekers Act 1995 s.1(2)(e): the claimant "is not engaged in remunerative work". S.3(1)(e): the claimant "is not a member of a couple the other member of which is engaged in remunerative work". JSA Regs 1996 reg 51(1) sets 16 hours "in the case of a claimant" and 24 "in the case of any partner of the claimant".
What changes
esa_income_eligibleandjsa_income_eligible, the screens applied to reported awards, tested only capital. They now also apply the work conditions:esa_income_claimant_remunerative_work: earnings over the lower limit, unless the work is under 16 hours and within the higher limit. Being a carer does not take a claimant out of remunerative work.esa_exempt_work_earnings, worked out under the ESA(IR) earnings rules per DMG 41189):Pay (reg 96(3)): less the income tax and primary Class 1 deducted from it, and half the occupational or personal pension contributions. The regulation takes the amounts actually deducted, which the inputs don't record. The model approximates them on the pay alone:
taxable_employment_incomeand Class 1 base include them, so neither is read.A second job taxed at the basic rate through PAYE would leave lower net earnings than this, and the variable can be entered directly.
Self-employment (reg 98(3), reg 99): the profit less several notional deductions, and half the personal pension contributions. Personal pension contributions go to self-employment when there is a profit and to pay otherwise. The notional deductions are:
The notional National Insurance reads the model's Class 2 and Class 4 parameters. This PR corrects the dated amounts that differed from the statute (table below).
Losses: a self-employment loss is not set against pay (reg 98(11)), nor does it change the tax on the pay.
esa_income_remunerative_work_hours, unlessis_carer_for_benefits(the IS gate's proxy for Sch 1B para 4).jsa_remunerative_work_hours. There is no exception for carers doing unrelated paid work.New parameters, each dated from the point-in-time legislation:
gov.dwp.ESA.exempt_work.lower_earnings_limitgov.dwp.ESA.exempt_work.hours_limitgov.dwp.ESA.exempt_work.higher_earnings_limitgov.dwp.ESA.income.remunerative_work.partner_hoursgov.dwp.ESA.income.self_employment_class_2.deductedgov.dwp.ESA.income.self_employment_class_2.above_lower_profits_thresholdgov.dwp.JSA.remunerative_work.claimant_hoursgov.dwp.JSA.remunerative_work.partner_hoursThe existing
gov.dwp.JSA.hours.singleandcoupleare kept, and a test pins them to the new ones. Their descriptions called 24 hours the "joint claimants'" requirement; it is the partner's.National Insurance amounts corrected to the statute. Reg 99(3) deducts notional Class 2 and Class 4, so these feed the ESA earnings. Each value is checked against the point-in-time legislation.gov.uk text and carries its reference. The model samples each tax year at 30 April.
class_2.small_profits_threshold, 2015-16 and 2016-17class_2.flat_rate, 2023-24class_4.thresholds.lower_profits_limit, 2023-24class_4.rates.main, 2022-23class_4.rates.additional, 2022-23class_4.rates.additional, 2023-24Four 2023 NI tests encoded the old amounts and now take hand-derived statutory values:
ni_class_2over the lower profits limit: 52 × £3.45 = £179.40;ni_class_4on £30,000: 9% × (£30,000 − £12,570) = £1,568.70;ni_class_4_mainover the upper limit: 9% × £37,700 = £3,393;ni_class_4_maximum, on £100,000 of profit and £100,000 of pay, by SI 2001/1004 reg 100(3) as at 6 April 2023: £1,748.60. Primary Class 1 on the pay exceeds Step 3's £3,575.85 less Class 2, so Step 4 is negative (Case 3) and treated as nil. Step 8 is 2% × £37,700 = £754 and Step 9 is 2% × £49,730 = £994.60.None of these years is in the Enhanced FRS impact below (2025-2030). The corrections are to shared parameters, so they also change National Insurance, net income and the means tests that read them in 2015-16, 2016-17, 2022-23 and 2023-24. The 2025-2030 figures do not measure those effects. For example, with £30,000 of profit in 2023-24, Class 2 plus Class 4 falls from £1,792.08 to £1,748.10. Remaining NI questions are a separate audit, listed under follow-ups.
Not modelled (each documented on the variable; enter the variable directly to apply it):
Design points
In the screen, beside the capital test. The work conditions are further conditions of entitlement alongside the capital test the screens already apply. For ESA they are para 6(1)(e)-(f) beside (b); for JSA they are ss.1(2)(e) and 3(1)(e) beside s.13. Work ends an award. Within the model's bounded reported-award approach (no new claims can be made, so a reported award is screened rather than computed), applying them in the screen keeps every reader consistent:
esa_income,jsa_income);The alternative would be household income keeping the reported award while the gate and passports see no entitlement. The household would then both have and not have the benefit. The cost is that household income falls where a survey report conflicts with the rules. The impact section sizes that.
Helpers and award formulas unchanged.
income_related_esa_award,income_related_jsa_awardand theesa_income/jsa_incomeformulas are untouched; only the variables' documentation changed. They read the screens. So #2025's and #2027's value rule for direct entries is unaffected: a calculatedesa_incomeis still exactly the award on everyone's reports.A trial merge with #2027's head e741e1f passes:
legacy_award_readers,esa_income,jsa_incomeandincome_support;Income Support property tests (
test_income_support_eligibility_properties.py). The reference's award on the claimant's and partner's reports, andexplained_by_reports' award on everyone's reports, now pass the same work screens (new sharedtests/legacy_award_work_reference.py). The monotonicity property needed one law-based allowance. A carer is not in remunerative work for Income Support (reg 6(4)(c)) but is for JSA, so more hours can end a carer's own JSA award that barred the claim. The property therefore allows a gain only where a calculatedesa_incomeorjsa_incomeaward actually ended.Tests
YAML.
esa_income_remunerative_work.yamlhas 39 cases andjsa_income_remunerative_work.yamlhas 16, each hand-computed from the law. They cover:With the two old screens and everything else at the head, 21 ESA and 8 JSA cases fail: each case where the work condition bars the award.
Hypothesis (
test_legacy_award_work_properties.py, 4 properties, 20 examples each):A 150-example run of an earlier version passed. All four pass at the head.
Parameters.
Suites.
income_support,esa_incomeandjsa_incomeYAML directories (156 cases) and the property and direct-input files (38 tests) pass.Invariants
For every input:
Invariants 2-4 are property tests. Invariant 5 is a YAML case and follows from reg 3E. Invariant 1 holds by construction and through the reference test. Invariant 6 is a table and range test.
Enhanced FRS impact
The runs used real
Microsimulations on copies ofenhanced_frs_2024_25.h5(sha256e433e532…), base 081ec14 (#2025) against the head e38ea0c, each from its own worktree venv with clean trees. Benefit units are weighted thousands, and "records" are dataset records.By channel in 2025 (first-match attribution in the branch run):
Nothing else changes in 2025-2028: Income Support, Housing Benefit, council tax reduction, Universal Credit and Pension Credit are identical arrays. Poverty rates move by about 0.001 percentage points. None of the review fixes (reg 3E, the self-employment earnings rules, the pay-side tax and Class 1, the NI amounts) alter an Enhanced FRS benefit outcome. The benefit outcomes of these runs reproduce exactly those of every earlier pair (46d11fc against bebbfad, ffe3a58 against c200dd8, da1a798 against ebed8bd, and 081ec14 against 045e0a3). Only the earnings and claimant remunerative-work auxiliary arrays differ.
Against the previous head (045e0a3), the statutory-pay fix leaves every benefit and income array identical. Weekly ESA earnings move by more than half a penny only for recipients of statutory sick or maternity pay: about 340 records a year, all rises. Everyone else moves by under £0.001 a week: rounding in the new pay-side computation, and only among people with pay above the primary threshold. The claimant flag changes for 2 records a year, neither of whom reports ESA.
Separate ESA-only and JSA-only runs against 46d11fc showed no interaction between the two screens.
The 2029-30 jump is a data defect, not this rule. From 2029 the £2,000 salary-sacrifice cap moves sacrifice above the cap into
employment_income(salary_sacrifice_returned_to_income).What the 40 records are. They are survey reports of income-related ESA alongside work the regulations say ends it: 22 records with a claimant over the exempt-work limits and 18 with a partner working 24+ hours. The contributory/income-related split is the respondent's own report (FRS BENEFITS
VAR2). Some may be contributory ESA, which a partner's work does not affect (DMG 41302) and which this screen does not touch. The rule is the law; whether the survey labels are right is a data question.Review
r1 (Subfleet, GPT-6.1 Sol): REQUEST CHANGES with three blocking findings, all fixed in d146b96:
It also raised five should-fix findings, also addressed: rounding of projected limits, the monotonicity waiver, the earnings documentation, text defects, and the Axiom issue.
r2 (Subfleet, GPT-6.1 Sol): resolved r1's reg 3E, rounding, monotonicity and text findings. It requested changes on four more, fixed in ebed8bd:
pension_contributions_relief, which goes negative there (the pay side is now PAYE on the pay alone; the shared bug is chip task_3ccdecda);Its nits are also addressed: reference age coverage and mixed sources, the Axiom table and carer wording, and "benefit outcomes" here.
r3: found two should-fix issues. The first was addressed in 17ebd16; r4 rejected 17ebd16's deferral of the second, and e38ea0c fixes it.
r4: REQUEST CHANGES with two should-fix findings and three nits, all addressed in e38ea0c:
r5 (Subfleet, GPT-6.1 Sol): APPROVE WITH NITS at e38ea0c. It independently recomputed every corrected NI value, the four NI tests (including reg 100), the nine new ESA cases and the impact figures. Its two nits are addressed in 232358d:
Axiom
axiom: TheAxiomFoundation/rulespec-uk#417 queued. rulespec-uk has no module for:
The statute provisions are not in the corpus. The regulations are only in the non-release scope
2026-06-01-uk-frs-microsim. The issue carries the verbatim law, the required outputs, areview_findingand 12 groups of companion tests from the same ground truth as the YAML.Follow-ups
task_d73fcf28: stop imputing salary sacrifice to people with no pay (uk-data), and guard
salary_sacrifice_returned_to_income.task_df8732a5:
gov.hmrc.minimum_wagehas no April 2023 rates, so 2023-24 reads £9.50 where the NLW was £10.42.task_3ccdecda:
pension_contributions_reliefgoes negative when losses exceed income.NI audit (from chip task_21085692, now running separately). Open questions:
ni_class_2charges it from the small profits threshold.How these reach the ESA earnings:
self_employment_class_2), so neither Class 2 item does.🤖 Generated with Claude Code