Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
0aff6d4
Train and query the SPI stage-1 forests on the SPI age band (uk-data#…
juaristi22 Oct 25, 2026
bdbece4
Allocate households' HRAD purchases at or below GBP 250,000 from Tabl…
juaristi22 Oct 25, 2026
95a51ed
Floor drawn SPI employment pay at the minimum wage for the twin's hours
Oct 21, 2026
7df7973
Withhold the floored weight where the unfloored side is a small cell
Oct 21, 2026
08a6a00
Cap the SPI pay floor at the twin's rate, keep the tape's year of pay…
juaristi22 Oct 25, 2026
457af02
Allow the UC take-up stage gate 0.12 until the UC award fix lands
juaristi22 Oct 29, 2026
f1092f1
Merge #1422's branch (uk-1095-next) into #1426
juaristi22 Oct 31, 2026
bc5adc9
Name the pay floor's annual paid hours paid_hours
juaristi22 Oct 31, 2026
d68eb5c
Give the UC take-up gate's reachable pools their own tolerance
juaristi22 Oct 31, 2026
dae46ae
One-hot the SPI age band in the stage-1 forests
juaristi22 Oct 31, 2026
f3d9c0a
Say which way the non-resident surcharge moves the nil-band HRAD split
juaristi22 Oct 31, 2026
cbbcdc1
Merge #1422's prose fix (0a69ef4b5) into #1426
juaristi22 Oct 31, 2026
6a12424
Regenerate the H2 spine parity fixture on the merged tree
juaristi22 Oct 31, 2026
8f0ec8f
Fit the engine SPI tests to the one-hot band and the floor of three
juaristi22 Oct 31, 2026
de8ad03
Merge #1422's review fixes and regeneration (43c3da74e) into #1426
juaristi22 Oct 31, 2026
93f47d0
Merge #1422's DfE note test fix (9d25e4579) into #1426
juaristi22 Oct 31, 2026
ac20b48
Merge #1422's re-review fixes (5b693b736) into #1426
juaristi22 Oct 31, 2026
851aea9
Merge #1422's payload comparator test fix into #1426
juaristi22 Oct 31, 2026
f8e4b4f
Merge #1422's local parity receipt regeneration into #1426
juaristi22 Oct 31, 2026
11b9675
Merge #1422's H2 fixture (bd9839bf2) into #1426 and regenerate it
juaristi22 Oct 31, 2026
cc78c00
Merge #1422's third-review fixes (821e342d1) into #1426
juaristi22 Nov 1, 2026
29fd92d
Merge #1422's fourth-review fixes (0da33d0cd) into #1426
juaristi22 Nov 1, 2026
b8bf1c1
Merge #1422's fifth-review fixes (4af602d81) into #1426
juaristi22 Nov 1, 2026
bc7f59a
Merge main (0b1eecf27) into #1426
juaristi22 Nov 2, 2026
97fd4d0
Merge #1428 at the control's commit (329a99e71) into #1426
juaristi22 Nov 2, 2026
0ddc236
Return the UC take-up gate's caseload tolerance to 0.055
juaristi22 Nov 2, 2026
3aa5529
Run the Carer's Allowance draw after salary sacrifice, keyed on linea…
juaristi22 Nov 2, 2026
3463245
Draw Carer's Allowance stratum starts per stratum when a lineage span…
juaristi22 Nov 2, 2026
7f8ebb5
Draw Scottish owners' council-tax bands from their council area's mix…
juaristi22 Nov 2, 2026
a90f8ce
Date two-child-limit births by the engine's cutoff test (#1095 AC3)
juaristi22 Nov 2, 2026
365928d
Mark children in non-parental care for the two-child limit (#1095 B7)
juaristi22 Nov 2, 2026
f5d08b9
Give SPI copies their twin's contributory JSA and ESA within the perm…
juaristi22 Nov 3, 2026
999a1ee
Move each household's student-loan balance to its borrowers (#1095 B9)
juaristi22 Nov 3, 2026
2b49a00
Merge main (312dc4d6b) into #1426 after the Phase B arms
juaristi22 Nov 3, 2026
834532b
Add HMRC's HICBC liability count and revenue as measured diagnostics …
juaristi22 Nov 3, 2026
6fca272
Grade the zero-emission share by income and level each road fuel to i…
juaristi22 Nov 3, 2026
0702f7a
Shape the SPI channel's prior by its copies' design weights
Oct 21, 2026
0f5be84
Withhold the SPI prior-shape spread under ten copies; expect the shap…
Oct 21, 2026
674b8a1
Bring the SPI prior shape onto #1426: the floor of 3 and the pin pass…
juaristi22 Nov 3, 2026
33f6757
Size the over-£100,000 young-child cell's weight concentration (Vahid…
juaristi22 Nov 3, 2026
722fa24
Read the young-child cell's memberships from the tables: a spine's id…
juaristi22 Nov 3, 2026
22703ee
Write policyengine-uk's vehicle excise duty inputs from the NTS cars …
juaristi22 Nov 3, 2026
408d3f5
Take the SPI prior shape off #1426 (#1095 residual 12, María's ruling…
juaristi22 Nov 3, 2026
0cddc84
Give SPI copies' contributory JSA its own limits and test both awards…
juaristi22 Nov 4, 2026
8b57fc9
Merge main (79a533c72) into #1426 for main's CI fixes
juaristi22 Nov 4, 2026
8607310
Hand spi_benefit_coherence the hours and source households its work t…
juaristi22 Nov 4, 2026
1ac980d
Regenerate the H2 spine fixture for spi_benefit_coherence's declared …
juaristi22 Nov 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/1095-hrad-nil-band-receipts.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK property purchases stage allocates households' additional-dwelling (HRAD) purchases at or below GBP 250,000 from HMRC's Table 8a receipts instead of individuals' share of all transactions (microcosm#1095). The residential nil-rate band was GBP 250,000 for all of 2024-25, so a purchase in that band owes no standard-rate SDLT and other buyers' receipts there are surcharge: at Table 6b's gross HRAD receipts per transaction and per pound, their GBP 265m is about 48,100 HRAD transactions and GBP 7.05bn, against the 13,400 transactions the all-band share left them. Households take the rest of the band; above it they keep uk-data#573's shares, which probably still overstate them, since the standard rates make up most receipts there. Households' 2024-25 target falls from 186,589 transactions and GBP 68.81bn to 151,928 and GBP 63.71bn, both above uk-data#573's lower bounds, and the lowest band's share of their purchases from 54% to 43%. The stage's derivation records the nil-band receipts, the implied HRAD and its shares.
1 change: 1 addition & 0 deletions changelog.d/1095-spi-forest-age-band.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK SPI income stage's stage-1 tape and reference forests now read the SPI age band, not an age (uk-data#628). The 2022-23 SPI tape gives age only as a band (AGERANGE), so the age the stage draws for each donor inside its band carried no income pattern: the forest learned none, and FRS twins in one band were drawn from conditionals that differed only by that noise. The predictor `spi_age_band` is the tape's own AGERANGE code, with composite records (-1) as a band of their own, and for a frame person the band of their whole-year age. It is one-hot encoded, so the composites, the tape's high-income amalgams, are a category of their own rather than the neighbours of 16-24 on an ordinal scale; `at_or_over_spa` still carries the State Pension split inside the 65-74 band. The cross-fit fold cells key on the band too, since they key on the predictor values. The drawn donor ages are kept for the band pools' State Pension side. The stage receipt's `stage1_age_predictor` names the rule.
1 change: 1 addition & 0 deletions changelog.d/1095-two-child-limit-cutoff-date.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The two-child-limit target rows now date births by policyengine-uk's own cutoff test, `uc_is_child_born_before_child_limit` (a date of birth before 6 April 2017), instead of a birth year of 2017 or later (microcosm#1095). The calendar year counted a child born from January to 5 April 2017 as affected by the limit, although the limit does not apply to them in the engine.
3 changes: 3 additions & 0 deletions changelog.d/1095-two-child-limit-non-parental-care.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The UK spine now sets policyengine-uk's `child_limit_non_parental_caring_exception`, the two-child limit's exception for non-parental caring arrangements (UC Regs 2013 Sch 12 para 4; CTC Regs 2002 reg 12), for children in kinship or friends care (microcosm#1095). Nothing set it before, so the engine paid no child element for such a third or later child born from 6 April 2017.

The `frs_relationships` stage marks a child-table member whom no adult of their own benefit unit claims as a natural, adopted or step child, read from either side of the household grid (codes 3 and 4 from the child, 7 and 8 from the adult), and whom no local authority placed there. That covers a child living with grandparents, siblings, other relatives or friends, and a baby whose parent is a child of the claimant's unit. The multiple births, adoption and non-consensual conception exceptions stay at the engine's default: the FRS has no twin field and its birth dates are blank.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK Carer's Allowance take-up stage now runs after `salary_sacrifice`, so its earnings test reads the pay that salary sacrifice converts into pension contributions (microcosm#1095 B5). That also puts it after the CGT stages' copies, so its draws are keyed on lineage: a member of a CGT support copy, incidence clone or residential arm draws as the member at the same rank of the household it copies (`lineage_roots`), and the balanced placement takes a source and its copies in one stratum as one record of their joint weight (`lineage_balanced_positions`), so the two claim together as before. Original rows keep their draws. The stage spec, the coverage manifest and the H2 fixture follow.
1 change: 1 addition & 0 deletions changelog.d/1095-uk-hicbc-liability-diagnostics.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Two national rows from HMRC's Child Benefit statistics (August 2025 release, Table 16) join the UK target contract as measured diagnostics (microcosm#1095, #1288 item 10; María's ruling of 3 November 2026): the Self Assessment taxpayers liable to the High Income Child Benefit Charge in 2024-25, counted in the model as the persons whose `CB_HITC` is above zero, and the charge's revenue, the sum of `CB_HITC`. Both are the publisher's provisional figures. They are measured at the calibration year against 2024-25's figures under a signed reviewed hold (the charge's £60,000 to £80,000 thresholds are the same in both years), and held out of the solve: the model's charge sits well above HMRC's, a gap in who receives Child Benefit at high incomes rather than in the weights, and HMRC's count covers Self Assessment returns only. The evaluation measures them on every candidate. The national references and their membership are regenerated on the pinned feed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The LCFS consumption stage now reads the National Travel Survey's cars (UKDS SN 5340, End User Licence: the vehicle and household tabs, survey years 2022-2024, at the interview weight W3) for two changes from microcosm#1095 B3 (PR 2b), both as the 16 October plan designed them.

- **Zero-emission cars by income (J2).** Each car is still zero-emission at VEH1103's licensed-car share nationally, but now by the household's income fifth: the national share times the fifth's relative risk among the cars NTS households keep, normalised over the frame's own cars so the national share is unchanged. The NTS ranks England's households by total gross income, McClements-equivalised, so the frame ranks `household_gross_income` over the engine's before-housing-costs equivalence scale. A car is zero-emission in the DVLA-linked 0 g/km CO2 band, and a car without a linked band is left out. The households' uniforms are unchanged, so only each household's threshold moves; a fifth on fewer than 10 zero-emission cars would pool with its neighbour (a statistical floor). The rule is `per_car_zero_emission_share_by_income_quintile`.
- **Petrol and diesel levelled separately (K).** `level_road_fuel` keeps ONS 07.2.2's household level but no longer the diary's petrol/diesel mix. Each fuel is levelled to the total times its share of household-paid spend: HMRC's litres times DESNZ's cars share of the fuel's road use (the litres audit's benchmark), times the share of car miles a household pays for (a kept car's private and commuting miles; business miles and company cars are not), at the 2024 pump prices. The `road_fuel_level` gate rechecks each fuel's total against the mix it recomputes from the vendored rows. The mix rule is `household_paid_litres`.

A new private input, `--nts-vehicle-tab`, joins the spine tool, and the NTS household tab now also feeds `lcfs_consumption` under the same pin. The H2 fixture gains a synthetic vehicle table and W3 on its households. `obr.fuel_duties_cars` stays held, its reason restated with the household-paid shares (María's ruling of 29 October 2026).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK dense build's post-geography band node now draws each Scottish owner clone's council-tax band from its council area's chargeable dwellings by band, A to H, at September 2025 (Scottish Government CTAXBASE 2025), at the same uniform as its value, its rank among Scotland's owners (microcosm#1095 B12). The counts are vendored from Chronicle into `uk/scotgov_chargeable_dwellings_by_band.json` and pinned as the graph source `uk_scotgov_band_mix`, beside the VOA mix England and Wales draw from. Renters keep their band, as in England and Wales, and so does Northern Ireland. The band node's receipt reports Scotland apart. The national build does not localise property, so it does not change.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SPI-channel rows now take their FRS twin's contributory JSA and ESA where the row's own work stays within each benefit's limits, and none outside them (microcosm#1095 B10; María's ruling of 29 October 2026). Before, `spi_benefit_coherence` zeroed contributory JSA on every SPI row and left contributory ESA with the stage-2 forest's draw, which ignores the benefit unit's claim history. A contributory award follows the person's National Insurance record and incapacity, which the copy keeps; what the copy changes is its work. ESA's limits are permitted work: under 16 hours a week, and earnings up to policyengine-uk's `esa_exempt_work_higher_earnings_limit` at the frame's year (£183.50 a week in 2024-25). JSA's are its own (Vahid's review of microcosm#1426): under 16 hours a week, earnings no more than the prescribed amount (the age-related amount plus the £5 disregard, less 1p: £95.49 a week from 25 in 2024-25), and an award cut by the earnings above the disregard. Earnings are the row's employment income plus any self-employment profit over 52 weeks, and hours its twin's usual hours. The stage-health gate checks the rule on every SPI row, the receipt counts support in source households under the floor of three, contributory ESA leaves the QRF tail-concentration surface (no forest draw survives in it), and the stage spec, the coverage manifest and the H2 fixture follow.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK `student_loans` stage now moves each household's student-loan balance to the members who hold a plan, once the plans are set (microcosm#1095 B9). `was_wealth` draws the household's balance from the WAS and splits it among the members before any plan exists, so it could sit on a member with no loan while the household's borrower held none. policyengine-uk caps a borrower's repayment at a positive balance, so the split decides which repayments the balance can cap. The balance now goes to the household's borrowers by their repayments where any of them repays, and equally otherwise; a household with no borrower keeps `was_wealth`'s split, and no household's total moves. The stage spec, the coverage manifest and the H2 fixture follow.
1 change: 1 addition & 0 deletions changelog.d/1095-uk-uc-take-up-gate-pools.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK Universal Credit take-up stage gate (`uk_stage_uc_take_up`) gives the reachable pools a tolerance of their own, `maximum_reachable_pool_deviation`, beside the family type's caseload's `maximum_caseload_deviation` (Vahid's review of #1426). Both stay at 0.055 of DWP's count. With #1428's pool joining, every family type ends closer to DWP's count after the redraw than before it, the SPI employment pay floor (uk-data#629) included, so the caseload needs no wider allowance (María's ruling of 2026-11-02). The contract re-pins the gate battery's policy, manifest and fingerprint digests and the release certification's spine part.
8 changes: 8 additions & 0 deletions changelog.d/1095-uk-vehicle-excise-duty-inputs.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The LCFS consumption stage now writes policyengine-uk's vehicle excise duty inputs for the cars households keep (microcosm#1095 B3, VED). No stage wrote them, so every household's duty was zero. The new `assign_car_attributes_from_nts` step reads the same NTS kept cars as J2 and K:

- **Which cars.** A household's vehicles less its members' company cars (an employer pays their duty) go one to each other adult, oldest first. policyengine-uk holds one car a person, so a car beyond the adults is left out and the receipt counts it.
- **Which fuel.** A household the fuel flag leaves without road fuel keeps zero-emission cars only. One that buys fuel holds a petrol, diesel or other car first, and each further car is zero-emission at the household's own per-car share (the fuel flag's).
- **Which car.** Each car is a kept NTS car of its class in the household's income fifth, drawn by a keyed uniform at its interview weight. The weight is scaled so each fifth and age band keeps its share of the kept cars, since fewer of the newest and oldest cars carry the registration record the CO2 bands come from.
- **The inputs.** `car_fuel_type` (a diesel registered from 2021 meets RDE2), `car_co2_emissions` (the band's midpoint on the scale the car's duty regime reads), `car_engine_size` (none for a zero-emission car), `car_first_registration_date` (1 October 2025 less the car's age, drawn within its NTS band, as an ISO date) and `car_is_ved_exempt` (DLA's higher-rate or PIP's enhanced mobility component exempts the member's own car, or the oldest car-holder's in their benefit unit). `car_list_price` keeps the engine's default, so no car pays the expensive-car supplement.

The five columns join the release export's allow-list, since the enhanced FRS never carried them, and the gate battery's digests in the microcosm-data contract move with it. The H2 fixture's synthetic vehicle table gains the three NTS columns the step reads. Vehicle excise duty is measured, never bound: no target carries it.
1 change: 1 addition & 0 deletions changelog.d/uk-spi-employment-pay-floor.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK SPI income stage now gives drawn employees current pay consistent with their twin's hours, and keeps the SPI tape's pay as their year of pay (uk-data#629). Stage 1 draws annual tape pay on age, sex, region and the bridge predictors but not on hours, and the tape holds part-year workers, so a copy whose FRS twin reports usual hours in an employee job could draw a year's pay below what those hours earn at the minimum wage and fail the minimum-income tests of the 30 hours' childcare offer, Tax-Free Childcare and the benefit cap more often than FRS rows. A new `floor_spi_employment_pay_at_minimum_wage` operation of `hmrc_spi_income_spine` lifts the drawn `hmrc_spi_pay` leaf to the twin's usual weekly hours (`hours_worked` read back at 52) times 52 weeks times the lower of policyengine-uk's `gov.hmrc.minimum_wage.non_apprentice` rate for the twin's age, read as the engine reads the build year (2024-25: £11.44 from 21, £8.60 from 18, £6.40 below), and the twin's own hourly pay, so no copy is held to a higher hourly rate than the FRS person it copies. The floored pay is the row's current pay; its `employment_income_annual_share` becomes its unfloored over its floored employment income, so the annual measures, which the HMRC income rows read, still read the tape's pay: low tape pay is read as part of a year at the floored rate. The operation runs after the stage-1 draw, the band-donor resample and the State Pension leaf guard, and before `employment_income` is derived from the leaves and stage 2 conditions on it, so the pension contributions (#1332's twin employer rate now applies to the floored pay) and every later stage read the floored current pay; the transport receipt keeps the unfloored draws' uniforms. It touches only drawn recipients other than reserved band carriers, whose twin has an employee main job, no trade and usual hours, and whose drawn pay is positive; FRS rows are never modified. Tape PAY is taxable pay, net of net-pay pension contributions and salary sacrifice, while the minimum wage binds gross pay: PAY alone is compared with the gross minimum, since it is the leaf of the engine's gross `employment_income` input. The stage evidence gains an `employment_pay_floor` receipt with eligible and floored source households (rounded), weighted people, the weighted share floored, the weighted mean uplift and the amount added, and an hourly-pay check: the weighted shares of the drawn employees below the minimum wage for their age before and after the floor beside the FRS employees' share, and the eligible rows still below their floor; every figure on one to nine source households, or beside a side on one to nine, is "<10". A new release-blocking stage gate, `uk_stage_hmrc_spi_income_spine_hourly_pay`, refuses a spine where an eligible drawn employee stays below its floor or where, after the floor, drawn employees sit below the minimum wage more often than FRS employees by more than two points; its details give verdicts only. The gate joins the spine gate scope, so spines saved before it no longer match a build's battery.
Loading
Loading