Conversation
This was referenced Oct 2, 2026
The minimum wage parameters jumped from 2022-04-01 to 2024-04-01 in every band, so the fiscal year 2023 (sampled at 30 April) read the April 2022 rates: £9.50 instead of the £10.42 national living wage, and likewise for every other band (S.I. 2023/354). - Add the 1 April 2023 rates to non_apprentice.yaml and apprentice.yaml. - Cite the amending S.I. and regulation for every dated rate from October 2012 to April 2026, replacing the GOV.UK reference on the 2026 rates with S.I. 2026/357, and document the age-band history in the file header. - Add tests/test_minimum_wage_rates.py: tables transcribed from the S.I.s (rates from each commencement date, and rates at 30 April for 2015-2026), checked against the processed parameters, the minimum_wage variable and the raw YAML, plus property tests (monotone in age and over time) and a differential check of the fiscal-year conversion. - Add 2023 YAML cases for minimum_wage and the Tax-Free Childcare income condition. - programs.yaml: point the minimum_wage entry at its variable and parameters and verify it from 2015. Fixes #2044 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ment Fiscal-year sampling at 30 April drops the October 2015 and October 2016 rate changes, so the programs.yaml entry is exact only from 2017; note the earlier convention instead of claiming 2015 (review on #2053). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
minimum-wage-2023-rates
branch
from
October 2, 2026 13:37
47e78a8 to
02633b6
Compare
MaxGhenis
added a commit
that referenced
this pull request
Oct 2, 2026
#2053 adds the same S.I. 2023/354 rates with regulation-level citations and tests, so #1999 no longer carries them and the two do not conflict. The benefit cap's 2023-24 threshold follows once #2053 merges (722 a month; 658 until then). The 2023 benefit cap cases move to 2024-25 (793 a month = 9,516 a year): the 9,520/9,500 pair and the Housing Benefit regression (9,600 earnings, cap 25,323). The property tests sample 2024 instead of 2023. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2044
Problem
gov.hmrc.minimum_wage.non_apprenticeand.apprenticejumped from2022-04-01to2024-04-01in every band.convert_to_fiscal_year_parametersreads these parameters at 30 April, so 2023 read the April 2022 rates. S.I. 2023/354 sets the 1 April 2023 rates:mainChanges
policyengine_uk/tests/test_minimum_wage_rates.pychecks two hand-transcribed tables:RATES_FROM_COMMENCEMENT: the rates each S.I. set, October 2012 to April 2026.RATES_AT_30_APRIL: the fiscal-year values for 2015 to 2026.minimum_wagevariable (one simulation, all years) and the raw YAML at each commencement date.minimum_wage: the same five cases as Use each rule's own Universal Credit earned income in the benefit cap, targeted childcare and local CTR #1999, so that hunk merges cleanly. Plus three 2023 Tax-Free Childcare income-condition boundary cases.programs.yaml. Theminimum_wageentry now hasvariable: minimum_wageandparameter_prefix: gov.hmrc.minimum_wage(it was all ofgov.hmrc).verified_start_yearmoves from 2022 to 2017, with a note that 2015 and 2016 use the 30 April values. The new test covers 2015-2026, but 30 April sampling drops the October 2015 and October 2016 changes, so coverage is exact only from 2017. The old entry claimed 2022 onwards while 2023 was wrong.Verification of the transcribed rates
The rates were transcribed from the S.I. texts on legislation.gov.uk (
/made/data.xml). Three independent agents then re-derived the rates in force on 19 check dates (each 1 October from 2012 to 2016 and each 30 April from 2013 to 2026). None of them could see this PR's files, and each used a different source:All three found 0 differences from the tables in the test. legislation.gov.uk has no point-in-time versions of the 1999 Regulations, so for dates before 6 April 2015 the second agent read the amending S.I.s instead. A fourth agent checked all 91 dated references against the cited S.I.s: titles, commencement dates, regulation pinpoints and values. It found every citation correct; its one wording fix to the header comment is applied.
Consumers and test impact
Only
minimum_wagereadsgov.hmrc.minimum_wage(grep).minimum_wagefeeds:uc_minimum_income_floor(minimum_wage × 35 × 52);tax_free_childcare_meets_income_requirements(× 16 × 13);extended_childcare_entitlement_meets_income_requirements(× 16 × 13).Their 2023 thresholds rise with the rate.
No existing YAML test changes. The full suite passes on
mainand on this branch: 1,373 of 1,373 before the new cases were added.A sensitivity probe set every 2023 rate to £1,000 in memory and ran the suite: all 1,373 tests still passed, so no existing test exercised the 2023 rate. A positive control does the same for 2025 and fails 10 tests (
minimum_wage, extended childcare and Tax-Free Childcare), which shows the probe works.The new 2023 YAML cases fail under the pre-fix rates (7 of 25 in those two files) and pass with the fix. The new pytest fails on
main's YAML at 2023 and passes on this branch.No microsimulation was run, and this PR reports no fiscal figures.
Invariants
These are checked in
test_minimum_wage_rates.py. The properties use Hypothesis (300 derandomized examples each):Overlap and follow-ups
uc-earned-income-consumers-1986-nmw-2023.fixed.mdfragment. Itsminimum_wage.yamlcases are identical to the ones here. Use each rule's own Universal Credit earned income in the benefit cap, targeted childcare and local CTR #1999 also replaces the benefit cap's hard-coded £10,152 earnings exception with one derived from this parameter, which depends on the 2023 rate added here.is_apprentice. Reg. 5(1)(b) limits it to apprentices under 19 or in their first 12 months.docs/book/assumptions/nowcasting-comparison.mdsays the minimum wage "only enters when a reform invokes it". In fact the baseline UC minimum income floor and both childcare income tests read it.Review
Independent review (
subfleet run --task review --tier standard) returned APPROVE. It re-checked every 2023 value, the 2016, 2021 and 2024 band changes and the regulation pinpoints against the S.I.s on legislation.gov.uk, and confirmed that no value other than the 2023 rows changed. Its one should-fix, thatverified_start_year: 2015overclaimed, is applied (now 2017). It could not run commands, so its test results rest on CI.Commands run
uv run --frozen pytest policyengine_uk/tests/test_minimum_wage_rates.py: 46 passed. Onmain's YAML, the first version of this test failed at 2023.uv run --frozen policyengine-core test policyengine_uk/tests/policy -c policyengine_uk: 1,373 passed on the first branch head (before the new 2023 cases and before rebasing). After rebasing ontomainat 3525263, the touched and consumer YAML directories (minimum_wage.yaml,tax_free_childcare/,extended_childcare_entitlement/,income_floor/) pass 156 of 156. CI runs the full suites.pytest policyengine_uk/tests/: not rerun locally after the rebase; CI's Test job covers it.uv run --frozen ruff format --check .andruff check .: clean.axiom: uk/regulation/uksi/2015/621/4 and /4A encoded-correct for 2026-27 (
4.test.yaml,4A.test.yaml); dated versions queued: reg 4 in TheAxiomFoundation/rulespec-uk#399, reg 4A in TheAxiomFoundation/rulespec-uk#421🤖 Generated with Claude Code