Skip to content

UK Child Benefit claims and SPI copies' reports (#1508); policyengine-uk 2.180.0, the UC housing element claim and three UC loss families (#1710) - #1718

Merged
juaristi22 merged 13 commits into
mainfrom
uk-cb-claims-1508
Nov 26, 2026
Merged

juaristi22 merged 13 commits into
mainfrom
uk-cb-claims-1508

Conversation

@juaristi22

@juaristi22 juaristi22 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #1508 and #1710 (tracked in #1095).

child_benefit_take_up changes in two ways. Both act on who stays in payment at high incomes, #1508's second lead.
The calibration also stops binding HMRC's one-child families in payment (B3 of #1710's bottom-tail plan). The UK lock moves to policyengine-uk 2.180.0, and a new spine stage takes the UC housing costs element claim from DWP's award statement (B1 of the same plan). The national calibration now weights DWP's Universal Credit rows as three loss families instead of one.

The family key

The draw claims for all of a family's children or none, and it keyed each family on its eldest eligible child. A family whose 16-to-19-year-old's claim had lapsed lost its younger children's claims with it, and the rates at younger ages could not make up for them. Families are now keyed on their eldest eligible child under 16, or on their eldest when none is under 16, and the rates are solved for ages 15 down to 0, then 19 down to 16.

A young person who lives with younger siblings is then claimed for at the younger child's rate, so ages 17 to 19 can sit above HMRC's claimed shares. The stage gate already reports such clipped ages without holding them. Claiming child by child would need a person-level claim flag in policyengine-uk.

The SPI copies' reports

