Skip to content

UK November event data, PR3: the carer link, the severe disability flag and part B (#1095) - #1583

Merged
juaristi22 merged 41 commits into
mainfrom
uk-event-data-pr3
Nov 12, 2026
Merged

juaristi22 merged 41 commits into
mainfrom
uk-event-data-pr3

Conversation

@juaristi22

@juaristi22 juaristi22 commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

PR3 of the November event-data plan (microcosm#1095), as one PR. It carries the carer link and the disability benefit fixes (A3a, A3, A4), part B's items (B1–B3, B5, B7, B10–B12; B4 is dropped), and the re-pin onto Chronicle 81caed75 (PolicyEngine/chronicle#436), on main b427c0ae1.

It stays a draft while the arms run. Their findings are added here as they land.

What's in it

A: the carer link and the disability flags

  • A3a, each disability benefit on the person it's for. The FRS puts Scotland's Child Disability Payment on a parent's BENEFITS row, with WHOREC naming the child. frs_spine summed each row by its own person, so a Scottish child's payment counted as the parent's. benefits_by_recipient now moves Attendance Allowance, DLA and Child Disability Payment, PIP and Adult Disability Payment rows to the household members WHOREC names, split evenly between two or more (María's ruling of 2026-11-10).
  • A3, the carer link. From 2.177.3 (pe-uk#2860), policyengine-uk pays Carer's Allowance and Carer Support Payment, and counts the UC carer element, only where cares_for_severely_disabled_person holds.
    • The spine reads the FRS care tab into the people each carer gives at least 35 hours a week, by the tab's band for each person cared for. The line is per person (ICA Regs 1976 reg. 4(1) and (1A)), so care spread over several people doesn't count (Vahid's review of 489fe32, Should 1; e8689bd5b).
    • frs_disability writes the link from those people's disability benefits, and draws carers of someone outside the household at the in-household share.
    • The SPI channel takes the link again after it re-imputes benefits.
    • carers_allowance_take_up reads the link for its pool, and the release exports it.
    • A3 (f): the stage receipt checks the link against DWP's UC carer element record on linked claims, in rounded counts and support bands.
  • A4, the tax credit severe disability flag is left to policyengine-uk's formula. A stored copy overrode the formula in every projected year, so a change to PIP's points thresholds never reached the tax credit severe disability elements or the working-age council tax reduction's child amounts.

B: what PR2 and Vahid's reviews of microcosm#1550 found

  • B1: ONS and HMRC's PAYE RTI payrolled employees aged 0 to 17 and 18 to 24 join as held-out diagnostics. At 2024-25 rules, the build's employer NICs relief for employees under 21 is £1.062bn against HMRC's £1.10bn outturn, so the employee base is not bound.
  • B2: England's PIP cases now bind in five broad age bands: 16 to 24, 25 to 34, 35 to 49, 50 to 64, and 65 and over.
    • At design weights the bands start 7% to 26% short.
    • In a measurement-only variant, every gate passed, the weight fence held within its limit, no other row moved by more than 2 points, and each band landed within 0.2%.
    • DWP's thirteen published England bands stay held out, as checks on the split within the broad bands.
  • B3:
    • Carer status on linked UC claims now follows DWP's record of the UC carer element. On those claims the build held a carer on about seven in ten whose award DWP records with the element, and about four in five of the ones it missed recorded no care at all.
    • Where nobody on such a claim reports care at the line, the claimant or partner who reports more care takes 35 hours. On a claim DWP also records with LCWRA, a claimant whom the LCWRA proxy flags is passed over, since a carer with LCWRA gets only that element (UC Regs 2013 reg. 29(4); Vahid's review of 489fe32, Should 2; e8689bd5b).
    • uc_take_up fits the households paid the LCWRA element jointly with its age fit. The target is DWP's 2025 average of 2,272,425 paid households.
  • B4 is dropped. It declared S4's two Scottish NSND rows at 2024, the outturn year, instead of uprating them by earnings.
    • The calibration's frame path can't measure them at 2024, because the engine computes the NSND taxes at the calibration period.
    • On María's decision of 12 November, both rows keep main's declarations (489fe323e): the outturn uprated to 2025 by average earnings, the taxpayer count read at 2025, and both held out of the solve.
    • The 2024 comparison stays a documented diagnostic: a simulation at 2024 on microcosm#1572's head build holds NSND within 0.2% of the outturn.
  • B5: DWP's people on UC aged 16 to 21 and 22 to 24 join as four held-out rows in two conditionality groups: "No work requirements" against uc_work_related_group_apart_from_earnings's NO_REQUIREMENTS, and the other regimes against every other value. policyengine-uk leaves out the earnings rules that move earners into "Working – no requirements", so only this two-way split is free of earnings. No 16–17 row and no 18–21 or 18–24 regime row exists.
  • B7: S1's two Scottish PRIS rows stay held out. The bound-variant solve fit them but took the SPI property amount in the £12,570 to £15,000 band from 13% to 18% low.
  • B11: the Scottish council tax level now nets out second homes and liable empty homes (Vahid's second review of microcosm#1550, Should 2).
    • The level is multiplied by Scotland's main-residence share at September 2024: 1 − 65,144 / 2,602,545 = 97.5%, from the Scottish Government's counts.
    • So the level falls by 2.5%, to about £3.31bn.
  • B10: P4 stays a stated limitation, now measured on every build. Two held-out Scotland rows compare the model with Social Security Scotland's ADP caseload and its Carer Support Payment caseload in payment, averaged over July to December 2025, after DWP's case transfers ended.
  • B12: the PIP points receipt says its country counts use the spine's weights before calibration (Should 1).
  • A fix found while preparing the re-pin: B1's rows declared their months twice, which the reference generator refuses. They now declare them once.

The re-pin onto Chronicle 81caed75

  • The consumer artifact has 2,094,003 facts (8045b138: 2,091,616), under the same row contract.
  • Every vendored resource is re-vendored.
    • Content moves in one: B11's Scottish dwelling counts.
    • B3's LCWRA households resource is new.
    • The rest change only their pin stamps. The DESNZ constituency resource keeps the same 2,526 values.
  • The national references gain PR3's 13 rows: 1,710 active references for 591 contract targets.
  • The compile-parity receipt adds those 13 rows. No existing target's compiled value moves, so the new feed changes nothing outside PR3's items. With main's declarations back, S4's two NSND rows compile on 81caed75 to main's values.
  • The H2 fixture regenerates byte-identically with A3's and B3's inputs. The concept golden is unchanged, and the coverage manifest is current.

Still to come in this PR

  • Arms (findings in the comment of 12 November):
    • The control on main b427c0ae1 matches microcosm#1572's bump arm.
    • This PR's arm at 7a2f9d7e3 stopped at the national targets node, on B4's NSND outturn row.
    • A calibrate-only variant on its spine, with main's declaration of that held-out row, passed 7/7 gates. It gives every item's reads.
  • María's decisions of 12 November:
    • B4 is dropped (above).
    • One bound row now 0.06 points past 10%, HMRC's count of employment income taxpayers with total income of £50,000 to £70,000, is accepted as a line-sitter.
  • Vahid's review of 489fe323e: Should 1 and 2 are fixed in e8689bd5b, and nits 3 and 5 in f6c904532. Whether the head is rebuilt for the fixes is María's call.
  • Not in PR3:
    • A2, the relock to policyengine-uk 2.178.x with #2901's UK totals, follows as its own bump PR.
    • B8, young adults on the local line, waits for the next local build.

Tests

  • Engine-free, after the re-pin: 1,259 targeted tests ran, and 1,247 passed. The 5 failures were pinned counts and identities, fixed in 2bda988f7 and the re-pin commit; those four files now pass. The feed-reading tests are skipped, as in CI.
  • Engine tier: 92 of 92 passed on policyengine-uk 2.177.7. That includes the carer link test, the LCWRA units test, release input coverage and parity.
  • Integration: the concept golden check, the coverage manifest --check, the H2 fixture --check and tools/ci_test_plan.py verify all pass.
  • Gate-battery pins: ef1af0678 moves the data contract's pins with this PR's gates.json. The pin sync, data contract and release assembler suites pass: 392 tests.
  • Engine-free with the country engines blocked, as on CI: PR3's 186 engine-free test files pass, 8,891 tests. 80f2457b6 stubs the one reader a test had left to the engine.
  • After the B4 restore: the 64 engine-free files that read the restored declarations pass, 3,051 tests.
  • After Vahid's Should 1 and 2: the 80 engine-free files on the carer stages pass with the engines blocked, 4,473 tests, and the engine-tier Carer's Allowance take-up tests pass. New tests take his two failure cases.

Disclosure

Every figure here is either a published statistic or a national or Scotland-level aggregate over many survey households. Stage receipts round their counts, band their support, and withhold any cell resting on one or two households.

🤖 Generated with Claude Code

juaristi22 and others added 30 commits November 11, 2026 23:46
recipients_by_country counts recipients at the spine's household weights at
the pip_points stage, before calibration. The receipt now says so, and that a
user netting Adult Disability Payment and Northern Ireland PIP recipients out
of a release at its calibrated weights should filter the release on region
rather than lift these counts (B12 of the November event-data plan's PR3,
microcosm#1095; Vahid's second review of microcosm#1550, Should 1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The FRS records a benefit received for someone else on the receiving adult's
BENEFITS row, with WHOREC1 to WHOREC5 naming the person it is for. Every Child
Disability Payment row sits on an adult's row and names the child, while DLA
for children sits on the child's own row. frs_spine summed each row by its own
person, so a Scottish child's payment counted as a parent's: the parent took
the DLA categories and disability flags, and the child lost the disabled child
elements.

benefits_by_recipient now moves Attendance Allowance, DLA and Child Disability
Payment, PIP and Adult Disability Payment rows to the household members WHOREC
names when it names anyone other than the row's own person, splitting a row
that names two or more evenly between them (that split awaits María's
signature). Rows naming nobody, only their own person, someone outside the
household (97) or a person number the household doesn't hold stay, as every
other benefit does. The stage's checkpoint evidence counts the moved rows in
rounded counts and support bands, and the spec's scope says so in lockstep.

A3a of the November event-data plan's PR3 (microcosm#1095). The H2 fixture
regenerates at PR3's integration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The spine now reads care.tab (one row per household and person helped:
NEEDPER, WHOLOO01 to WHOLOO14, HOUR01 to HOUR14) and stores
frs_care_recipients, a bitmask of each carer's main recipients: bit n for
household member n among the people given the carer's largest weekly band
(coded as HOURTOT), and bit 15 for anyone outside the household among them.
frs_disability will read it to write cares_for_severely_disabled_person
(A3 of the November event-data plan's PR3, microcosm#1095). It is a
stage-internal carrier the release drops.

care.tab joins FRS_SPINE_TABLES, the stage's pinned artifacts (spec and JSON
in lockstep), the outputs and non-negative outputs, the stage notes, the
graph's integer root cells, the release's dropped columns, the UK cut inputs
and the H2 fixture tool's synthetic tabs. The stage's checkpoint evidence
counts carers by where their main recipients live, in rounded counts and
support bands.

Tests: the carrier unit test and the spec and gates tests pass (94). The
fixture-build spine tests and the H2 regeneration wait for a free machine.

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

policyengine-uk 2.177.3 (pe-uk#2860) pays Carer's Allowance and Carer Support
Payment through caring hours, and counts them for the Universal Credit carer
element, only where the person cared for gets a qualifying disability benefit,
read from the input cares_for_severely_disabled_person (default true). A third
derive in frs_disability now writes it from the spine's care carrier, on
María's choices of 10 November 2026:

- true for a carer whose main care recipients include a household member with
  Attendance Allowance, DLA care (Child Disability Payment's included) at the
  middle or highest rate, or PIP or Adult Disability Payment daily living;
- a carer whose main recipients include someone outside the household and no
  such member is drawn at the share, by design weight, of the in-household
  carers at the hours line who report no Carer's Allowance that have such a
  member, balanced by weight within the strata of care hours at the line and
  below it, as carers_allowance_take_up drew its pool (her decision (a) of
  28 October);
- a carer with care hours and no link in the care tab keeps the engine's
  default, true; everyone else is false.

The stage's checkpoint receipt gives each route's records in rounded counts
and support bands, and the drawn route's share. The input's signed default
retires, the spec declares the operation, the output and the notes in
lockstep, and the graph gains the cell and the reads.

A3 of the November event-data plan's PR3 (microcosm#1095). Still to come:
the SPI refresh, the carers stage reading the input (its signed notes), the
export allow-list, the changelog and the regenerated surfaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The link read a carer's household members as household id times 1,000 plus
the person number, which holds on the spine's rows but not on the SPI and
CGT copies, whose ids shift by a power of ten above every id. It now keys a
member on household and person_id modulo 1,000, the FRS person number on
every row, so the SPI refresh can re-derive the household route on copies
(A3 of the November event-data plan's PR3, microcosm#1095). A test shifts a
frame's ids as a copy does and compares the routes that don't draw.

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

A3a moves a disability benefit row to the household members WHOREC names.
A row naming two or more children splits its amount evenly between them;
María signed that rule on 2026-11-10. The rule string the stage evidence
carries, the spine's scope text (spec YAML and source_stages.json in
lockstep) and the changelog fragment now cite the ruling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stage 2 of hmrc_spi_income_spine re-imputes the copies' disability
benefits, so a copy's carer can now look after a member whose benefits
qualify, or no longer do. Every row of the channel now takes
cares_for_severely_disabled_person again by frs_disability's rule, from
the benefits after the refresh, with the care carriers each copy keeps
from its twin (A3 (d) of the November event-data plan's PR3,
microcosm#1095; María's choices of 2026-11-10). Outside carers there are
drawn on their own identities at the share of the FRS channel's carers
at this stage's weights. The FRS rows keep frs_disability's values.

- frs_disability splits the rule into the routes, carer_link_share and
  derive_carer_link, which takes a share from other households and the
  keys its receipt counts support in. A route's record counts are now
  withheld where one or two households carry them.
- spi_income's _refresh_carer_link runs after the disability and carer
  take-up refreshes; its receipt (carer_link_refresh in the stage
  metadata) bands the source households whose link changed. A frame
  without the link passes through.
- The graph adds the link to the SPI stage's hidden bool cells; the spec
  lists it among the stage-2 flag refreshes and both stages' notes say
  so, YAML and JSON in lockstep.

Tests: test_uk_frs_disability.py and test_uk_spi_income.py 66 passed,
1 skipped (the licensed donor is not staged); test_uk_source_stages.py
with test_spec_engine_country_bundles.py 51 passed; test_uk_graph.py 19
passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
carers_allowance_take_up built its own pool of carers of a severely
disabled person: a carer whose largest in-household band reached the
hours when another member was is_severely_disabled_for_carers_allowance,
and any other carer on a second draw at the in-household share (María's
decision (a) of 2026-10-28). The build now writes the input the engine
reads for that, cares_for_severely_disabled_person (frs_disability, and
the SPI channel again), with that same rule for outside carers. So the
pool is now the carers at the hours whom the input holds caring for a
severely disabled person, and the claims the stage opens follow the rule
the engine pays by (A3 (e) of the November event-data plan's PR3,
microcosm#1095).

- The pool's second draw, its share, its strata check and the engine's
  is_severely_disabled_for_carers_allowance read are gone; the take-up
  draw, its rate, salt and strata are unchanged, the route still set by
  frs_care_hours_in_household.
- The receipt gives each route's share of carers at the hours reporting
  no allowance that the link holds (pool_share_in_household,
  pool_share_other) in place of the pool's draw share and strata.
- The stage's operations (engine variables, eligibility and strata
  text) and its notes are restated in the spec, YAML and JSON in
  lockstep; the notes come to María for her signature. frs_disability's
  notes say the stage drew its pool by her 28 Oct rule before.
- Tests: the engine-free file reworked to the link (39 passed); the
  engine-tier frames carry the link (run at integration).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cares_for_severely_disabled_person is an engine input the enhanced FRS
reference doesn't carry, so the export surface allows it: gates.json
and its mirror UK_ALLOWED_EXTRA_EXPORT_COLUMNS in terminal_gates.py.
The changelog fragment describes A3 as a whole (microcosm#1095).

Tests: test_uk_terminal_gates.py and test_uk_battery_bindings.py 153 of
154 passed; the one failure is the release input coverage manifest's
fingerprint of source_stages.json, regenerated at integration.
test_country_spec.py's export register test passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A3 (e) restated the notes of carers_allowance_take_up, whose pool now
reads cares_for_severely_disabled_person. María signed the restated
notes on 2026-11-11. The notes (spec YAML and source_stages.json in
lockstep) and the A3 changelog fragment now say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
policyengine-uk 2.177.7 derives is_severely_disabled_for_benefits from
the DLA care, PIP daily living and Attendance Allowance categories and
Armed Forces Independence Payment, which the build never writes. On the
stored categories that is the condition frs_disability stored, but a
stored copy overrode the formula in every projected year, so a change to
PIP's points thresholds never reached the tax credit severe elements or
the working-age council tax reduction's child amounts.

frs_disability, the SPI income chain and spi_benefit_coherence stop
writing it (graph cells and the spec, YAML and JSON in lockstep, follow).
The release and calibration boundaries drop a stored copy should one
appear. The eFRS parity register, the coverage manifest generator and
the export gate list it as formula-owned, marked for María's signature.
P1's notes now name the carer link, not the severe flag, as
frs_disability's reader of the PIP categories (for her signature too).
The engine test holds the formula on the stage's categories to the
condition. The committed coverage manifest is regenerated at integration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A carer at the 35-hour line who reports no allowance is paid Carer's
Allowance, Carer Support Payment in Scotland, and counts as a carer for
Universal Credit (is_carer_for_benefits, and so the UC carer element)
only where cares_for_severely_disabled_person is true. An engine-tier
test on policyengine-uk 2.177.7; it runs with the engine tier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
frs_spine reads BENEFITS.UCCAREEL on the claim's UC row into the carrier
frs_uc_carer_element: NONE or CARER on a claim with a linked record
(UCSTART present), NOT_LINKED on any other, whatever the column holds;
dropped at release. SN 9563's dictionary labels the column the weekly
carer element amount with no value labels; the 2024-25 file codes it 0
or 1 on every linked claim. Its reader shares Y1's UCLCW reader, whose
messages and behaviour are unchanged.

frs_disability's carer link receipt gains admin_uc_carer_element_check:
on each benefit unit with a linked claim, DWP's carer element against
whether the stage holds a claimant or partner a carer for Universal
Credit (the hours with the link true, or Carer's Allowance reported),
in rounded counts and support bands, with each side's share the other
holds, withheld where either side rests on one or two households. It
changes no value. The graph, the release boundary, the H2 fixture tool,
the spec (lockstep notes and outputs) and the tests follow.

The spine tests' synthetic frs_disability stage gains A3's carer link
operation and output, and the engine-free driver tests stub its hours
line; those fixture-build tests had waited since A3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
María signed A4 on 2026-11-11: is_severely_disabled_for_benefits is
formula-owned in the eFRS parity register, the coverage manifest
generator and the export gate, and P1's notes name the carer link as
frs_disability's reader of the PIP categories. The "for María's
signature" markers become "María's signature of 2026-11-11"; the
frs_disability notes (lockstep), the stage comment and the changelog
cite it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The manifest lists is_severely_disabled_for_benefits, which A4 leaves to
the engine, as a sixth reviewed exclusion beside main's five; since
microcosm#1574's current-build reference the manifest declares only its
reviewed exclusions. Regenerated with
tools/build_uk_release_input_coverage_manifest.py, and the manifest test
pins the six.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
would_claim_uc is a benefit unit input, so the one-person situations
refused it; the UC carer element is computed without it. The test now
passes on policyengine-uk 2.177.7: Carer's Allowance, Carer Support
Payment and the UC carer element follow the carer link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SPI channel's refresh (A3 (d)) carries derive_carer_link's evidence
into the stage's QRF evidence and so into the HMRC replay report, whose
freeze refuses row-data keys such as "records". PR3's spine build
stopped there. The route counts are carers on each route, so the key
now says so; the SPI income test runs the refresh's receipt through the
replay report's freeze.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HMRC's Scottish NSND outturn and taxpayer rows read 2024-25 facts. The
outturn row was uprated to 2025 by average earnings, which sat about 3
percent below NSND's growth while the thresholds are frozen; measured
at 2024 the head build of microcosm#1572 holds NSND within 0.2 percent.
Both rows now declare measurement_period 2024 with
require_matching_fact_period, as the CGT and excise rows do, and drop
the uprating; they stay held out of the solve. Their reviewed exclusion
texts are reworded for María's signature (her go of 2026-11-11 for B4
as recommended).

The committed target references, membership and compile-parity receipt
still describe the uprated row; they are regenerated once, at the end,
with the other contract changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At 2024-25 rules the build's employer NICs relief for employees under
21 is £1.062bn against HMRC's £1.10bn outturn, so the employee base is
right and is not bound (María's go of 2026-11-11, as recommended). Two
held-out contract targets follow it on every build: ONS and HMRC's
PAYE RTI payrolled employees aged 0 to 17 and 18 to 24 (feed 8045b138,
package ons-paye-rti-age-nsa-october-2026), the average of 2025's
monthly counts, against the people of those ages with employment income
in the year. Each has a reviewed measure exclusion for María's signature.
The contract counts move to 642 targets, 580 in the registry scope and
397 unmapped declarations.

The committed target references, membership and compile-parity receipt
are regenerated once, at the end, with the other contract changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bound-variant solve of 2026-11-11 (B7 of PR3, microcosm#1095; local
branch uk-s1-bound-variant-1095 on microcosm#1572's head spine) kept
uk_weight_ratio within its limit and fit both Scottish PRIS rows, but
took the SPI property amount in the GBP 12,570 to 15,000 band from 13 to
18 percent low and moved weight onto Scotland's highest SPI income
bands, which fails the receipts row's SPI property condition. On
María's ruling of 2026-11-11 both rows stay held out; their exclusion
texts record the solve.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
María signed on 2026-11-11 the reworded exclusions of S4's two Scottish
NSND rows (measured at 2024, the outturn year) and the new exclusions of
B1's two PAYE RTI rows (payrolled employees aged 0 to 17 and 18 to 24).
The "for María's signature" markers become "María's signature of
2026-11-11".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the FRS's linked UC claims the build held a carer on about seven in
ten claims whose award DWP records with a carer element; of those it
missed, about four in five recorded no care at all. DWP pays the element
only for caring at least 35 hours a week for a severely disabled person
(María's ruling of 2026-11-11).

frs_spine: where no claimant or partner of such a claim reports 35 or
more care hours or Carer's Allowance, the UC row's person takes 35 care
hours, HOURTOT code 5's lower edge (frs_dwp_carer_care_hours; receipt
dwp_carer_hours, people raised by the survey's prior answer, rounded and
banded). frs_disability: the claim's carers at the line are linked
whatever the care tab says (receipt dwp_carer_element; the link's
parameters and the spec, YAML and JSON in lockstep, say so). The SPI
copies carry the carrier, so their refresh applies the same rule. Claims
without a linked record keep the survey's answers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At the spine's design weights the households paid the LCWRA element started
about a quarter below DWP's count, and Y1 showed the gap is take-up, not the
limited capability flags (B3 of the November event-data plan's PR3,
microcosm#1095; María's choices of 2026-11-11: the joint fit, and a passed
shortfall only to units with neither mark).

The stage's one engine materialization also returns uc_LCWRA_element on the
temporary claiming copy, so a unit has the element where its award would
include it. A drawn unit's claim odds are its pool's base odds times each
ratio that applies (the age fit's, and a second for the element), and the four
groups' rates together realize the pool's count, each in the order of the
uniform. The two ratios are solved in turn over Great Britain, each with the
other held, until neither log moves by more than 1e-4 (at most eight rounds),
for DWP's young people count and DWP's paid UC households with the LCWRA
element, January to December 2025 averaged (2,272,425, the value the bound
dwp.uc.households_lcwra_element row compiles). A passed shortfall fills only
units with neither a young claimant or partner nor the element. Without the
LCWRA inputs the stage keeps the age-only path unchanged.

The manifest declares the new artifact (dwp_uc_lcwra_households_facts.json),
its verify operation over the twelve monthly record sets, uc_LCWRA_element
among the predictors, and three keys on assign_award_band_take_up_residual
(lcwra_units, lcwra_targets, lcwra_fit), which the sources schema carries; the
vendor selection takes Great Britain's two LCWRA rows of each month. The
resource itself, with its country-package entry, is vendored with the re-pin
onto Chronicle 81caed75, so until then the two tests that read it fail.

Tests: the count reader and its refusals; the LCWRA fit keeping the pool count
while meeting DWP's count; the joint fit meeting both counts on four groups
(realized exactly at 10, 5, 15 and 10 claims); the out-of-reach bound; the
unplaced shortfall; the inputs' refusals; and the redraw's plumbing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vel (B11)

S2(a) levels the FRS's Scottish council tax bills to the 2024-25 liability of
every chargeable dwelling (CTAXBASE 2025 Band D equivalents at September 2024
times CTAS 2026's average Band D, about GBP 3.39bn). That liability includes
21,606 second homes and 43,538 empty homes liable for council tax (empty more
than 6 months) at September 2024, which no FRS household occupies (Vahid's
second review of microcosm#1550, Should 2; B11 of the November event-data
plan's PR3, microcosm#1095).

PolicyEngine/chronicle#436 (merged 2026-11-11 as 81caed75) packages the
Scottish Government's Second Homes and Empty Properties in September 2025. The
level is now the liability times Scotland's main-residence share: one less
those 65,144 dwellings over CTAXBASE 2024's 2,602,545 chargeable dwellings,
97.5%, so the level falls by 2.5%, to about GBP 3.31bn. The share is in
dwellings, since no published table splits Band D equivalents by class; the
premiums councils can charge such dwellings, and homes empty 6 months or
less, which are not counted, make it a lower bound on what no FRS household
holds. The receipt records the counts, the share and the level before and
after.

The vendored scotgov_band_d_liability_facts.json gains Scotland's three rows
(selections added; vendored with the re-pin onto 81caed75, so the committed
resource test fails until then), the stage's verify operation lists their
record sets, and the levelling operation's level text, the stage's source and
the S2(a) notes are restated in YAML and JSON. The restated notes and the
changelog await María's signature (Text B, signed on 2026-11-10, called the
netting a follow-up).

Tests: the share from Scotland's three counts, ignoring a council's and a
band's rows; its refusals (a missing, repeated, non-Scottish or non-positive
count, and counts not below the chargeable stock).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The LCWRA fit puts a unit in its group where the stage's one materialization,
on the copy where every unit claims, returns uc_LCWRA_element above zero. On
policyengine-uk 2.177.7 a claimant with uc_limited_capability_for_WRA gets the
element and the award rises with it, a claimant without the flag does not, and
a lone parent whose child carries the flag does not either (the engine gives
that award the disabled child addition instead), so only the first unit is an
LCWRA unit (B3 of the November event-data plan's PR3, microcosm#1095).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
María's call 7 of 2026-11-11 ("Yes, bind them"), after the measurement-only
variant b2b-8222c (calibrate-only on bump-2177m's spine): every gate passed,
the weight fence held within its limit, no other row moved by more than 2
points or crossed 10 percent, and the five bands landed within 0.2 percent from 7 to 26
percent short at design weights. P3's thirteen published bands, held out,
roughly halved their mean error but keep the split within each broad band
off (B2 of the November event-data plan's PR3, microcosm#1095).

The contract gains dwp.pip.cases_england_aged_{16_to_24, 25_to_34, 35_to_49,
50_to_64, 65_and_over}, each the sum of DWP's published bands at the four
quarter-ends of 2025, averaged (monthly_window_sum_average), with the model's
people with a PIP award; they sit after the 75-and-over band in the registry
scope with an unmapped declaration (uk-data binds no PIP row by age). The
thirteen English age bands' exclusion reason and adjudication are restated,
for María's signature: checks on the split within the bound broad bands.
Pinned counts move to 647 targets, 585 in the registry scope and 402 unmapped
declarations. The references and membership regenerate with the re-pin onto
Chronicle 81caed75, so the reference tests fail until then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
María signed the restated tail of frs_council_tax's notes, the Scottish
level times Scotland's main-residence share at September 2024 (B11 of the
November event-data plan's PR3, microcosm#1095), on 11 November 2026. The
notes (sources.yaml and source_stages.json in lockstep) and the changelog
now carry her signature.

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

María signed the restated exclusion of DWP's thirteen published England
PIP age bands, now held out as checks on the split within the five bound
broad bands (B2 of the November event-data plan's PR3, microcosm#1095), on
11 November 2026. The thirteen adjudications and the changelog carry her
signature in place of the "restated for María's signature" marker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B1's two held-out PAYE RTI rows (a4a3e0721) named their twelve 2025 months
twice: in the ledger selector's period_value and in measurement.source_months.
tools/generate_uk_target_references.py refuses source_months outside the DWP
monthly families (SOURCE_MONTH_FAMILIES), so the re-pin's national references
would stop on them. The selector carries the same twelve months, as
ons.public_sector_employment's monthly window does, so the duplicate goes. The
rows' meaning and their signed exclusions are unchanged.

test_packaged_exclusions_load now counts B1's two exclusions (137).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ity caseloads (B5, B10)

B5 (María's go and signature of 2026-11-12): four held-out rows split DWP's
people on Universal Credit aged 16 to 21 and 22 to 24 by conditionality regime
(Stat-Xplore, PolicyEngine/chronicle#420 item 3), at the bound age rows' four
quarterly points of 2025. policyengine-uk's
uc_work_related_group_apart_from_earnings leaves out the earnings rules that
move earners into "Working - no requirements", so the split has two groups:
"No work requirements" against NO_REQUIREMENTS, and the other five regimes
(with "Unknown or missing" from 18) against every other value, NOT_A_CLAIMANT
included, so each pair adds to its age row. No 16 to 17 row and no 18 to 21
or 18 to 24 regime row exists, so 16 to 17 can't be given back by difference.

B10 (her go and signature of 2026-11-12): two held-out Scotland rows measure
P4's stated limitation on every build: Social Security Scotland's Adult
Disability Payment caseload against people in Scottish households with a PIP
award (the spine reads ADP as PIP), and its Carer Support Payment caseload in
payment against carers with carer_support_payment above zero, each the mean
of the month-end caseloads from July to December 2025, after DWP's case
transfers finished (chronicle#425's packages, in the pin). The new family
scotgov_social_security_caseload declares its months in the selector, as
ons.public_sector_employment does.

Six signed exclusions hold the rows out of the solve. The contract moves to
653 targets, 591 in the registry scope and 408 unmapped declarations; the
packaged exclusions to 143. The references, membership and compile-parity
receipt regenerate with the re-pin onto Chronicle 81caed75.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22 and others added 8 commits November 12, 2026 01:46
The tests that list targets by family or geography now include the rows PR3
adds (microcosm#1095): B2's five broad England PIP bands among the PIP
geography pins (99), B5's four UC conditionality-group rows among the
Great Britain UC bindings (42) and the monthly-sum UC operations, with
their own check of dimensions, months and regime cells (no unknown-regime
cell at 16 or 17), and the 1,710 active references the re-pin compiles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR3's re-pin (microcosm#1095), in docs/uk-chronicle-feed-repin.md's order,
from Chronicle main after PolicyEngine/chronicle#436: the UK suite's
consumer artifact at 81caed75 carries 2,094,003 facts (8045b138: 2,091,616)
under the same row contract.

- The pin (chronicle_feed.json) and the local validation register's source
  feed move to 81caed75.
- Every vendored resource is re-vendored from the full artifact. Content
  moves in one: scotgov_band_d_liability_facts.json gains Scotland's
  chargeable dwellings, second homes and empty homes at September 2024,
  which B11's main-residence share reads. dwp_uc_lcwra_households_facts.json
  is new, Great Britain's paid and nil LCWRA households for each month of
  2025, which B3's joint fit reads; the country package declares it. Every
  other resource changes only its pin stamps.
- The DESNZ constituency energy resource is rebuilt on the new feed: the
  same 2,526 values, with new input digests.
- The national references and membership gain the 13 rows PR3 adds (B1's
  PAYE RTI pair, B2's five England PIP bands, B5's four UC conditionality
  groups, B10's two Social Security Scotland caseloads): 1,710 active
  references for 591 contract targets. The local references and membership
  change only their feed label, and the local census and the release input
  coverage manifest only their source digests.
- The national compile-parity receipt lists the 13 new rows as ledger-only;
  the one value that moves is S4's Scottish NSND outturn, now measured at
  2024 (B4). No other target's compiled value moves, so the feed changes
  nothing outside PR3's items.
- The H2 fixture regenerates with A3's care tab, A3 (f)'s UC carer element
  column and B3's resource in the stage contract hashes, and regenerates
  byte-identically. The concept golden is unchanged, the release input
  coverage manifest is current, the high-value home stock's feed inputs pass
  on the new pin, and tools/ci_test_plan.py verifies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A3 added care.tab to frs_spine's pinned artifacts and FRS_SPINE_TABLES, but
the country spec's raw-source list (sources.yaml's sources) and the spine's
FRS channel (spine.yaml) still named the fourteen earlier tables, so
build_uk_country_graph's projection check refused the spec (engine-uk CI,
test_country_adapter_compiles_the_same_full_graph_with_all_targets_default).
Both now list frs_care between frs_benunit and frs_child, with the stage
artifact's digest and size. The full build reads only the atomic-area
support register from the country adapter, so no build output moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B5's UC conditionality groups filter on uc_work_related_group_apart_from_earnings
and B10's Scottish carer row on carer_support_payment (microcosm#1095). Both
are engine-computed at the calibration period, and the frame stores no copy,
so test_plain_column_population_variables_are_reviewed lists them with that
reason (microcosm#1324's review of stored reads).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR3's gates.json gains A3's export entry (person.cares_for_severely_
disabled_person) and A4's reviewed export exclusion (person.is_severely_
disabled_for_benefits, signed by María on 2026-11-11). They move the
committed spec's policy and manifest digests, its fingerprint, and the
release cut's scoped digests. The data contract's mirrors and the
contract test's local copies move with them, as the comment beside the
pins asks; the spine and calibration seam parts are unchanged.

Found by CI's engine-free job at fe1d22a (test_uk_release_assembler's
green release). The build shard's mirror sync tests, the data contract
tests and the release assembler tests pass: 392 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B5 adds four UC people rows by conditionality group: one operand per
single year and regime on the four quarterly points of 2025, with DWP's
"Unknown or missing regime" from age 18. B2 adds England's five broad PIP
age bands, each summing the fine bands' quarterly points. The shipped
counts move from 120 to 124 UC references and from 94 to 99 PIP
references; the windows, operations and operand counts are asserted for
the new rows. Found by CI's engine-free job at ef1af06. The UC test
files pass: 247 tests.

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

PR3's carer link (A3) makes UKFRSDisabilityStageTransform read
gov.dwp.carers_allowance.min_hours at the survey year when no hours are
given. test_disability_stage_resolves_the_survey_year_not_the_frame_period
stubbed the category and flag readers only, so on the engine-free job, which
has no policyengine-uk, the stage's call into the DWP tree raised ImportError.
The test now stubs the hours reader too and checks that all three readers
resolve the survey year, 2024.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B4 declared HMRC's Scottish NSND outturn and taxpayer rows at 2024, the
outturn year, without uprating. The calibration's frame path cannot measure
them there: it refuses a row measured off the calibration period whose
measure the engine computes (earned_income_tax, property_income_tax), and
the uprating-holds check stopped this PR's arm on the outturn row.

On María's decision of 12 November, both rows go back to main's
(b427c0a) declarations: the outturn uprated to 2025 by average earnings,
the taxpayer count read at 2025, both held out of the solve. Their entries
in the contract, the measure exclusions, the target references and their
membership, and the compile-parity differences are main's, and B4's
changelog fragment is removed. On Chronicle 81caed75 both rows compile to
main's parity values. B4's 2024 comparison stays a documented diagnostic.

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

Copy link
Copy Markdown
Collaborator Author

Arm findings, 12 November

Every run used review date 2026-11-12.

What ran

  • Control ctl-b427c: main b427c0ae1 on Chronicle 8045b138. It matches microcosm#1572's bump arm exactly:
    • 7/7 gates;
    • loss 0.28054 → 0.00510;
    • 98.8% of 1,528 bound rows within 10%;
    • no row moves by more than 2 points.
  • This PR's arm at 7a2f9d7e3: the spine built, then the calibration stopped at the national targets node.
    • The uprating-holds check (microcosm#1123) found S4's NSND outturn row with neither an uprating index nor a hold, after B4 dropped its earnings index.
    • María has since decided B4 (below).
  • Variant pr3v-b35d9d: a calibrate-only run on that spine.
    • Its commit, b35d9d8eb, is on no branch and will not be pushed. It is this PR's fe1d22a64 with main's declaration of the NSND outturn row restored: its contract entry and target reference, identical to those at b427c0ae1.
    • That row is held out of the solve, so the weights are the ones this PR gives.
    • Of the commits pushed since, three change no build output: ef1af0678 moves the data contract's gate-battery pins, and 8eb97f9db and 80f2457b6 update tests. 489fe323e restores main's declarations of S4's two NSND rows (below).

The variant against the control

  • 7/7 gates; loss 0.27477 → 0.00507; 98.8% of 1,534 bound rows within 10%.
  • Six rows join the solve: B2's five England bands, and one UC payment band that main's build leaves out of it.
  • Eight bound rows move by more than 2 points. Only one crosses 10%: HMRC's count of employment income taxpayers with total income of £50,000 to £70,000, which moves from 9.7% short to 10.1% short. It starts 24% short at design weights in both arms.

Item reads

Held-out rows were measured on each release through the calibration's own frame path. The bound rows read beside them reproduce each arm's final estimates exactly.

Every model figure quoted here rests on 10 or more survey households, each counted once however many Microcosm records it carries. Where this comment compares this PR with main, the change comes from a rule applied across many households or from the solve's reweighting, not from one or two households.

  • A3 and B3, carers
    • The UC carer element (DWP: 1.08m households) starts at 0.81m at design weights, against 0.71m on main. Both arms land within 0.1%.
    • On linked UC claims, the stage now holds a carer on every claim whose award DWP records with the element. Before B3 it held one on about seven in ten. About 12% of the carers it holds on those claims have no element in DWP's record.
    • OBR's Carer's Allowance spending starts 17% short and lands within 0.1% in both arms.
    • Social Security Scotland's Carer Support Payment caseload (B10, held out) is 42% short.
  • B2, PIP by age
    • The five bound England bands start 7% to 26% short at design weights and land within 0.2%.
    • DWP's thirteen held-out England bands check the split within them. Their mean absolute error falls from 19.0% on main to 11.8%, and 9 of the 13 are outside 10% (10 on main).
    • Within the broad bands the split stays uneven: ages 16 to 19 are 14% high and 20 to 24 are 12% low; 40 to 44 are 24% high and 45 to 49 are 18% low; 75 and over are 27% low.
  • B3, LCWRA
    • Households with the LCWRA element (DWP: 2.27m) start at 1.71m at design weights, against 1.72m on main, and land within 1% in both arms.
    • Inside this PR's take-up stage, the joint fit lifts them from 1.59m to 1.71m. So another change in this PR lowers the count before the fit by about as much as the fit adds. That change is not yet identified.
    • Young people on UC (16 to 21, 22 to 24) land within 0.1%.
    • Single households without children start 7.0% short (5.1% on main), as B3's read expected, and land 3.9% high in both arms.
  • B9: UC households with three children are 9.6% short, still inside 10%.
  • B11: OBR's Scottish council tax receipts (held out) move from 19.0% to 16.0% high, as every Scottish household's council tax is netted of second homes and empty homes. England is 2.2% low and Wales 2.7% low.
  • B1 (held out)
    • HMRC's PAYE RTI payrolled employees aged 18 to 24 are 10.7% short.
    • For ages 0 to 17, the build holds about a tenth of HMRC's count. That gap is not yet examined.
  • B5 (held out; every model cell rests on 30 or more survey households)
    • The 16 to 21 total is bound, and its split leans towards "No work requirements": 28.5% high, with the other regimes 15.8% low.
    • For 22 to 24, "No work requirements" is 6.1% high and the other regimes 4.5% low.
  • B10 (held out): ADP's caseload is 34.6% short. Carer Support Payment is as above.
  • B7 (held out): PRIS's Scottish rental income is 5.4% high and its expenses 18.0% high.
  • B4: the calibration's frame path cannot measure the NSND outturn row at 2024.
    • It refuses the row because the engine computes the NSND taxes at the calibration period, not at 2024.
    • B4's 2024 comparison stays the separate simulation read on microcosm#1572's head build: NSND 0.15% above the outturn, taxpayers 2.4% above.

María's decisions, 12 November

  1. B4: S4's two rows go back to main's declarations, in 489fe323e. The outturn is uprated to 2025 by average earnings, the taxpayer count is read at 2025, and both stay held out of the solve, as on main. Both rows compile on Chronicle 81caed75 to main's values exactly. B4's 2024 read stays a documented diagnostic, from the simulation above.
  2. The £50,000 to £70,000 employment count at 10.1% short is accepted as a line-sitter, as with B9.

Next

This PR's head, 489fe323e, is rebuilt next, spine and calibration, and certified before 16 November. The two NSND rows are held out of the solve in both runs, so the head should reproduce the variant's weights.

@vahid-ahmadi

Copy link
Copy Markdown
Contributor

Review of 489fe32

I read the code and config against main b427c0ae1: A3a, A3 (with A3 (f)), A4, B1 to B3, B5, B7, B10 to B12, the B4 restore and the re-pin. I checked the law-facing rules against legislation.gov.uk and policyengine-uk's current formulas. In a fresh clone I ran the engine-free tests one file at a time: test_uk_frs_spine, test_uk_frs_disability, test_uk_carers_allowance_take_up, test_uk_frs_council_tax, test_uk_uc_take_up, test_uk_chronicle_feed, test_uk_pip_points, test_uk_spi_income, test_uk_measurement_period and test_uk_uc_source_periods. All passed (1 skip in test_uk_spi_income). I don't comment on the head's rebuild, which hasn't run yet.

From #1550: Should 2 (second and empty homes in Scotland's level) is now fixed in code. frs_council_tax.py:353 uses chronicle#436's counts at September 2024. 21,606 + 43,538 = 65,144, and 1 − 65,144 / 2,602,545 = 0.97497. That is £3.393bn × 0.975 = £3.308bn, matching the body. Should 1's note on net-out weights is in (pip_points.py:188, B12). Nit 3 (points stored as totals) is unchanged here and still stated.

Should

  1. The carer link counts care spread over several people towards the 35 hours (frs_spine.py:2028-2029; frs_disability.py:517, :521; carers_allowance_take_up.py:327). The link is true when any of a carer's main recipients qualifies, where "main" means the people given the carer's largest care-tab band. That band is never checked against the line. Only care_hours is, and HOURTOT is total care given to everyone. The Social Security (Invalid Care Allowance) Regulations 1976 reg. 4(1) needs at least 35 hours a week "in caring for that severely disabled person", and reg. 4(1A) says care for two or more people counts only where one of them gets 35 hours, "considered without reference to any other". UC Regs reg. 30(1)(a) reads the same conditions into the carer element, and SSI 2023/302 reg. 5(2) does the same for Carer Support Payment. Failure case: I ran frs_care_recipients and derive_carer_link on a carer giving 20 to 34 hours (band 4) to a member on PIP daily living, and 20 to 34 hours to a member with no benefit. HOURTOT is band 6. The link came back true, so the engine opens Carer's Allowance and the carer element to someone the law doesn't. Main wasn't per person either, because its in-household bands group people. But there, a carer whose largest in-household band was under the line was drawn at the share, and here linked sets them true. The care tab's HOUR01 to HOUR14 give the band per person, so the rule can now be checked. Suggested fix: carry whether the main recipients' band reaches min_hours, for example as one more bit or a second carrier, and let linked need it. Then count in the receipt the carers this turns false.
  2. B3 can raise the hours of the claimant who holds LCWRA, and then the engine pays no carer element (frs_spine.py:2545-2550). The raise always goes to the UC row's person. Failure case: a joint claim whose UCLCW is LCWRA and UCCAREEL is 1. The UC row's person A gets PIP daily living, and partner B reports 20 to 34 hours of care and no Carer's Allowance. A is raised to 35 hours, dwp_carer sets A's link, and Y1 keeps A's proxy LCWRA flag. policyengine-uk's uc_carer_element_included_for_claimant then applies UC Regs reg. 29(4), which gives a carer with LCWRA "only the LCWRA element". So the claim has no carer element in the engine, though DWP records one. The A3 (f) check counts this claim under "both", because it reads hours and the link, not the element. DWP's own record of LCWRA and the carer element on one joint claim already means the carer isn't the claimant holding LCWRA, so the UC row's person is the wrong default there. Suggested fix: on a joint claim, raise the claimant or partner who reports more care hours. Where UCLCW is LCWRA, skip a member whom Y1's proxy, is_disabled_for_benefits, would make the LCWRA holder. Or count in the receipt the raised people on an LCWRA-status claim whom that proxy flags, so the size is known.

Nit

  1. The re-pin has no changelog fragment, and docs/uk-chronicle-feed-repin.md has no 81caed75 section. The last re-pin has both: 1095-uk-feed-repin-8045b13.changed.md and the doc's 8045b13 section. One fragment and one short section would record the facts the pin adds (B11's three counts and B3's LCWRA resource).
  2. B11's remaining gap has no issue (changelog.d/1095-uk-scottish-main-residence-share.changed.md:7-9). The note says the dwelling share nets out less than these homes' liability, because of premiums and the 6-month line. It also calls a per-nation D14f share "a later option". Neither has an issue number. Round 2 asked for one.
  3. Who a carer cares for stops at the release (national_frame.py:733-741). The legacy SDP carer condition, IS Regs 1987 Sch 2 para 13(2)(a)(iii) and HB Regs 2006 Sch 3 para 14(2)(a)(iii), turns on whether someone gets a carer benefit "in respect of caring for him". policyengine-uk's is_cared_for_by_carer_benefit_recipient guesses that, and gives a carer to a claimant or partner in their own unit first. A3 now holds drawn carers of someone outside the household, so that guess can take an SDP off a member the care tab says nobody cares for. The rule is the engine's, but one line in the A3 changelog would record that the build knows the recipient and drops it.

On the LCWRA households the comment of 12 November can't place (1.59m before the fit): one candidate is A3a. Y1's proxy is is_disabled_for_benefits, set from reported disability benefits. A3a moves those off an adult who receives them for someone else, so that adult loses the proxy on unlinked claims and in the redraw's entrants. If so, the drop corrects an error rather than adds one. Scotland's CDP caseload is around 100,000 children, so CDP alone looks too small for the whole gap. The A3a receipt's by_code would show how many rows of each code moved.

Checked and fine

  • Re-pin: chronicle_feed.json changes only source_commit (81caed75), fact_row_count (2,094,003) and the two hashes. In each of the 38 4/4 resources, only those four fields change. In desnz_constituency_energy_facts.json, all 2,526 rows, keyed by record id, keep their value and every other field. Only derived keys and source hashes change. The local membership, census and validation levels change only pins. 8045b13 is left only in provenance text, with no live pin. The target file gains exactly the 13 rows and changes none of main's 640, so the B4 restore leaves both NSND rows as on main. The compile-parity file only adds 13 ledger_only entries and moves its three counts by 13.
  • A3a: benefits_by_recipient drops each moved row and adds pieces that sum to its benamt. I checked this on one row naming a child and one naming two children: total £325 before and after. Child Benefit and other codes don't move. WHOREC 1 to 14 maps to household × 1000 + n, the spine's own person_id (frs_spine.py:746). 97, unheld numbers and own-person rows stay put. Codes 121 and 122 (CDP), and 117 and 118 (ADP), are in the moved families.
  • A3 qualifying benefits (frs_disability.py CARER_LINK_QUALIFYING) match SSCBA s.70(2): Attendance Allowance at either rate (Pension Age Disability Payment shares code 12), DLA or CDP care at the middle or highest rate, and PIP or ADP daily living at either rate. SSI 2023/302 reg. 2's "qualifying disability benefit" gives the same list for Carer Support Payment. CDP's care rates come from SSI 2021/174 and ADP's daily living rates from SSI 2022/54 reg. 5. AFIP and Constant Attendance Allowance aren't seen, as the notes say.
  • A3 (f) and B3: UC Regs reg. 30(1) defines the element's caring by the Carer's Allowance conditions, earnings and Scottish residence aside. So holding a carer on a claim DWP records with the element is lawful, subject to Should 1 and 2.
  • A4: is_severely_disabled_for_benefits is the tax credit condition (CTC Regs 2002 reg. 8, WTC Regs 2002 reg. 17). On the stored categories, policyengine-uk's formula gives what the stored copy gave. The legacy SDP reads its own wider list (receives_severe_disability_premium_qualifying_benefit), which matches HB Sch 3 para 14(2)(a)(i) and IS Sch 2 para 13(2)(a)(i), so A4 doesn't touch it. policyengine-uk has no UC transitional SDP element, and nothing here depends on one.
  • B3 LCWRA fit: the target averages the twelve 2025 paid months and refuses a missing or repeated month. The four group rates realize each pool's count by bisection, and a passed shortfall avoids young and LCWRA units.
  • B1, B2, B5, B10: the new rows I read (one or two of each) bind what their notes say. B5's two groups split uc_work_related_group_apart_from_earnings's five values into NO_REQUIREMENTS and the other four, so the split is exhaustive. B10's ADP row counts pip > 0 in Scotland, consistent with the 117/118 mapping. B7 and B12 change text only.
  • B4's drop: the reason (the frame path refuses an engine-computed row off the calibration period) is in the commit and the body. The 2024 read stays a diagnostic.

CI at 489fe32: lint, wheels, installed-emitter, select-countries, integration-uk, engine-uk (3.13, 3.14) and engine-us (3.13, 3.14) pass. engine-free (3.13, 3.14) were still running after the 15 minutes I waited.

Verdict: A3a, A4, B11 and the re-pin are sound. Should 1 (the 35 hours per person) and Should 2 (which claimant B3 raises) both change who the engine pays, so they are worth settling before the head is certified.

🤖 Generated with Claude Code

Vahid's review of 489fe32 on microcosm#1583, nits 3 and 5:
- The re-pin onto Chronicle 81caed75 gets a changelog fragment and a
  section in docs/uk-chronicle-feed-repin.md, as 8045b13's has: what
  PolicyEngine/chronicle#436 adds, the two vendored resources whose
  content moves (B11's three Scottish counts and B3's new LCWRA
  resource), and the references, membership and compile-parity moves.
- A3's changelog records that the release drops who each carer cares
  for, so policyengine-uk's guess at the legacy severe disability
  premium's carer condition stays, and can take the premium off a member
  whom the care tab says nobody cares for.

Docs only: no build output changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vahid's review of 489fe32 on microcosm#1583, Should 1 and 2; María's
decision of 12 November to fix both in PR3.

Should 1, the line is per person cared for. The Social Security (Invalid
Care Allowance) Regulations 1976 reg. 4(1) need 35 hours a week caring for
the severely disabled person, and reg. 4(1A) counts care for two or more
people only where one of them gets 35 hours on their own; UC Regs 2013 reg.
30(1)(a) and SSI 2023/302 reg. 5(2) read the same conditions into the
carer element and Carer Support Payment. The link read only HOURTOT, care
to everyone, so a carer giving 20 to 34 hours to each of two people, one
of them qualifying, was linked.
- frs_care_recipients now marks the people a carer gives at least 35
  hours by the care tab's band for each person (codes 5, 6, 7 and 10), and
  a helper bit for every carer the tab lists, in place of the people at
  the carer's largest band.
- frs_disability's link reads only those people. A listed carer who gives
  nobody the line is false, and the drawn route's share is taken over the
  carers who give only household members the line. It refuses an engine
  minimum other than 35 hours, which the bands mark exactly.
- The receipts count the listed carers who give nobody the line.

Should 2, which claimant B3 raises. B3 gave 35 hours to the UC row's
person. On a joint claim DWP records with LCWRA and the carer element,
that person may be the one Y1's proxy gives LCWRA, and a carer with LCWRA
gets only that element (UC Regs 2013 reg. 29(4)), so the engine paid no
carer element where DWP records one.
- frs_dwp_carer_care_hours raises the claimant or partner who reports more
  care hours, the UC row's person on a tie.
- On a claim DWP records with LCWRA, it passes over a claimant whom the
  LCWRA proxy flags while another isn't: frs_lcwra_proxy reads
  is_disabled_for_benefits, unless the person's own ESA award lacks the
  support component, as policyengine-uk's formula does.
- The receipt counts the raises that go to the partner, and the LCWRA
  claims where the proxy moves the raise or flags every claimant.

Tests take Vahid's two failure cases, the bands at and below the line,
the tie and the proxy's ESA exception; the carer-link, SPI and spine
fixtures carry the helper bit. A3's and B3's changelog fragments restate
the rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juaristi22
juaristi22 marked this pull request as ready for review November 12, 2026 11:36
@juaristi22

Copy link
Copy Markdown
Collaborator Author

Thanks, Vahid.

Should 1 and 2 are fixed in e8689bd5b, on María's decision of 12 November.

  • Should 1: frs_care_recipients now marks the people a carer gives at least 35 hours a week, by the care tab's band for each person, and the link reads only them.
    • A listed carer who gives nobody the line is false, so your case of 20 to 34 hours to each of two people comes back false.
    • The drawn route's share is taken over the carers who give only household members the line.
    • The link refuses an engine minimum other than 35 hours, which the bands mark exactly.
    • The receipts count the listed carers who give nobody the line.
  • Should 2: B3's raise goes to the claimant or partner who reports more care hours, or to the UC row's person on a tie.
    • On a claim DWP records with LCWRA, it passes over a claimant whom the LCWRA proxy flags while another isn't. The proxy is is_disabled_for_benefits, unless the person's own ESA award lacks the support component, as policyengine-uk's formula reads it.
    • The receipt counts the raises that go to the partner, and the LCWRA claims where the proxy moves the raise or flags every claimant.
  • Both of your failure cases are now tests.
  • On the FRS, the two stages alone now hold about 2% fewer carers the engine can pay, at design weights. A3 (f)'s check moves towards DWP's record: of the claims where the stage holds a carer, the share DWP records with the element rises from 89.3% to 90.1%. The head hasn't been rebuilt with the fixes yet.

Nits 3 and 5 are in f6c904532:

  • The re-pin onto 81caed75 has a changelog fragment and a section in docs/uk-chronicle-feed-repin.md, as 8045b13's has.
  • A3's changelog now says the release drops who each carer cares for, so policyengine-uk's guess at the legacy severe disability premium's carer condition stays.

Nit 4, an issue for B11's remaining gap (the premiums, the 6-month line and a per-nation D14f share), is still to do.

The LCWRA households before the fit: thanks for the lead on A3a. The rows A3a moved are mostly Child Disability Payment (codes 121 and 122) and Attendance Allowance (code 12), spread over 30 or more households. An adult who received one of those for someone else can lose Y1's proxy. We'll check whether that accounts for the drop.

juaristi22 added a commit that referenced this pull request Nov 12, 2026
…evel fits

Addresses the review of 350ae4a on #1584.

- The donor_frame receipt's counts of tape records go through rounded_count,
  as every stage receipt's do (microcosm#1164). The sampled count is the
  frame's rows less the rounded carrier count, so the pair gives nothing back
  by difference; the whole-tape branch rounds its record count, and the
  effective rows are rounded too.
- gate_level_columns takes a one-hot categorical's columns as one group, and
  its heaviest category is the reference, so the level offsets are identified
  without the ridge, which drops to 1e-10 and only guards levels of two
  columns that mark the same rows. SPI stage 1 passes each categorical's
  one-hot columns as a group.
- A gate records what its level fit came to (GateLevelFit: offsets,
  no_supported_level or balance_not_met), the levels it offset or tried, each
  column's reference and the levels too thin for offsets of their own
  (FittedRegimeGatedQRF.gate_level_reports, gate_level_settings). The UK
  evidence records them per fit and pooled over the reference folds.
- The receipt gives each output's share of the tape's carriers the frame
  keeps, floored to the hundredth.
- Tests pin the balanced gate's out-of-fold rate to 1e-6 at three seeds; a
  four-category one-hot fit's within-level balance, identification and
  receipt names under two category mixes; a thin category; a forced balance
  failure; a fit with no supported level; and group validation.
- CROSS_FITTED_BALANCED's docstring says that scored on its own training
  rows a balanced gate draws a rare class under its rate.

The re-pins (graph parity, coverage manifest, H2, US F0) follow once #1583
settles.

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

Copy link
Copy Markdown
Contributor

Round 2 at e8689bd

I read the diff 489fe32..e8689bd (f6c9045 and e8689bd) and María's reply of 11:37. In a fresh clone I ran test_uk_frs_disability, test_uk_frs_spine, test_uk_spi_income and test_uk_carers_allowance_take_up one file at a time: all pass (1 skip in test_uk_spi_income). At 489fe32 the new test files don't import (they need FRS_CARE_HELPER_BIT), so I ran round 1's reproduction and the new tests' cases as a probe against both versions of the two source files. They give the old answers at 489fe32 and the new ones at the head.

Round 1 items

  1. Should 1, 35 hours per person: fixed (frs_spine.py:2066, frs_disability.py:537-542). Round 1's case (band 4 to a PIP daily living member, band 4 to another, HOURTOT band 6) was linked at 489fe32 and is unlinked now.
  2. Should 2, which claimant B3 raises: fixed (frs_spine.py:2608-2626). On a joint claim with 0 and 20 hours, the partner is now raised, not the UC row's person. On an LCWRA claim, the person the proxy flags is passed over.
  3. Nit 3, the re-pin record: fixed (changelog.d/1095-uk-feed-repin-81caed75.changed.md; the new 81caed75 section of docs/uk-chronicle-feed-repin.md).
  4. Nit 4, an issue for B11's remaining gap: open, as María's reply says.
  5. Nit 5, who a carer cares for: fixed (changelog.d/1095-uk-carer-link.added.md:3).
  6. Pointer, the LCWRA households before the fit: open, with María's check of A3a's moved rows next.

New

  1. Nit: frs_lcwra_proxy skips any reported column it doesn't find, and treats a missing esa_includes_support_component as true (frs_spine.py:2681, :2688). Today every column is there at the call site (frs_spine.py:961, after _add_benefits). But a renamed column would quietly stop the LCWRA skip. The build refuses missing inputs elsewhere, as _esa_includes_support_component does for VAR3. A strict flag at the spine call, with the unit tests' partial frames left as they are, would keep both.

Checked

  • Band edges: the per-person bands use HOURTOT's lower-edge map (frs_spine.py:303). Bands 4 (20 to 34) and 9 (varies, 20 to 34) read as 20 hours, band 8 (varies, under 20) as 0, and only bands 5, 6, 7 and 10 reach 35. So a 20 to 34 band can't count as the line. Band 9 to a PIP member stays unlinked, and band 5 or 10 links. Band 6 to a member without a qualifying benefit plus band 4 to a PIP member is unlinked, as reg. 4(1) reads. _assert_care_line (frs_disability.py:627) refuses any other engine minimum, which keeps the lower-edge reading exact. The drawn route's share now rests on carers who give only household members the line.
  • Should 2's edges: ties (5 and 5, 20 and 20, 0 and 0) go to the UC row's person. Where the proxy flags every claimant, the hours rule stands and the receipt counts it. An LCW claim without LCWRA ignores the proxy. frs_lcwra_proxy matches policyengine-uk's uc_limited_capability_for_WRA, given that the build's esa_includes_support_component is false only for a person with their own ESA award outside the support group. It reads the benefits after A3a's moves, as frs_disability does for is_disabled_for_benefits. Where the proxy flags nobody on an LCWRA claim, Y1 gives LCWRA to the partner of a UC row's person who cares, so a raised UC row's person keeps the carer element. dwp_carer links every claimant or partner at the line, so a raised partner is linked too.
  • María's arm findings of 08:55 are consistent with the code at the commits they name. B11's move from 19.0% to 16.0% matches the 0.975 share (1.190 × 0.97497 = 1.160), and B4's restore at 489fe32 matches decision 1. The carer and LCWRA reads predate e8689bd, so they move at the rebuild.

CI at e8689bd: lint, wheels, installed-emitter, select-countries and integration-uk pass. engine-free, engine-uk and engine-us (3.13, 3.14) were still pending after the 15 minutes I waited.

Verdict: both Shoulds are fixed and tested, and the receipts count what they change. Nit 4's issue and the small Nit 7 are left, and neither needs to wait for the rebuild.

🤖 Generated with Claude Code

juaristi22 added a commit that referenced this pull request Nov 12, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22 added a commit that referenced this pull request Nov 12, 2026
Folds in round 2's Nit 7 on #1583 into this PR, on María's word, since
#1583 merges first. frs_lcwra_proxy and frs_dwp_carer_care_hours take
strict, and the spine's call passes it: every reported benefit column and
esa_includes_support_component are there once _add_benefits has run, so a
renamed column is refused rather than read as no benefit. The unit tests'
partial frames keep the default. Test: strict accepts the full frame and
refuses a dropped reported column or support flag; the default reads them as
before.

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

Copy link
Copy Markdown
Collaborator Author

Nit 7 is folded into #1584 (8aed8bf), since this PR merges first. The spine's call to frs_lcwra_proxy is now strict, so a missing column is refused there, and the unit tests' partial frames keep the default.

juaristi22 added a commit that referenced this pull request Nov 12, 2026
On this branch's head, which merges #1583 at e8689bd:
- fit.qrf@1's H1 parity pin (tools/graph_parity_repin.py fit.qrf): the
  kernel's implementation hash moves with qrf.py; its bytes do not.
- The UK release-input coverage manifest: source_stages.json's hash.
- The hermetic H2 UK spine fixture (tools/graph_uk_spine_fixture.py): the
  SPI stage-1 changes, and #1583's carer link, move the synthetic spine.
- The US F0 spec pins, seed map and seed protocol included
  (repin_us_spec_engine_contracts.py, generate_us_bundle_from_constants.py,
  spec_engine_coverage.py). The re-pin pass ran again after the coverage
  regeneration, so the inventory count reads 41 of 41.

Tests: graph parity, the UK coverage manifest and the spec loader 84/84;
H2 parity 1/1; the US coverage tool 7/7; the US multispine pool tool 31/31.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juaristi22
juaristi22 merged commit 6c64038 into main Nov 12, 2026
12 checks passed
MaxGhenis added a commit that referenced this pull request Nov 12, 2026
Main moved 58 commits past 27e305d, the main this branch last merged:
#1579 (NZ walk pins), #1553 (review follow-ups), #1311 (ACS local
artifact writer binding) and #1583 (UK event data, PR3). They change 136
files, and this branch changes none of them, so git merged without a
conflict: the tree takes each of main's files whole and keeps this
branch's 24 files byte for byte.

Two of main's changed files feed the fixture writers.
microcosm.data.contract moves five SHA-256 literals (the UK gate
battery's policy, gates manifest and spec fingerprint, and the release-cut
part's two digests), and tools/build_us_fiscal_refresh_release.py rewords
one entry of US_EXPORT_INPUT_MASS_REVIEWED_EXCLUSIONS. No golden reads
either, so no fixture byte moves:
tools/generate_release_contract_fixtures.py --check passes on the merged
tree, with nothing regenerated.

On the merged tree, one pytest process over this branch's five test files
and main's release, loader, registry and releases-record tests gives 401
passed and 2 skipped (main's live-Hub test, which needs credentials), the
counts the branch had before the merge. tools/ci_test_plan.py verify
reports ok for 942 test files, and ruff passes on the Python files this
branch changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Nov 12, 2026
Main 57a32f8 (#1579, #1553, #1311, #1583, #1584) changes two attested
inputs: microcosm.fit.qrf, on the seed protocol's QRF kernel list, and
sources.schema.json. #779 changes the immigration kernel, the US source
stages and the same schema, so every US F0 digest the two sides pinned
moved on both, and four files conflicted. Each conflicted pin was first
replaced by a sentinel, and the repository's tools wrote every value
from the merged tree:

- packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py:
  EXPECTED_HASHES seed_map, seed_protocol and source_manifest, from
  tools/repin_us_spec_engine_contracts.py (source_manifest comes out at
  the branch's value; main left it alone). The branch's seed groups and
  counts merged cleanly.
- packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py:
  the minimal-loader golden, from the same repinner (it loads
  _rich_minimal through load_bundle exactly as the test does).
- packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py:
  the US spec_sha256, from the same repinner (load_bundle("us")).
- docs/evidence/spec-engine/us-f0-coverage.json: regenerated whole by
  tools/spec_engine_coverage.py (42781/42781 fields, 41/41 checks).

The repinner ran twice around the coverage regeneration. Its first pass
read the sentinels and wrote covered_item_count 39 into
tests/engine_contract/us/test_spec_engine_coverage_tool.py; the second
pass put it back to 41, so that file is unchanged from the branch.
ruff format changed only quote style on the three Python files.

No pin moved without a conflict:
- repin_us_spec_engine_contracts.py --legacy-only wrote nothing (main
  does not touch us/source_stages.json).
- tools/build_us_release_input_coverage_manifest.py rewrote
  us/release_input_coverage_manifest.json byte for byte.
- Both repinner --check and spec_engine_coverage.py --check exit 0.

The other four files both sides changed merged without conflict and
are git's three-way result: sources.schema.json,
tools/build_us_acs_local_release.py,
tools/build_us_fiscal_refresh_release.py and
tests/engine_free/us/test_us_acs_local_release_tool.py.

tools/generate_us_bundle_from_constants.py --check was not run: it needs
policyengine-us. Main changes no us/spec file and no
tools/us_bundle_generation file.

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.

2 participants