Skip to content

Deduct only each person's own tax and NI on earnings from UC earned income - #1949

Merged
MaxGhenis merged 18 commits into
mainfrom
uc-earned-income-own-tax
Oct 4, 2026
Merged

MaxGhenis merged 18 commits into
mainfrom
uc-earned-income-own-tax

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

uc_earned_income subtracted benunit_tax from the benefit unit's gross earnings. That is income tax and NI summed over every member, on all their income. So a claimant's tax on their own dividends, property or pensions came off their earnings, and any tax beyond a member's own earnings came off their partner's. The taper then bit less and UC was overstated.

UC Regs 2013 reg 55(5)(b) and reg 57(2) step 3 deduct only tax and NI paid by the person "in respect of" their employment or trade. This PR deducts, per person:

  • their own income tax on their earnings;
  • their Class 1 employee, Class 2 and Class 4 NI;
  • their own pension contributions.

The work allowance then comes off the combined earnings, and the taper applies.

The #1942 counterexample: a couple in 2026, a pensioner aged 70 with State Pension £16,000 and a partner aged 45 earning £13,000, council rent £20,000. UC goes from £5,297.16 to £4,919.86, the legal figure.

On the Enhanced FRS the change cuts 2026 UC by £0.549bn against current main, from 292k benefit units (256 records), with no gainers. 90% of that is tax on dividends, and 43 records with over £50,000 of dividends carry £0.440bn of it. About 42% (£0.231bn) is one member's tax no longer coming off their partner's earnings. Those units get UC at all only because of a separate capital-modelling problem (#1948).

#1943 (State Pension as UC unearned income), which this was stacked on, has merged. Fixes #1942.

Law (legislation.gov.uk, read 2026-09-30 from /data.xml)

UC Regs 2013 reg 55(5) (https://www.legislation.gov.uk/uksi/2013/376/regulation/55):

In calculating the amount of a person's employed earnings in respect of an assessment period, there are to be deducted from the amount of general earnings or benefits specified in paragraphs (2) to (4)— (a) any relievable pension contributions made by the person in that period; (b) any amounts paid by the person in that period in respect of the employment by way of income tax or primary Class 1 contributions under section 6(1) of the Contributions and Benefits Act; ...

UC Regs 2013 reg 57(2) step 3 (https://www.legislation.gov.uk/uksi/2013/376/regulation/57):

Deduct from the amount resulting from step 1 or (if applicable) step 2 any payment made by the person to HMRC in the assessment period by way of national insurance contributions or income tax in respect of any trade, profession or vocation carried on by the person. If the amount resulting from steps 1 to 3 is nil or a negative amount, the amount of the person's self-employed earnings in respect of the assessment period is nil ...

Reg 22(1)(b) then tapers "their combined earned income" above the work allowance. So:

  • Per person. Each person's deductions come off their own earnings only. A partner with no earnings has nothing for their tax to come off.
  • Only in respect of the employment or trade.
    • Deductible: employee Class 1 (reg 55(5)(b) names "primary Class 1"), and Class 2 and Class 4 on the trade.
    • Not deductible: voluntary Class 3; the High Income Child Benefit Charge; the pension annual allowance charge.
    • ADM H5004: "All retirement pension income should be taken fully into account for UC; there are no comparable deductions for Income Tax and NI in UC."

Which part of a person's income tax is "in respect of" their earnings

When one person has both earnings and other taxable income, the law does not say how to split their tax.

  • Neither the regulations nor the ADM give an apportionment rule, and no tribunal decision on it was found.
  • In practice DWP takes employees' figures from RTI (reg 61(2)). ADM H3170 paraphrases the deduction as income tax and Class 1 "deducted or paid in that assessment period", without "in respect of the employment".
  • HMRC usually collects tax on a working pensioner's State Pension through their employer's PAYE ("Your employer will usually take any tax you owe off your earnings, including any tax you owe on your pension", GOV.UK). So the RTI figure can include it: it behaves like earnings as the top slice, or more under a K code. LITRG (a secondary source) says DWP deducts any tax paid in practice.
  • Reg 61(3)(b) lets DWP depart from RTI where it "fails to reflect the definition of employed earnings in regulation 55", but no ADM paragraph tells decision makers to strip out tax on other income.
  • ADM H5004 treats pension income as gross ("there are no comparable deductions for Income Tax and NI in UC"). So any tax a rule attributes to pensions is deducted nowhere.

This PR follows the statutory words. It takes earnings as the lowest slice of the person's non-savings income, after the allowances they actually have (uc_income_tax_on_earnings):

  • Savings and dividends sit above earnings and other non-savings income. ITA 2007 s.16 makes them "the highest part" of income, apart from the items s.1012 ranks above them, such as some termination payments. It does so for income tax purposes; UC is not one, so for UC this is an analogy.
  • Property income sits above earnings. This is how the engine already stacks it. From 2027-28, Finance Act 2026 s.6 adds ITA s.16A, which places property income "immediately before the savings income", and s.25(3A), which sets allowances against other income first.
  • Other non-savings income sits above earnings. That covers pensions, State Pension and taxable benefits. ITA 2007 fixes no order among these.
  • The legacy notional-tax rules also tax earnings alone. HB Regs 2006 reg 39, IS reg 39 and JSA reg 102 take earnings less the claimant's personal allowance, at the basic rate. UC keeps that approach only for wholly notional earnings (ADM H3271-H3272).

The rule makes one invariant exact: unearned income never changes a person's deductions unless it changes their allowances (the personal allowance taper above £100,000, or Marriage Allowance). Tax reductions such as the married couple's allowance come off the tax on earnings first, as allowances do, so they keep the invariant. The property tests check this, including for working pensioners with a married couple's allowance. Tax refunds are an exception in law: reg 55(4A) counts a whole repayment as employed earnings, even tax on other income. The model does not model refunds.

For working pensioners whose State Pension is coded against their job, this deducts less than DWP probably does in practice.

The alternative is earnings as the top slice of non-savings, non-property income (rule C), which is closer to RTI when HMRC codes out a State Pension. In this model rule C never deducts less tax than this rule: its earnings slice is at least as wide and sits higher, and the marginal rates never fall. The runs agree, with no unit getting less UC under rule C. As a sensitivity, a real run of rule C cuts 2026 UC by £0.530bn instead of £0.549bn. The issue's own sketch, "tax on all income minus tax without earnings", would not fix a single claimant whose other income is within the personal allowance. For example, with £20,000 of earnings and £5,000 of property income it deducts the whole £2,286, the same as the bug.

Change

  • uc_income_tax_on_earnings (new, Person):
    • taxes the bottom slice of earned_taxable_income that earnings occupy, reading the incomes outside that base from gov.hmrc.income_tax.earned_taxable_income_exclusions, so a reform that changes the list is followed;
    • uses the rUK or Scottish schedule, as earned_income_tax does;
    • takes tax reductions (gov.hmrc.income_tax.income_tax_subtractions) off that tax first, floored at nil, so it never exceeds the person's tax and never includes the High Income Child Benefit Charge or the pension annual allowance charge.
  • uc_national_insurance_on_earnings (new, Person): ni_class_1_employee + ni_class_2 + ni_class_4.
  • uc_individual_earned_income (new, Person): uc_mif_capped_earned_income less the person's own relievable pension contributions (none after 75: Finance Act 2004 s.188(3)(a)), tax and NI, floored at nil.
  • uc_earned_income: the sum of uc_individual_earned_income over the unit, less uc_work_allowance, floored at nil.
  • The UC docs page describes the deductions.

benunit_tax is no longer used by UC. It stays as a variable.

Household results (hand-computed, in uc_earnings_deductions.yaml)

Case (2026) Deducted tax UC before UC after
Mixed-age couple from #1942 partner's £86 + £34.40 NI, not the pensioner's £686 £5,297.16 £4,919.86
Single parent, earnings £20,000 + property £5,000, council rent £9,600 £1,486 on earnings, not £800 on property £11,748.50 £11,308.50
Self-employed £18,000 (start-up), pension £4,000, dividends £3,000, council rent £12,000 £1,086 + £325.80 Class 4, not £800 + £268.75 £4,563.10 £3,975.29

The YAML also covers:

  • a Scottish taxpayer, where earnings sit below pension income in the Scottish bands;
  • a Marriage Allowance recipient, whose £252 reduction lowers their tax on earnings;
  • Class 3 NI, not deducted;
  • a non-earner's pension contributions, which no longer come off the partner;
  • the High Income Child Benefit Charge, not deducted;
  • 2027 property rates of 22%, not deducted;
  • a married couple's allowance, which comes off the tax on earnings first, including with pension income and with the pension annual allowance charge;
  • pension contributions after 75, not deducted;
  • a reform exempting pensions from income tax.

The "before" figures are from the pre-fix formula, run as a scenario on this branch. Both rows reflect main's #1950 (property income and dividends are not UC unearned income) and #1881 (the trading allowance is not given without gross receipts).

Enhanced FRS impact (real runs)

Setup:

This PR against main:

Year UC on main UC change Losers Records Lose all UC Mean loss Median loss (weighted) Rule C instead
2025 £74.82bn −£0.503bn 287k 225 18.7k £1,755 £139 −£0.486bn
2026 £78.91bn −£0.549bn 292k 256 25.3k £1,884 £216 −£0.530bn
2027 £80.72bn −£0.576bn 293k 259 29.7k £1,962 £221 −£0.555bn
2028 £82.28bn −£0.602bn 298k 263 29.5k £2,017 £241 −£0.580bn
2029 £83.41bn −£0.603bn 297k 277 29.5k £2,029 £242 −£0.580bn
2030 £80.35bn −£0.624bn 316k 279 38.3k £1,977 £200 −£0.603bn

Checks across every year:

  • There are no UC gainers.
  • UC before and after the cap never rises.
  • Earned income never falls, up to float32 rounding of about £0.02 on six-figure earnings.
  • CTR, Pension Credit and Housing Benefit do not change.
  • The benefit cap reduction falls by £8-19m a year.
  • No unit gets less UC under rule C than under this PR.

Where the 2026 loss comes from. The fix does two things, and a real run separates them:

Step UC change Losing units Records
1. Apply the old deductions per person, so no member's deductions exceed their own earnings −£0.231bn 78k 50
2. Then deduct only the tax and NI on earnings −£0.318bn 234k 225
Both −£0.549bn 292k 256

Step 1 is almost all couples (£0.224bn of it, 46 records), and £0.222bn of it is in units with over £10,000 of dividends. The pattern is a member whose tax, mostly on dividends, is larger than their own earnings, with the rest netted off their partner's earnings. A member with no earnings at all, as in the #1942 couple, accounts for under £0.0001bn.

By the kind of tax no longer deducted (decompose.py: each losing unit's loss split pro rata over the deductions it no longer gets):

Tax no longer deducted from earnings UC change
Tax on dividends −£0.494bn
Tax on pensions, State Pension and taxable benefits −£0.020bn
High Income Child Benefit Charge −£0.019bn
Deductions the per-person floor stops (e.g. a non-earner's pension contributions) −£0.009bn
Property income tax −£0.007bn

Poverty. AHC child poverty rises 0.30pp in 2026-27 and 2027-28, 0.02pp in 2028-29 and 2030-31, and not at all in 2025-26 and 2029-30 (all people: at most 0.11pp). Each year it is at most one survey household crossing the AHC line. BHC child poverty rises 0.11pp from 2027-28 (all people: at most 0.03pp), one survey household, two from 2029-30. All of this is sampling noise, not a finding.

Invariants (tests)

policyengine_uk/tests/test_uc_earnings_deductions_properties.py is a Hypothesis test (derandomized, 10 examples each). It runs over singles, couples and mixed-age couples, including working pensioners with a married couple's allowance, with:

  • employment, self-employment (with and without the minimum income floor), State Pension, private pension, property, savings and dividend income;
  • children, tenure, rent;
  • London, the North East, Wales and Scotland;
  • the years 2020, 2026 and 2027.
  1. Unearned income never changes earned income. Adding any kind of unearned income to any adult leaves every uc_individual_earned_income, and uc_earned_income, unchanged.
  2. Monotone. UC before and after the benefit cap is non-increasing in each kind of unearned income for each adult.
  3. Differential against the tax engine. uc_income_tax_on_earnings equals the income_tax the same person pays with their earnings as their only income; uc_national_insurance_on_earnings equals their NI. Neither exceeds the person's own tax or NI.
  4. Differential against the old formula. Earned income is never lower, and UC never higher, than under the pre-fix formula, run as a scenario with Marriage Allowance claimed. The fix only removes deductions.

Invariants 1-3 keep adjusted net income under the £100,000 taper and switch Marriage Allowance off, because a change in allowances legitimately changes the tax on earnings. A married couple's allowance is covered: one family shape has a working partner aged 93-96 with the allowance, whose reduction comes off the tax on earnings first.

test_uc_state_pension_properties.py (from #1943):

Main's own property files had pinned #1942 as strict xfails; this PR removes them and widens the invariants:

Results at 8c88c7c (main 7668506 merged in): the UC YAML folder passes locally (240 tests) and CI runs the full suite. The four UC property files give 21 passed and 2 xfailed (the Marriage Allowance and benefit cap pins).

Not changed here (follow-ups)

axiom: TheAxiomFoundation/rulespec-uk#387 queued (regs 52, 53, 55 and 57 are not in the pinned corpus, so no signed encode is possible yet; the EFRS oracle bridge feeds uc_earned_income into reg 22, so it cannot test this)

Merge

This merges on gates under Max's 2026-10-02 rule that PolicyEngine UK bug fixes merge on gates whatever their effect on aggregates: CI green on the head, an independent review approving that head, and the impact above from real runs. #1943 has merged, so stack order allows it.

🤖 Generated with Claude Code

MaxGhenis and others added 2 commits September 30, 2026 14:25
…ncome

uc_earned_income subtracted benunit_tax, the whole benefit unit's income
tax and NI on all income, from the unit's gross earnings. UC Regs 2013
reg. 55(5)(b) and reg. 57(2) step 3 deduct only tax and NI paid by the
person in respect of their employment or trade.

- uc_income_tax_on_earnings: income tax on the person's earnings, taken
  as the lowest slice of their non-savings income after their allowances
  (savings and dividends sit above it under ITA 2007 s. 16, property
  income above it in the engine and under s. 16A from 2027-28).
- uc_national_insurance_on_earnings: Class 1 employee, Class 2, Class 4.
- uc_individual_earned_income: gross earnings less the person's own
  pension contributions, tax and NI, floored at nil.
- uc_earned_income: sum over the unit, less the work allowance.

Fixes #1942.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- test_uc_earnings_deductions_properties.py: unearned income never
  changes earned income; UC is non-increasing in every kind of unearned
  income; the tax deducted equals the tax on earnings alone; earned
  income is never lower, and UC never higher, than under the pre-fix
  formula.
- test_uc_state_pension_properties.py: the #1942 strict xfail now passes
  and loses its marker; pound-for-pound and the property-income
  equivalence cover families with earnings; a new strict xfail pins the
  Marriage Allowance transfer, which the model books on the recipient as
  the transferor's unused allowance (ITA 2007 s. 55B gives a fixed
  reduction).
- Document the earnings deductions in the UC docs page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… at #1947

The docs edit left 'plus all of its unearned income' hanging off the
earnings taper, which read as if unearned income were tapered. State the
two deductions separately. The strict xfail's reason and the module
docstring now cite #1947.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 4 commits October 1, 2026 10:44
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/book/programs/gov/dwp/universal-credit.ipynb
…able pension contributions

Review of #1949 found two defects in the new deductions.

- uc_income_tax_on_earnings capped the tax on the earnings slice at the
  person's income_tax. When a tax reduction (the married couple's
  allowance) made that cap bind, the pension annual allowance charge and
  the High Income Child Benefit Charge raised the deduction, and so did
  more pension income. Reductions now come off the earnings slice first,
  as allowances do, so the deduction never includes a charge and does not
  move with other income.
- uc_individual_earned_income deducted every pension contribution.
  Contributions paid after 75 are not relievable (Finance Act 2004
  s. 188(3)(a)), so reg. 55(5)(a) does not deduct them.

Adds YAML cases for both, draws a married couple's allowance in the
property tests, and says in the test docstring that payroll giving
(reg. 55(5)(c)) is not modelled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roperty tests

The random generator rarely produced an earner old enough for the married
couple's allowance, so the properties did not exercise tax reductions.
A dedicated family shape now does. With it, restoring the old
min(tax, income_tax) cap fails both the invariance and the differential
property.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uc_income_tax_on_earnings hard-coded savings, dividends and property as
the incomes outside earned_taxable_income. A reform that adds another
income to gov.hmrc.income_tax.earned_taxable_income_exclusions, such as
one exempting pensions, then had that income subtracted twice, and the
tax on earnings fell to nil. The formula now reads the list.

Adds a YAML case with the reform as a parameter input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 3 commits October 2, 2026 10:15
…iew's counterexamples

- test_uc_unearned_benefits_properties.py (added on main by #1958) had a
  strict xfail pinned to #1942, which this fix turns into a pass. Remove it
  and widen the earnings-free invariants to all families, with Marriage
  Allowance off as in the State Pension file (#1947).
- The tests review found that random draws missed two mutations. Pin its
  minimized counterexamples as @example cases: a pound of State Pension
  for a pensioner just above the personal allowance with an earning
  partner, and a pound of pension for an earner just above it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	policyengine_uk/tests/policy/baseline/finance/benefit/family/universal_credit/income/uc_earned_income.yaml
#	policyengine_uk/tests/test_uc_unearned_benefits_properties.py
#	policyengine_uk/variables/gov/dwp/universal_credit/income/uc_earned_income.py
… property fixtures

#1896 presumes that a member under 20 who is at least 16 years younger
than the claimant is the claimant's child. The State Pension and earnings
property tests generate couples such as 67 and 18 without relationship
inputs, so the presumption would read them as a parent and child and the
tests would pass without exercising a couple (including the tests
review's pinned 67-and-18 example). Set is_claimant_or_partner from each
generated role, as #1896 did for main's fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 2, 2026
After #1896, is_claimant_or_partner is inferred when not given, and an
adult under 20 who is 16+ years younger than the other can be presumed a
child. The generated families have at most two adults, both claimants, as
#1949's fixtures now declare.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 2, 2026
…y fixtures

Main's claimant-or-partner inference (#1896) presumes a member under 20
who is at least 16 years younger than the claimant to be the claimant's
child. The work-related group properties generate couples such as 52 and
18 without relationship inputs, so after main was merged in the 18-year-old
was read as a child, the reg 3(3) flag landed on someone outside the
couple, and test_partner_who_cannot_be_a_joint_claimant failed (it fails
the same way on 6db0ab1, before this branch's own changes). Set
is_claimant_or_partner from each generated role, as #1949 did for its
fixtures in a57caf1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Coordination note from #1950 (UC capital income). #1950 adds policyengine_uk/tests/test_uc_income_from_capital_properties.py. Its test_tax_on_dividends_does_not_raise_a_working_familys_award is a strict xfail(raises=AssertionError) pinned to #1942, which this PR fixes.

Whichever of #1949 and #1950 merges second should:

  • remove that marker;
  • drop with_earnings=False from test_interest_dividends_and_rent_leave_the_award_unchanged;
  • re-run the combined Enhanced FRS impact, since the two PRs interact on dividend-holding units.

#1950's merge is waiting on a decision from Max (over the £1bn/yr line).

🤖 Generated with Claude Code

@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

#1950 merged (770bc06), so #1949 lands second. On rebase:

  • remove the strict xfail on test_tax_on_dividends_does_not_raise_a_working_familys_award in policyengine_uk/tests/test_uc_income_from_capital_properties.py;
  • drop with_earnings=False from test_interest_dividends_and_rent_leave_the_award_unchanged;
  • re-run the combined Enhanced FRS impact.

#2107 gives that file's generated adults explicit claimant roles, so rebase on it if it has merged.

🤖 Generated with Claude Code

MaxGhenis and others added 3 commits October 3, 2026 07:24
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/book/programs/gov/dwp/universal-credit.ipynb
#	policyengine_uk/tests/test_uc_state_pension_properties.py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- #1950: rent and dividends are not UC unearned income (reg. 66(1) is a
  closed list), so the single parent's unearned income is nil (UC
  11,308.50) and the self-employed claimant's is the pension alone (UC
  3,975.29).
- #1881: without gross receipts, a trade profit above the trading
  allowance gets no allowance (ITTOIA 2005 s. 783AI), so the tax on the
  trade is (18,000 - 12,570) x 20% = 1,086.

The tax and NI this PR deducts are unchanged in method; the cases' gaps
against the pre-fix formula are still 0.55 x the tax on other income.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 3 commits October 3, 2026 09:08
… unchanged

The widened award clause of test_interest_dividends_and_rent_leave_the_award_unchanged
gives one adult up to 270,000 of interest, dividends and rent beside up to
30,000 of earnings. Above 100,000 of adjusted net income the personal
allowance tapers (ITA 2007 s. 35(2)), which raises the tax on the person's
earnings and so the reg. 55(5)(b) deduction: the exception this PR states.
Compare only benefit units whose personal allowances the income leaves
unchanged, as test_uc_earnings_deductions_properties.py does by keeping
adjusted net income under the taper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…anged

Review of c6412ee found the widened capital-income award invariance still
false for the award after the cap. The model's earnings exception to the cap
(reg. 82(1)(a)) nets tax on all of a person's income off their earnings
(#1986), so dividends can switch the cap on while allowances and UC earned
income are unchanged: a single London claimant earning 11,000 with 10,000 of
dividends loses 2,081.80 to the cap.

- Compare universal_credit only where is_benefit_cap_exempt is also unchanged;
  the other variables keep the personal allowance filter.
- Pin the case as a strict xfail against #1986.
- Qualify the YAML header's ITA 2007 s. 16 ordering comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 3, 2026
…ce-election

Take #1949's uc_income_tax_on_earnings, which now sets every Step 6
reduction (income_tax_subtractions, which this branch extends with the
Marriage Allowance reduction) against the tax on earnings first. Identify
spouses as the married claimant and partner (#1896), dropping the
two-eldest rule and the minimum-age parameter. Keep #1896's Marriage
Allowance and CPS tests, adapted to the transfer model; carry the pinned
elections into #1949's married couple's allowance and property-income
properties. Drop the branch-array clearing now that core shares branch
arrays until they are written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	policyengine_uk/tests/test_uc_income_from_capital_properties.py
#	policyengine_uk/tests/test_uc_state_pension_properties.py
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

UK hub merged main into this branch at 09ae2eac4. The owner session was cut off by a network drop.

  • Parents: 8c88c7cd9 (approved by 20261003-144221-uc1949-delta2) and main 27dd5f7a (after Give sharers, boarders and lodgers their own rent, tenure and LHA category #2006).
  • Conflicts: two test files, test_uc_state_pension_properties.py and test_uc_income_from_capital_properties.py. Both sides added is_claimant_or_partner to the generated adults; this branch's version is kept, including its would_claim_marriage_allowance guard.
  • Own diff: identical outside those two files, with the same 12 paths (checked with git diff against each base).
  • Tests: both property files pass locally, 10 passed and 2 xfailed.
  • Next: CI runs on the new Linux workflow (about 25 min). The merge goes ahead on green under the merge-only delta check above.

@MaxGhenis
MaxGhenis marked this pull request as ready for review October 4, 2026 03:49
@MaxGhenis
MaxGhenis merged commit fc1ecc4 into main Oct 4, 2026
7 checks passed
@MaxGhenis
MaxGhenis deleted the uc-earned-income-own-tax branch October 4, 2026 03:49
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Merged by the UK hub under the PE-UK merge-on-gates rule:

  • CI: every check passed on the merged head (fast Linux workflow); gh pr checks exits 0.
  • Independent review approved the pre-merge head; the main merge is merge-only (own diff identical: see the hub's earlier comment).
  • Impact: unchanged from the description (no own-code change in the merge).

MaxGhenis added a commit that referenced this pull request Oct 4, 2026
Brings the branch up to main at be877c8, which includes #1949
(fc1ecc4) and #1943.

Conflicts:
- docs/book/programs/gov/dwp/universal-credit.ipynb: main's notebook
  with this PR's minimum income floor paragraph re-inserted after the
  earnings-deductions sentence.
- uc_individual_earned_income.py: this PR's reg 62(2)/(3) floor. Main's
  Finance Act 2004 s.188(3)(a) age filter on pension contributions is
  ported to uc_individual_earned_income_before_mif, where this PR takes
  the deductions; the file is copied as is from #1999 (blob 73a9370)
  so the two PRs merge in either order.
- test_uc_earnings_deductions_properties.py: main's file with this PR's
  start-up-period note, the pre-#1942 gross earnings and invariant 4's
  start-up setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 4, 2026
Resolves conflicts with #1896 (claimant and partner), #1950 (no capital
income in UC), #1949, #1973 and #2088 (reg. 32 exceptions): the income
sums, the childcare work condition and the minimum income floor read
is_uc_assessed_claimant; fixtures that relied on the old is_uc_claimant
fallback flagging an adult child now supply the roles; the reg. 22
differential expects pensions plus tariff income, since savings interest
is not reg. 66(1) income for anyone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 5, 2026
…y fixtures

Main's claimant-or-partner inference (#1896) presumes a member under 20
who is at least 16 years younger than the claimant to be the claimant's
child. The work-related group properties generate couples such as 52 and
18 without relationship inputs, so after main was merged in the 18-year-old
was read as a child, the reg 3(3) flag landed on someone outside the
couple, and test_partner_who_cannot_be_a_joint_claimant failed (it fails
the same way on 6db0ab1, before this branch's own changes). Set
is_claimant_or_partner from each generated role, as #1949 did for its
fixtures in a57caf1.
(cherry picked from commit 0dfcc26)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 6, 2026
…-3-single-claim

#2081, #1973 and #1949 have merged, so main now carries this PR's base.
Conflicts and their resolutions:

- uc_individual_earned_income_before_mif.py: main's version (the age-75
  pension contribution limit as #1949 landed it). uc_individual_earned_income.py
  and test_uc_earnings_deductions_properties.py merged cleanly and equal
  main's; so does test_uc_work_related_groups_properties.py, which now
  declares is_claimant_or_partner itself.
- utils/uc_work_related_requirements.py: main's claimants() (it reads
  is_uc_assessed_claimant, which replaced couple_members() with the same
  formula), plus this PR's single-claim helpers.
- uc_member_of_couple_claims_as_single_person.py and
  uc_is_ineligible_partner.py read is_uc_assessed_claimant instead of the
  removed couple_members(); no output changes.
- is_uc_eligible.py: both docstrings' sentences.
- uc_childcare_work_condition.py: #2088's reg 32 formula with this PR's
  reg 3(3) split, as posted on #2084: limb (a) for the s.40 claimant
  (is_uc_single_or_joint_claimant), limb (b) for every other member of the
  couple (is_uc_assessed_claimant), and reg 32(2) treatment only for a
  claimant.
- is_benefit_cap_exempt_other.py merged without a conflict but lost
  `person = benunit.members`, which main removed and this PR's reg 83 line
  reads; restored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UC earned income deducts the whole benefit unit's tax, including tax on pensions and other unearned income

1 participant