The SPI income chain gives each SPI copy its benefit reports from its age, gender, region and incomes, without its children. A copy with no eligible child could report Child Benefit, and copy families reported it too rarely below the charge start and too often where the charge takes the whole benefit. A reporter always claims and is never opted out, so the stage now redraws the copies' child_benefit_reported before the claim draw reads it:

  • A copy family reports at the weighted share of FRS families that report in its cell: eligible children (1, 2, 3 or more) by the charge band of its highest adjusted net income (at most the charge start, inside the taper, fully charged). Adjacent bands are pooled until a cell rests on 30 FRS source households.
  • The draw is coupled to the copy's FRS twin (benunit_source_id), so a copy in its twin's cell keeps the twin's report. A copy whose twin has no eligible child has no twin cell to couple to, so it draws on its own at its cell's rate (0983a5543, after Vahid's review). The spine of the 05631b7cc arm and the split's run has no such copy, so their results don't change.
  • A reporting copy takes its twin's reported amounts, or the engine's child_benefit_entitlement on its benefit unit head when the twin does not report. A copy with no eligible child takes its twin's reports.
  • FRS rows are unchanged.

The new operation is redraw_spi_reported_child_benefit. child_benefit_reported joins the stage's rewrites and child_benefit_entitlement its engine predictors. The receipt gains copy_reports, which withholds any figure resting on one or two households. The stage gate (uk_stage_child_benefit_take_up) also requires FRS rows unchanged, every cell on at least 30 FRS source households, and the copies' reporting share within 0.05 of their cells' rates.

These changes move the reviewed pins that follow the stage spec and the gate file: the gate battery's policy digest, manifest digest and spec fingerprint, the spine part's certification digests (in microcosm-data's contract and its test mirrors), and the coverage manifest's source_stages.json digest. The calibration seam's and the release cut's digests are unchanged.

HMRC's one-child families (#1710)

HMRC counts claimant families by the children in payment. Its 3.36m one-child families in payment in August 2025 exceed the FRS 2024-25's 3.23m benefit units with one dependent child of any kind, while for two, three and four children the FRS is within 3 to 8 percent of HMRC. The claim draw only chooses which eligible units are paid, so the row can be met only by inflating one-child families.

A measured-distortion entry in uk/calibration_measure_exclusions.json, signed by María on 24 November, now holds hmrc.child_benefit.families_in_payment.children_1 out of the solve. It tracks #1710. The row stays measured on every evaluation, and the other family sizes stay bound. It binds again only if the model counts claimant families as HMRC does (uk-data#562), or if a build's eligible one-child units reach HMRC's count.

The arm below measures its effect: holding the row out moves about 0.07m children from one-child to two-child families. The other rows carry most of calibration's lift to one-child families.

policyengine-uk 2.180.0

The UK lock moves from policyengine-uk 2.179.2 to 2.180.0. uv.lock moves that package alone, so policyengine-core stays at 3.34.10 on the UK side and 3.32.5 on the US side. 2.180.0 adds one engine input, would_claim_uc_housing_costs_element (policyengine-uk#2951), whose false leaves the UC housing costs element out of an award. The take-up register signs it at its default of true, and B1's stage (below) writes it. The other rule changes since 2.179.2:

  • Housing Benefit takes the rent, less the meals deduction, as the eligible rent of a private renter in a houseboat, caravan or mobile home, instead of capping it at the Local Housing Allowance (2.180.0).
  • The UC education protection for a claimant moved off legacy benefits now needs a full-time course that reg 12(2) covers (2.179.4).

The texts that describe the locked engine were checked against the diff and now cite 2.180.0; the education cascade's notes name the new course test. The concept coverage (404 inputs), the uprating pins and bonus anchor (stamps only), the core pin test, APPROVED_UV_LOCK_SHA256, the release input coverage manifest and the H2 spine fixture follow. CenTax's facts keep 2.179.2, the engine they were measured on.

The UC housing costs element from DWP's award statement (B1 of #1710)

For the UC claims the FRS 2024-25 links to DWP's records, BENEFITS.UCHOUSEL gives the housing costs element on the award statement for the interview's assessment period. Some linked renters' statements carry none where policyengine-uk pays one, for reasons the engine doesn't simulate, so the model paid these families an element their award doesn't include.

A new spine stage, uc_housing_costs_claim, sets would_claim_uc_housing_costs_element:

  • A linked FRS claim whose statement carries no housing element, where the locked engine pays one, is false. A false carries only the zeros the engine can't explain.
  • Every other benefit unit keeps the default, and nothing is imputed. Unlinked units have no statement of their own, and an SPI copy's copied statement no longer belongs to it, since the SPI income chain redraws the copies' incomes and benefit reports.
  • The stage runs just before uc_take_up, so the take-up draw sees the awards it leaves.

frs_spine carries the statement as the person carrier frs_uc_housing_element_status, which the release drops. Like the other take-up flags the build writes, the flag joins the export surface and the concept mapping's take-up bindings, so the gate battery's vintage pins, the release cut's digests, the release input coverage manifest, the concept coverage and the H2 parity fixture follow, and the stage-order pins move by one. María signed the stage's choices on 25 November.

An earlier version also drew unlinked units and SPI copies at the linked claims' rate. At prior weights in 2025, that took the share of Great Britain's UC households paid the element to 58.5%, standardised to DWP's mix of family types, against DWP's 63.3%. Only linked claims now set the flag.

DWP's Universal Credit rows as three loss families (#1710)

The national calibration gives each register family an equal share of the loss, split equally across its rows. DWP's UC family holds eleven tables in 105 bound rows, so each UC row weighed 1/4,200 of the loss, too little for the solve to meet the household counts by number of children and by family type. In the 05631b7cc arm (below), UC households with 2, 3 and 4 children end 12%, 14% and 7% short of DWP's counts, and single parents with children 12% short.

The national rule is now loss_family_equal: family_equal over loss families. A row's loss family is its register family, except that UK_NATIONAL_LOSS_FAMILIES splits DWP's UC family by contract target into three:

  • the award amount bands by family type (4 contract targets, 86 rows);
  • UC households in total, by family type and by number of children, with people aged 16 to 21 and 22 to 24 (11 rows);
  • the housing element by tenure, with the six single-row tables (8 rows).

Each takes one family's share. Against a UC row's weight under family_equal, a band row now weighs 1.16 times as much, a composition row 9.09 times and a housing or single-table row 12.5 times, and every other row keeps 40/42 of its weight. A bound UC row whose contract target isn't listed is refused.

Only the national loss weights change. The register family stays every row's family for source months, holds, exclusions, the support floor, gates, diagnostics and the mass reason, and the local doctrine reads it as before. family_equal stays a receipted per-run override. The doctrine pins and the two runbooks follow. María chose the grouping on 25 November.

Results at the stage

The stage was run on the b2179c spine with policyengine-uk 2.179.2, at the stage's household weights before calibration, for survey year 2024. These are draw audits, not calibrated figures.

  • The stage gate passes.
  • SPI copy families report Child Benefit at 69%, against 46% before the redraw and 68% expected from their cells.
  • 87.1% of eligible children are claimed for, against 87.0% at HMRC's claimed shares by age. Ages 0, 1 and 17 to 19 clip above HMRC's shares; every other age is within 3.1 percentage points of them.
  • 7.9% of claiming families opt out, against HMRC's 9.1%. With more copies reporting, the fully charged non-reporters who can opt out run out.
  • Families paid with an income above the charge start fall from about 0.89m under the old rules to 0.75m. Reporters make up 0.58m of them, and the draw pays every reporter.

So the stage alone cannot reach HMRC's Table 16 count of 310,000. At calibrated weights (below) the charge falls by about a fifth but stays about twice Table 16, so HICBC stays a measured diagnostic and #1508 stays open.

Results at calibrated weights

One national arm (spine and calibration) at d44627e50, this branch before main was merged in, against #1399's six-cell build at 428ff94da. The two share the Chronicle feed, review date and solver settings, and differ only by this PR's changes. Both are local measurement builds; nothing is staged or published.

  • Every terminal gate passes in both. The final loss is 0.00503 against 0.00506, 98.8% of rows are within 10% against 98.7%, and the effective sample size is 0.994 of the control's.
  • HICBC, held out and measured: at 2024, 692,000 liable taxpayers and £783m, against 854,000 and £976m in the control (-19%). HMRC's Table 16 has 310,000 and £360m for 2024-25 (provisional). At 2025: 788,000 and £939m, against 956,000 and £1.16bn.
  • Most of the fall is among paid families that don't report Child Benefit. Claims move from FRS families that don't report it to SPI copies, which now report it like their FRS twins.
  • Child Benefit families in payment at 2025: the bound rows for two to five or more children stay within 0.2% of HMRC's. The one-child row, now held out, measures 3.17m against HMRC's 3.36m, and all families in payment 6.68m against 6.87m. Child Benefit spending meets the OBR's figure; the control is 1.8% over.
  • Children by family size at 2024: 4.05m in one-child families (4.12m in the control; HBAI 3.2m), 6.26m in two-child families (6.18m; HBAI 6.8m), and 4.03m in larger ones (4.03m; HBAI 4.6m). Children below HBAI's FYE 2025 AHC line: 3.42m against 3.39m.
  • UK: two-child limit abolition still ~20% short of IFS on the certified build, with cost and caseload matching (follow-up to #1371) #1710's step 3 (the limit abolished at full roll-out and full UC take-up) lifts 486,000 children out of poverty on the FYE 2011 AHC line, against 519,000 in the control and IFS's 630,000, at the same £3.5bn. A read with the head's Child Benefit flags on the control's weights puts about 25,000 of the fall on the stage change: with more low-income families paid overall, fewer children sit just below that line. On the FYE 2025 AHC line, step 3 barely moves (426,000 against 427,000).

Results for the bump and B1

One national arm (spine and calibration) at 05631b7cc, the bump and B1 before the signature commit, which changes only texts. Besides the bump and B1, it differs from the d44627e50 arm above by main's merge, so B1's own effect is read on the arm's own files. It is a local measurement build; nothing is staged or published.

  • Every terminal gate passes. The final loss is 0.00508 and 98.7% of rows are within 10%, against 0.00503 and 98.8% for the d44627e50 arm, and the effective sample size is 0.994 of that arm's.
  • Before calibration, on the arm's spine with only the flag changed, 104,000 fewer Great Britain UC households are paid the housing element in 2025: 73,000 social renters and 31,000 private. Standardised to DWP's mix of family types, the share paid the element falls from 63.2% to 61.3%, against DWP's 63.3%. After calibration the bound tenure rows are met: the arm's 2.40m social and 1.57m private renting UC households with the element are within 2% of DWP's 2.35m and 1.57m. DWP's benefit cap rows stay met.
  • At the arm's calibrated weights in 2025, against the same file with the flag true everywhere: 121,000 benefit units are false, all of them linked FRS claims (92,000 social renters and 30,000 private). 116,000 fewer benefit units are paid the element, and UC spending is £1.21bn lower. 48,000 more children are below the FYE 2011 AHC line, and none leave absolute poverty.
  • Children below HBAI's FYE 2025 AHC line at 2024: 3.47m, against 3.42m on the d44627e50 arm and HBAI's 3.97m.
  • UK: two-child limit abolition still ~20% short of IFS on the certified build, with cost and caseload matching (follow-up to #1371) #1710's step 3 lifts 487,000 children out of poverty on the FYE 2011 AHC line, against 486,000 on the d44627e50 arm and IFS's 630,000, at the same £3.5bn. On the FYE 2025 AHC line it lifts 415,000, against 426,000.

Results for the UC split

A calibrate-only run at ba0848500 on the 05631b7cc arm's spine, against that arm. Between the two, the signature commit changes only texts and the split changes the national loss weights. It is a local measurement build; nothing is staged or published.

  • Every terminal gate passes, and every row's loss weight is the rule's, with 42 loss families. 98.8% of rows are within 10%, against 98.7%, and the effective sample size is 0.974 of the control's. The two final losses use different weights, so they aren't compared.
  • Every UC composition row is within 1% of DWP's count, the housing and single-table rows are within 0.3%, and every award band stays within 10%. OBR's UC spending ends 1.7% short, against 3.5%, and DWP's UC households 0.3% short, against 1.6%.
  • The solve meets the child-count rows by adding children, mostly aged 10 to 14. Children in 2025 rise from 14.39m to 14.57m, and ONS's rows for girls and boys aged 10 to 14 move from on target to 3.1% and 3.3% over. The age 10 to 19 rows by region end up to 6.8% over (South East). UC units without children fall from 3.46m to 3.33m, and those with children rise from 2.78m to 2.98m.
  • Against DWP's two-child-limit statistics for April 2025, UC units with 3 or more children rise from 635,000 to 711,000 (DWP 651,000). Those the limit affects hold at 473,000 (475,000 in the control; DWP 470,000), so those it doesn't affect yet rise from 160,000 to 238,000 (DWP 182,000). DWP's two publications differ here: Stat-Xplore's UC households by number of children, the table the calibration binds, has 729,000 households in payment with 3 or more children in April 2025. The split ends 2.5% below that table and 9% above the two-child-limit statistics.
  • At 2024, against HBAI FYE 2025: 14.52m children, against 14.34m and HBAI's 14.7m; 3.58m children below HBAI's FYE 2025 AHC line, against 3.47m and HBAI's 3.97m; relative child poverty 20.1% BHC and 27.3% AHC, against 19.1% and 26.8%, and HBAI's 21% and 27%.
  • UK: two-child limit abolition still ~20% short of IFS on the certified build, with cost and caseload matching (follow-up to #1371) #1710's step 3 lifts 536,000 children out of poverty on the FYE 2011 AHC line, against 487,000 and IFS's 630,000, at £3.76bn against £3.53bn. The rise comes with full roll-out: step 1 (the limit as it applies in 2025-26) lifts 296,000 against 300,000, and step 2 498,000 against 449,000. So it rests on the families with 3 or more children the limit doesn't affect yet, where DWP's two publications differ. The loss weights alone move step 3 by 49,000, so until DWP's publications are reconciled, step 3 on this branch is a range: 487,000 to 536,000 children, at £3.53bn to £3.76bn. Each end is within 3% of one of DWP's counts of UC units with 3 or more children: the control's 635,000 against the two-child-limit statistics' 651,000, the split's 711,000 against Stat-Xplore's 729,000. On the FYE 2025 AHC line, step 3 lifts 419,000, against 415,000.

Not in this PR

Tests

  • Engine-free: at d44627e50, every test file that touches the stage, the gate battery's pins, the coverage manifest or the exclusions register passes: 7,758 tests across 111 files, 33 skipped. The stage's tests cover the cells and their pooling, the coupled draw, the landing, the refusals for broken lineage and the receipt's withheld figures, plus the stage gate. After main was merged in, the files for the contract and gate battery pins, the input coverage manifest, the source stages, the stage and its gate pass again (565 tests).
  • Engine: at the merged head, the six UK engine test files that touch these surfaces pass, 79 tests: the registered-claim round trip through policyengine-uk, the coverage manifest and input coverage tests, the childcare target contracts, and the full target graph and terminal gate tests.
  • The UK spine graph fixture is regenerated with tools/graph_uk_spine_fixture.py. At the merged head its --check regenerates it byte-identically, and the coverage manifest builder's --check finds the manifest current.
  • The bump and B1: at b942ef608 (the bump), 982 engine-free and 102 UK engine tests pass, with H2 parity. At ee2d9703f, the touched surfaces' tests pass with the engines blocked as in CI, 1,796 engine-free tests, and 70 engine tests including H2 parity; the coverage manifest and the H2 fixture are regenerated at that head.
  • The split: at ba0848500, the 20 engine-free test files that cover the national weights, the doctrine and posture, the gates, the target references and the UC diagnostics pass with the engines blocked as in CI, 772 tests, and so do the UK childcare target contracts and H2 parity.
  • The twin fix: at 0983a5543, the Child Benefit stage's tests and the stage health tests pass, 134 tests, with a new one for a copy whose twin is in no cell.
  • After main was merged in again at 9daa5e34a, where Shared calibration machinery for local areas: L2 anchor, target-weight rule, loss cap for each target and one area support gate #1729 moved the UK loss weights onto the shared rules, 428 engine-free tests on the doctrine, the national graph, the rowwise surface and the shared rules pass with the engines blocked as in CI, and so do 27 UK engine tests on the touched stages and graphs. The H2 spine fixture regenerates byte-identically and the coverage manifest is current.

🤖 Generated with Claude Code

juaristi22 and others added 6 commits November 24, 2026 12:11
…1508)

- Key each family's claim draw on its eldest eligible child under 16, or its
  eldest when none is under 16, solving the rates for ages 15 down to 0 and
  then 19 down to 16, so a young person's lapsed claim no longer takes the
  younger children's claims with it.
- Redraw the SPI copies' child_benefit_reported before the draw reads it. A
  copy family reports at the weighted share of FRS families that report in its
  cell (eligible children 1, 2, 3+ by the charge band of its highest adjusted
  net income, pooled to 30 FRS source households), coupled to its FRS twin; a
  reporting copy takes its twin's amounts or child_benefit_entitlement on its
  benefit unit head; a copy with no eligible child takes its twin's reports.
  FRS rows are unchanged.
- Declare redraw_spi_reported_child_benefit, add child_benefit_reported to the
  stage's rewrites and child_benefit_entitlement to its engine predictors; the
  receipt gains copy_reports (figures on one or two households withheld) and
  the stage gate holds FRS rows, cell support and the copies' share (0.05).
- Regenerate the UK spine graph fixture.

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

a101d45 changed uk/gates.json (the stage gate's copy-report tolerance)
and the stage spec, but left the reviewed pins that follow them:

- the gate battery's policy digest, manifest digest and spec fingerprint,
  and the spine part's two certification digests, in microcosm-data's
  contract and its test mirrors;
- the coverage manifest's source_stages.json digest, regenerated with
  tools/build_uk_release_input_coverage_manifest.py.

The calibration seam's and the release cut's digests are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add a measured-distortion entry for
  hmrc.child_benefit.families_in_payment.children_1 to the calibration
  measure exclusions, tracking #1710, for María's signature (B3 of #1710's
  bottom-tail plan). HMRC's one-child families in payment exceed the FRS's
  benefit units with one dependent child of any kind, while the other
  family sizes agree within 3 to 8 percent, so the row could be met only by
  inflating one-child families. It stays measured on every evaluation.
- Pin the register at 145 entries.

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

The entry holding hmrc.child_benefit.families_in_payment.children_1 out
of the solve now says what holding it out did in #1718's variant against
#1399's build: the children in one-child families moved from 4.12m to
4.05m and those in two-child families from 6.18m to 6.26m, the row
landed 5.6 percent below HMRC, and the children below HBAI's poverty
lines barely moved. Calibration's lift to one-child families comes mostly
from other rows. The adjudication now names the one variant arm it was
tested in. The entry still awaits María's signature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
María signed the entry holding
hmrc.child_benefit.families_in_payment.children_1 out of the solve on
24 November 2026, after the variant arm measured its effect. The
reason drops its signature marker and the adjudication records the
signature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juaristi22
juaristi22 changed the base branch from uk-centax-childcare-parent-targets to main November 24, 2026 22:18
The UK side moves from policyengine-uk 2.179.2 to 2.180.0; uv.lock moves
that package alone, so policyengine-core stays at 3.34.10 on the UK side
and 3.32.5 on the US side, and APPROVED_UV_LOCK_SHA256 follows.

2.180.0 adds one engine input (403 to 404),
would_claim_uc_housing_costs_element (policyengine-uk#2951). It stays at
its default of true here and is signed in the take-up register with the
error it can make; the next commit's stage writes it.

The texts that describe the locked engine were checked against the diff
from 2.179.2 to 2.180.0 and now cite 2.180.0. Two touch a rule that
moved: the education cascade's notes now name the course test of the
reg 60 protection (2.179.4). The concept coverage, the uprating pins and
bonus anchor (stamps only), the core pin test, the release input
coverage manifest and the H2 spine fixture follow. CenTax's facts keep
2.179.2, the engine they were measured on.

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

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, María. This also answers my #1710 point 4: holding the one-child row out, rather than binding it, avoids inflating one-child families to meet a count that may not measure the same thing. I found nothing blocking. There is one edge case in the coupled draw, and one result worth carrying back to #1710.

Checked at b32ec82

  • The coupled draw. In assign_spi_child_benefit_reports, with p_t the twin's cell rate and p_c the copy's:

    • a copy with a reporting twin reports with probability min(1, p_c / p_t);
    • a copy with a non-reporting twin reports with probability max(0, (p_c − p_t) / (1 − p_t)).

    If twins report at their cell's rate, the copy's marginal rate is exactly p_c either way, and a copy in its twin's cell keeps the twin's report. That's maximal coupling, done right.

  • Cells. child_benefit_copy_report_cells merges a short children group into a neighbour, smallest first. It then closes runs of adjacent charge bands once the FRS families reach 30 source households, with a short remainder joining the last run. Support counts FRS families only, so copies can't prop up their own cells.

  • Landing and guards.

    • Twin-reporting copies take the twin's amounts row for row.
    • New reporters take child_benefit_entitlement on the head.
    • A copy with no entitlement doesn't report.
    • The post-landing checks re-derive both from the landed amounts, and FRS rows are left unchanged.
  • The family key. Keying on the eldest eligible child under 16 fixes the lapsed-16-to-19 problem, and the clipping at ages 17 to 19 is reported rather than held. That's the right trade without a person-level claim flag.

  • Tests. test_uk_child_benefit_take_up.py and test_uk_stage_health.py give 132 passed locally. engine-free (3.13) hadn't finished when I looked.

1. Edge case: a copy family whose twin is in no cell never reports.

  • When the twin has no eligible child, p_twin falls back to p_copy. A non-reporting twin then gives coupled = p + u(1 − p) ≥ p, so the copy never reports. A reporting twin gives u · p < p, so it always does.
  • The docstring reads as if such a copy draws at its own cell's rate, but it ends up at 0 or 1.
  • This only arises if a copy has an eligible child and its twin doesn't. SPI copies clone the twin's members, so that should only happen if eligibility can differ between them. For example, a 16-to-19-year-old's education status, if the SPI chain sets it.
  • If it can't happen, an assertion (twin_cell >= 0 wherever copy & family) would document that. If it can, drawing those copies uncoupled at p_copy gives the stated rate.

2. Worth carrying back to #1710. Step 3 falls from 519,000 to 486,000 here (77% of the IFS's 630,000), and you put about 25,000 of that on the stage change. On the FYE 2025 line it doesn't move (426,000 against 427,000). So the gap to the IFS on the FYE 2011 line widens by about 5 points with this change. That's not a reason to hold it back: the stage is more correct on reporting and HICBC falls by a fifth. But it would help to note it in #1710's tally, so the next comparison starts from 486,000.

Notes

  • HICBC stays about twice Table 16 (692,000 against 310,000 in 2024), and the PR says plainly it doesn't close #1508. Agreed.
  • Holding out the one-child row is signed and tracks #1710 and uk-data#562. Children in one-child families still sit at 4.05m against HBAI's 3.2m, so most of that gap comes from the other rows, as you note.

Review drafted with AI assistance and checked against the code at b32ec8201.

juaristi22 and others added 4 commits November 25, 2026 15:49
…B1 of #1710)

A new UK spine stage, uc_housing_costs_claim, stores policyengine-uk
2.180.0's would_claim_uc_housing_costs_element just before uc_take_up,
so the take-up draw sees the awards it leaves. A linked FRS claim whose
award statement carries no housing element (BENEFITS.UCHOUSEL 0) where
the locked engine pays one is false. Every other benefit unit keeps the
default: unlinked units have no statement of their own, and an
SPI-channel unit's copied statement no longer belongs to it, since the
SPI income chain redraws the copies' incomes and benefit reports.
Nothing is imputed for them: drawing them at the linked claims' rate
took the spine's share of Great Britain UC households paid the element
from 62.7% to 58.1% at prior weights in 2025, against DWP's 63.3%,
where the linked statements alone give 60.9%.

frs_spine carries the statement as the person carrier
frs_uc_housing_element_status, which the release drops. The flag joins
the export surface and, like the other take-up flags the build writes,
the concept mapping's take-up bindings, so the gate battery's vintage
pins, the release cut's digests, the release input coverage manifest,
the concept coverage and the H2 parity fixture follow, and the
stage-order pins move by one. The stage's choices are for María's
signature; only linked claims set the flag, on her call of 25 November.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
María signed B1's choices on 25 November 2026, the day she ruled that
only linked claims set the flag:
- DWP's award statement (BENEFITS.UCHOUSEL) read on linked FRS claims,
  carried as frs_uc_housing_element_status and dropped at release;
- a linked claim is false only where the statement carries no housing
  element and the locked engine pays one, so a false carries only the
  zeros the engine can't explain;
- every other benefit unit keeps the default, with nothing imputed:
  unlinked reporters, take-up entrants and SPI-channel units, whose
  copied statement no longer belongs to them;
- the stage runs just before uc_take_up, so the take-up draw sees the
  awards the flag leaves.

The markers go. These texts now record the signature: the stage's notes
(YAML and JSON), its module docstring and the changelog fragment. The
release input coverage manifest and the H2 fixture are regenerated for
the texts, and H2 parity passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The national doctrine's rule becomes loss_family_equal, family_equal
over loss families, on María's ruling of 25 November 2026. A row's loss
family is its register family, except that UK_NATIONAL_LOSS_FAMILIES
splits DWP's Universal Credit family by contract target into three:
- the award amount bands by family type (4 contract targets);
- UC households in total, by family type and by number of children,
  with people aged 16 to 21 and 22 to 24 (11);
- the housing element by tenure with the six single-row tables (8).
Each takes one family's share of the objective, where under
family_equal the eleven tables shared one, so each composition row
weighed under 1/4,000 of it. A bound row of the split family whose
contract target is not listed is refused; the six UC targets the
register excludes stay unbound.

Only the national loss weights change. The register family stays every
row's family on the other surfaces (source months, holds, exclusions,
the support floor, gates, diagnostics and the mass reason), and the
local doctrine's rules read it as before. The national graph passes each
row's contract target to the rule; the posture, the calibration config
and the build CLI admit the new name, and family_equal stays a receipted
per-run override. The doctrine pins, the two runbooks and a changelog
fragment follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vahid's review of #1718 (at b32ec82): assign_spi_child_benefit_reports
stood in the copy's own rate for a twin in no cell, so the coupled draw
gave such a copy its twin's report every time: u * p < p always holds,
and p + u * (1 - p) < p never does. The copy now draws on its own and
reports when u < p_copy, at its cell's rate, as the stage's rule says (a
copy family reports at the weighted share of FRS families that report in
its cell). The rule's coupling clauses define p_twin by the twin's cell,
so its text and the pins stay as signed.

A copy family's twin is in no cell only when eligibility differs between
them. SPI copies clone their twins' members, ages and education, but the
SPI chain re-derives own-right benefit reports, which the qualifying
young person test reads. On B1's spine no copy family has a twin outside
every cell, and every copy family has as many eligible children as its
twin, so the build's outputs don't change. A new test pins the uncoupled
draw for a reporting and a non-reporting twin.

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

Copy link
Copy Markdown
Collaborator Author

Thanks, Vahid.

1. A copy whose twin is in no cell. You're right about the draw: standing in the copy's own rate for the twin's makes such a copy take its twin's report every time. It can happen. SPI copies clone their twins' members, ages and education, but the SPI chain re-derives own-right benefit reports, which the qualifying young person test reads, so a young person's eligibility can differ between a copy and its twin. 0983a55 draws those copies uncoupled at p_copy, as you suggest, with a test for a reporting and a non-reporting twin. The stage's rule already says a copy family reports at its cell's share, so its signed text stays as it is. On this branch's spine no copy family has a twin outside every cell, and every copy family has as many eligible children as its twin, so the build's outputs don't change.

2. Step 3 in #1710's tally. I carried it back in my reply on #1710 (#1710 (comment)): step 3 falls from 519,000 to 486,000 at the same cost, about 25,000 of it from this PR's Child Benefit stage. The later commits here (the policyengine-uk bump, B1 and the UC split) move step 3 again, and the PR description carries their results.

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up at 0983a5543. Thanks, María. The uncoupled draw (0983a5543) is what I suggested, and the new test pins it for a reporting and a non-reporting twin. The touched tests pass locally (test_uk_child_benefit_take_up.py, test_uk_national_calibration.py: 73 passed).

The PR has grown since my review: the policyengine-uk 2.180.0 bump, B1 (the UC housing costs claim) and the three UC loss families. Notes on those:

1. The three-loss-family split moves #1710's headline by about 10%, through a weighting choice alone. In the body's calibrate-only run, step 3 goes from 487,000 to 536,000 children (cost £3.53bn to £3.76bn), against IFS's 630,000. Step 2 goes from 449,000 to 498,000. You trace it to the families with 3 or more children that the limit doesn't reach yet, where DWP's two publications differ. The fit improves (OBR UC spending 1.7% short against 3.5%, UC households 0.3% short against 1.6%), so the change is defensible. But a 49,000 move from the loss weights means #1710's figure is sensitive to calibration choices, not only to data. I'd say so wherever the step 3 number is quoted, and give the two figures as a range until the DWP publications are reconciled.

2. B1's rule is sound. It sets false only where a linked award statement shows no housing element and the engine pays one. That's the conservative choice, and leaving unlinked and SPI units at the default (rather than imputing) is right, given that the imputation overshot (58.1% against DWP's 63.3%). One limit worth a line in the stage notes: UCHOUSEL is one assessment period's statement. A zero that month can come from a temporary reason, such as a gap between tenancies or a period the housing costs weren't yet verified, and the annual model then removes the element for the whole year. The calibrated tenure rows land within 2% of DWP, so the effect is small. But it's the one direction the rule can err in.

3. Scope. The title and the first line still describe the Child Benefit change, but the PR now carries a lock bump, a new spine stage and a national loss-weight change. Each is well documented in the body. A title that names all three would help anyone scanning merged PRs later, for example "…, B1 housing claim and three UC loss families".

4. The pe-uk 2.180.0 bump only adds would_claim_uc_housing_costs_element, and the rule changes listed (the HB houseboat and caravan rent rule, the reg 60 course test) are minor for the national build. That looks right to me.

Review drafted with AI assistance and checked against the code at 0983a5543.

Vahid's review of #1718 (at 0983a55): BENEFITS.UCHOUSEL is one
assessment period's statement, so a zero there can be temporary, for
example in a gap between tenancies or before DWP has verified the housing
costs, and the flag then removes the element for the whole year. The
module docstring now says so, and that this is the one way the stage can
err, since it never adds an element. The stage's signed spec text, its
pins and the build's outputs are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juaristi22 juaristi22 changed the title Key UK Child Benefit claims under 16 and redraw the SPI copies' reports UK Child Benefit claims and SPI copies' reports (#1508); policyengine-uk 2.180.0, the UC housing element claim and three UC loss families (#1710) Nov 26, 2026
@juaristi22

Copy link
Copy Markdown
Collaborator Author

Thanks, Vahid.

1. Step 3 and the loss weights. Agreed. The description's split section now says the loss weights alone move step 3 by 49,000, and gives it as a range until DWP's two publications are reconciled: 487,000 to 536,000 children, at £3.53bn to £3.76bn. At each end, the model's count of UC units with 3 or more children is within 3% of one of them: the control's of the two-child-limit statistics, the split's of Stat-Xplore's UC households by number of children.

2. One assessment period. Added to the stage module's docstring in e75605a: a zero on the statement can be temporary, the flag then removes the element for the whole year, and that is the one way the stage can err. The calibration still fits DWP's counts by tenure, but it can't give the element back to a family the flag took it from.

3. Title. Retitled to name the policyengine-uk bump, the housing element claim and the three UC loss families.

4. Thanks for checking the bump.

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up at e75605a04. Thanks, María. All four points are resolved:

  • Step 3 as a range. The body now gives 487,000 to 536,000 children (£3.53bn to £3.76bn) and says the loss weights alone account for the 49,000. The anchoring is a useful addition: 635,000 against the two-child-limit statistics' 651,000, and 711,000 against Stat-Xplore's 729,000, are both 0.975, so "within 3%" holds at each end. It makes clear that the range is the gap between DWP's two publications, not noise.
  • One assessment period. The new docstring paragraph in uc_housing_costs_claim.py states the limit and its direction exactly: the flag can only take the element away, and the tenure calibration can't give it back to the family it was taken from.
  • Title. It now names all three additions.

Nothing further from me. When I looked, integration-uk, lint, installed-emitter and wheels had passed, and the engine and engine-free jobs were still running.

Review drafted with AI assistance and checked against the code at e75605a04.

main's #1735 (microcosm#1729) moved the UK national loss weights onto the
shared target_loss_rules and declared family_equal as the shared
level_equal. The UC split's loss_family_equal (#1710) is the same
arithmetic over loss families, so national_doctrine.py now declares it as
level_equal too, computes every national rule through the shared rule,
and drops the Counter it no longer needs; the weights don't change.
#1735's declarations test now lists loss_family_equal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juaristi22
juaristi22 marked this pull request as ready for review November 26, 2026 12:58
@juaristi22
juaristi22 merged commit e29843d into main Nov 26, 2026
12 checks passed
juaristi22 added a commit that referenced this pull request Nov 26, 2026
…C housing costs claim and the SPI copies' Child Benefit reports (#931)

Main took three pull requests since 1c82d18: #1722 (each US post-export
request as a picklable descriptor), #1744 (BE's releases publish into build
folders as BE builds) and #1718 (the SPI copies' Child Benefit reports,
#1508, and B1 and B3 of #1710: the UC housing costs element claim from DWP's
award statement, the national UC family weighted as three loss families, and
HMRC's one-child Child Benefit families held out of the solve). The UK lock
moves to policyengine-uk 2.180.0.

Twenty files conflicted.
- uk_runtime/child_benefit_take_up.py: main keys a family at its eldest
  eligible child under 16, else its eldest, and solves ages 15 down to 0,
  then 19 down to 16; this branch counts each age's child rows among
  geographic clone 0's. The merge keeps both sides' helpers and docstrings.
- uk_runtime/graph_kernels.py: main's new uc_housing_costs_claim stage,
  bound in this branch's form: the engine stage modules, frs_release,
  frs_spine, receipt_counts and, because frs_spine draws through them, the
  keyed-draw helpers (the derived binding rule). test_uk_graph lists the
  stage among those that read only frs_spine's constants, so it need not
  bind the copy-id table.
- uk_runtime/rowwise_posture.py: main's loss_family_equal rule for the
  national role; this branch's removal of expected_constituency_vintage
  stays.
- uk_runtime/stage_health.py and the Child Benefit gate's note: this
  branch's sampling-noise band and clone-0 row count, and main's SPI copy
  reports.
- uk/spec/sources.yaml: frs_spine's notes keep both new carriers (main's
  frs_uc_housing_element_status, this branch's imd_decile and
  council_tax_band_observed); main's one edit to frs_take_up, its engine
  version, goes to the block this branch moved after the area stages; and
  uc_capital_coherence's notes keep both edits.
- docs/uk-full-build-graph.md, tools/graph_uk_spine_fixture.py and the
  stage-count tests: 65 stages, this branch's 64 and main's
  uc_housing_costs_claim.
- test_uk_measure_simulation: 147 exclusions, the 144 before, this branch's
  two land rows and main's one-child row.
- test_uk_rowwise_candidate and test_uk_rowwise_posture: main's rule,
  without the vintage field.
- test_uk_stage_health: this branch's module-level Child Benefit helpers
  take main's copy-report receipt, parameter and checks. Beyond the
  conflicts, this branch's clone-count gate test in
  test_uk_child_benefit_take_up gives its invented receipt the SPI copy
  reports main's gate now requires: a frame without copies, one cell on
  its source families at every clone count, and no share to hold.
- The gate contract pins, the stage table, the coverage manifest and the H2
  fixture are recomputed on the merged tree, the fixture on policyengine-uk
  2.180.0.

The new stage sits before uc_take_up, so every later spine node's key
moves, and the next K = 15 spine must be built at this merge or later.

Checks: the UK graph tests with their binding rules (65); the
engine-free tests the merge touches, main's changed tests among them, with
the parity pins, the graph evidence, the kernel frame copies, the
transport binding, battery and cross-grain tests (3,670 pass); the US
coverage report and pins (--check); CI's test plan verify; and on the
engine, H2 parity, the UK graph, the new stage, Child Benefit take-up and
the release input coverage (69 pass).

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