Skip to content

Calibrate Microcosm UK to CenTax's parent income tabulations - #1399

Merged
juaristi22 merged 14 commits into
mainfrom
uk-centax-childcare-parent-targets
Nov 24, 2026
Merged

juaristi22 merged 14 commits into
mainfrom
uk-centax-childcare-parent-targets

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Merged with main at 527ad4938; targets main.

Adds CenTax's HMRC tabulations of parents' incomes as Microcosm UK national calibration targets (Advani, Flew,
Pepin-Hall and Summers 2026, Removing the £100,000 childcare cliff-edge).
The targets set the income distribution of parents of 3- and 4-year-olds in England above £50k, around the
£100k childcare cliff, which the £100k childcare dashboard reads.

What it adds

  • The workbook from Chronicle. CenTax's data for the charts is registered raw-only as
    centax-childcare-cliff-edge-2026 (Register CenTax's childcare cliff-edge workbook raw-only chronicle#445; sha256 8c238557…, as Arun sent it on 21
    October and as arunadvani.com publishes it). tools/build_uk_centax_childcare_parent_facts.py checks a local
    copy against that registration (microcosm.build.pinned_inputs). The resource records the registration, the
    source page and the licence the manifest states.
  • Derived facts. uk/centax_childcare_parent_facts.json (schema 2) holds 5 England cells built from Figures
    3.1, 3.6 and 3.7. Each cell is CenTax's share of the parents in (£50k, £200k] times the baseline build's own
    parents in that range: b891aa69, the Lock policyengine-uk 2.179.2 and store UC's new-claimant draw by claim recency #1687 national that main builds.
  • Five contract targets, microcosm.centax_childcare_parents.*, bound on the national line only:
    • three ANI bands partitioning (£50k, £200k] in 2021-22 pounds: £50–80k, £80–120k, £120–200k;
    • two splits of (£80k, £150k]: women and London.
  • Two person measures. centax_parent_of_eligible_3_4_year_old and centax_employment_main_income_source.
    The second, which only the diagnostic reads now, weighs the year's pay plus taxable benefits in kind against
    every other component of the engine's adjusted net income, with social security taken benefit by benefit; a tie
    goes to pay. The resolver also computes adjusted_net_income_annual on the annual-income simulation.
  • The derived-facts loader. Main's uk_runtime/derived_facts.py reads the CenTax resource as its third,
    beside the high-value home stock and DESNZ's constituency energy, at every compile site.
  • Diagnostic. tools/diagnose_uk_centax_parents.py reports each cell's fit and support on any national H5.
    It also reports the cells kept as diagnostics (below), a level check against the resource's parent count, and,
    from the registered workbook, Table A.1 and Figure 3.12.

Never targets (d2014): CenTax's model outputs, meaning the bunching estimates (Tables 3.1, 3.2 and 4.1),
frictions, elasticities, marginal bunchers and every cost.

Diagnostics, not targets:

  • ANI up to £50k (Vahid's review, item 1);
  • the South excluding London and the North and Midlands (item 3);
  • main income source other than employment (Figure 3.3): the cell rests on fewer than 3 FRS source households, too
    few to bind (María's ruling of 24 November, after the private check Vahid's second review asked for);
  • Figure 2.1, Figure 3.12 and Table A.1's levels.

Design calls

  • Shares, not CenTax's levels, now within (£50k, £200k]. CenTax counts the taxpayers HMRC's PAYE and Self
    Assessment data hold. A model adult whose only income is savings interest or a taxable benefit has positive ANI
    but no such record, and almost all of them sit below £50k. On b891aa69, those with no pay, profit or private
    pension in the year were about 6% of the old (0, £200k] count, and the old shares scaled every cell up with
    them.
  • Wide bands around £100k, as before. Not bunching-neutral after ageing: the band and the split band now
    start at £98,698 while the cliff stays at £100k (see the selector notes).
  • Ageing. The edges are aged by the OBR average earnings index policyengine-uk 2.179.2 carries: ×1.2337 from
    2021 to 2025, which gives £61,686, £98,698, £148,048, £185,059 and £246,746. The shares themselves are held at
    2021-22.
  • Regions. London binds. Figure 3.7 does not list its regions, and the East of England's place in the South is
    inferred. The diagnostic reports the other two groups under both placements.
  • Parent identification, child definition, annual income, England only, national line only: as signed off on
    3 November.

Status

  • Merge main 527ad4938 (2da9b23cf; no rebase).
  • Workbook registered in Chronicle (Register CenTax's childcare cliff-edge workbook raw-only chronicle#445, merged; the bytes are in its R2 store); builder
    reads it.
  • Vahid's review (issuecomment-6610764268): items 1 to 8 addressed. Item 2's release gate is proposed, not
    built (María's call).
  • Vahid's second review (pullrequestreview-6040705210): nothing blocking. The non-employee cell is now a
    diagnostic (item 1). Item 2's level check stays a manual run of the diagnostic for this cut.
  • Regenerated target_references.json, the membership report and the signed compile-parity receipt from
    the pinned feed (15040ea5): 1,719 national references, after the non-employee cell moved to the diagnostics.
  • Targeted tests on the five-cell change, with the engines blocked as CI runs them: 630 passed and 5 skipped
    (they need the pinned feed).
  • Base switched from uk-pair-release-2151 (Build the national + local-area pair on policyengine-uk 2.151.0, and drop UK model-figure withholding #1396, merged) to main, so CI runs.
  • National A/B on current main: control b2179c-41053 (b891aa69), treatment = this head's calibration, with the
    six cells (issuecomment-7133027000). The five-cell version isn't recalibrated.
  • £100k childcare dashboard static cost on both builds (issuecomment-7133553450): the CenTax cells move it by
    0.1% to 0.5%.
  • María's sign-off: the bunching edge, the couples CenTax's linkage misses (Vahid's second review, item 3),
    the fit evidence.

axiom: n/a: microsim calibration targets only, no policy rule changes.

🤖 Generated with Claude Code

MaxGhenis and others added 9 commits October 25, 2026 13:45
CenTax's HMRC tabulations of English parents of 3- and 4-year-olds
(Advani, Flew, Pepin-Hall and Summers 2026, Removing the childcare
cliff-edge, Figures 3.1, 3.3, 3.6 and 3.7, tax year 2021-22) become nine
derived facts in uk/centax_childcare_parent_facts.json. Four are ANI band
shares of the parents in (0, £200k]: (0, 50k], (50k, 80k], (80k, 120k]
and (120k, 200k]. Five split the parents in (£80k, £150k]: women, a main
income source other than employment, London, the South excluding London,
and the North and Midlands. Each share is multiplied by the baseline
build's own parent count, so the targets set the shape and leave the
level to the DfE caseloads.

uk_runtime/centax_childcare_parents.py holds the cells, the edges (the
2021-22 edges aged by policyengine-uk's OBR average earnings index, 2025
over 2021, which is 1.24772), the loader's checks, and two measures:
- centax_parent_of_eligible_3_4_year_old: an adult of a benefit unit with
  a dependent child in England, DfE age 3 to 5, before school in at
  least one term;
- centax_employment_main_income_source: employment is the year's largest
  income source.
The measure resolver computes both and refuses a persisted column of
either. adjusted_net_income_annual joins the annual income measures,
because HMRC's data count the tax year's income.

tools/build_uk_centax_childcare_parent_facts.py reads the pinned
workbook (sha256 8c238557…). tools/diagnose_uk_centax_parents.py
reports each cell's fit and household support on any national H5. The
parent count, 2,165,344, comes from its run on the a6299504 staged
national.

Never targets: CenTax's model outputs, which are the bunching tables,
frictions, elasticities, marginal bunchers and costs. The Table A.1
levels and the Figure 2.1 and 3.12 shares are kept as diagnostics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nine targets (microcosm.centax_childcare_parents.*) bind the derived
CenTax facts on the national line only, at England grain: four adjusted
net income bands and five splits of (£80k, £150k]. One loader,
uk_runtime/derived_facts.py, merges them with the high-value home stock
at every national compile site, and the target-input receipts name both
resources. The reference generator reads the new resource, pins the
family to England and streams the feed line by line. The compile-parity
receipt tool marks the nine rows ledger_only with a stated rationale.

Tests cover the resource, the two person measures, the contract and the
merged compile sites, with Hypothesis properties for the edges, the
measures and the share partition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…w CenTax finds parents

The plain-column review test lists every variable a contract binding reads as
a filter or band. The two CenTax measures are new there. Neither is a stored
read: the resolver refuses them as frame inputs, computes the parent flag from
the engine's term shares at the calibration period, and computes the main
income source from the annual measures. So they join the reviewed set.

Each CenTax target's selector note now says how CenTax identifies parents
(childcare accounts, PAYE parental leave, address matching of partners) and
that this leaves out some parents above £100k, so the upper cells may lean low.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… correct the bunching claim

Review r1 (GPT-6.1 Sol) found the main-source measure left out other
investment income and taxable miscellaneous income. A parent with £30,000 of
pay and £100,000 of other investment income counted as an employee, so the
non-employee cell undercounted. The measure now weighs pay against every
component of the engine's total_income (ITA 2007 s. 23), with
social_security_income taken benefit by benefit. An engine test pins the
compared set to the installed engine's own total_income leaves. A parametrized
test checks that each source can outrank pay, and a resolver regression covers
other investment income.

The selector notes said the (£80k, £120k] band's count does not depend on
bunching. That held in 2021-22, when the cliff sat inside the band. Aged to
2025, the band and the split band start at £99,817 while the cliff stays at
£100k, so a parent who bunches below that edge leaves them. The notes now say
so, and size the lean with CenTax's 2,610 bunching parents of 3- and
4-year-olds in 2022 (p. 22).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ity receipt with the CenTax cells

Generated by tools/generate_uk_target_references.py and
tools/build_uk_ledger_compile_parity_signed_differences.py --surface national
on the Chronicle UK feed at abf0921b (consumer_facts.jsonl sha256 2b64fecf…).
Additions only: nine references, nine membership entries, the CenTax derived
fact resource, and nine ledger_only rows in the national receipt (the cells
are derived facts with no incumbent fixture). The pinned reference count rises
from 1,336 to 1,345.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The measure banded parents on the year's ANI but compared pay against the
contributory benefits at their current amounts, so a benefit paid for part
of the year could outrank the year's pay (review r2, unconfirmed). Every
source other than the annual measures is now read on the annual-income
simulation, which carries JSA, ESA and incapacity benefit at their share of
the year and every other source as the engine computes it.

A resolver test pins it: a claimant paid ESA for a quarter of the year,
whose current ESA is above the year's pay, now counts as an employee. The
test fails on the previous resolver. On both nationals (a6299504 and the
CenTax build) the nine cells and every parent aggregate are unchanged to
the last digit, so the CenTax build's rows are what this code builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Microcosm copies an FRS household several times (the SPI, high-value-home
and CGT copies), so a Kish count over Microcosm households overstates the
independent support behind a cell. The diagnostic now also reports, for
each cell and parent group, the distinct source households
(household_source_id), the Kish effective number over their contributions
and the share on the ten heaviest.

Invariant, tested for every input the strategy draws: merging households
into their sources never raises the Kish count or the number of units and
never lowers the top-ten share, and the two agree when each household is
its own source. A worked example pins the arithmetic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r3 (P3): the source-support tests still passed if the top-ten source
share copied the household share. Twelve equal households, the first two
copies of one source, now pin both: 10/12 over households, 11/12 over the
11 sources. The test fails on that mutant.

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

juaristi22 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

@vahid-ahmadi could you email Arun Advani and ask whether we may publish the values this PR derives from CenTax's workbook (AdvaniFlewPepinhallSummers2026_ChildcareThreshold_data.xlsx, which he sent you on 21 October)? The nine targets are built from its shares for Figures 3.1, 3.3, 3.6 and 3.7, and uk/centax_childcare_parent_facts.json also records the bin sums and the Figure 3.12 shares. CenTax's report page links only the PDF, so the workbook itself isn't public.

Workbook recommendation (María): if Arun agrees, the workbook goes into Chronicle as a CenTax source, the way the high-value home inputs (HM Land Registry's Price Paid Data and the NSPL) are registered there. Microcosm then keeps only its own derivation: each share times the build's own parent count, with the band edges aged. That follows our rule that publisher numbers come from Chronicle, not from files copied into microcosm.

@MaxGhenis this recommendation is for you too. Could you also push your four local commits (3b99416, ea2e3d6, c35cd4e and ad0b2ee) to this branch, so the rebase on current main can start from them?

Design sign-off (María, 3 November): the design calls in the description are signed off:

  • CenTax's shares, not its levels;
  • the four ANI bands up to £200k and the five splits of (£80k, £150k];
  • the edges aged from 2021-22 by the OBR average earnings index, with the 2021-22 shares held;
  • the child definition (DfE age and the term share);
  • annual ANI;
  • England only, on the national line only.

Not signed yet: the bunching edge after ageing, the couples CenTax's linkage misses, the non-employee cell's support and the fit evidence. They wait for a build on current main.

@vahid-ahmadi

Copy link
Copy Markdown
Contributor

Review of 85181c8. I looked at the derivation (share times the baseline's parent count), the bands and how they are aged, how the five splits are defined, the parent and main-source measures, the loader, the build tool and the tests. I checked the figure definitions only against the public PDF (Advani, Flew, Pepin-Hall and Summers 2026). I did not open the workbook. The head is stale and four commits aren't pushed yet, so I kept to points that should survive the rebase. A full re-review can follow once those commits are pushed and the branch is rebased. I don't reopen María's signed-off design calls, and I leave her four open items (the bunching edge after ageing, couples the linkage misses, non-employee support, fit evidence) to her list.

Must

  1. The parent count includes adults that HMRC's frame cannot contain. See uk_runtime/centax_childcare_parents.py:214-242 and tools/diagnose_uk_centax_parents.py:226. CenTax's parents are taxpayers found through childcare accounts, PAYE parental leave or UPRN matching. The UPRN data are built from PAYE RTI and SA addresses (pp. 12-13 and pp. 54-55). A partner with no PAYE or SA record is therefore outside CenTax's sample. That covers a partner whose only ANI is savings interest, a taxable DWP benefit such as Carer's Allowance, or contributory ESA. parent_count counts every adult of the benefit unit with 0 < adjusted_net_income_annual <= 249,543, and those people almost all sit in the bottom band. Each share is then applied to that larger count, so every upper cell is scaled up with it. The model count is 2,165,344, against CenTax's 1,648,632 identified parents (Table A.1). The gap isn't all out-of-frame adults, but every 100,000 of them raises all nine targets by 4.6% (100,000 / 2,165,344). That includes the (£80k, £120k] band, the one the £100k dashboard reads. Suggested fix: have the diagnostic report the weighted parents in (0, £62,386] with no employment, self-employment or private pension income in the year. If that number is material, either (a) require a PAYE or SA footprint in centax_parent_of_eligible_3_4_year_old, or (b) take the shares within (£50k, £200k] in 2021-22 pounds, scale them by the model's parents above £62,386, and keep ani_0_to_50k as a diagnostic rather than a target. Option (b) also helps with item 2.

Should

  1. The four bands bind a level, and it comes from a6299504. See tools/build_uk_centax_childcare_parent_facts.py:394,415-424 and the loader at centax_childcare_parents.py:456-553. All four bands are bound and they partition (0, £249,543], so together they fix England's total parents in that range at a6299504's 2,165,344. That is a level target, not just a shape. After the rebase (new spine, Build the national + local-area pair on policyengine-uk 2.151.0, and drop UK model-figure withholding #1396, the DfE rows) the total still comes from the old build. Example: if the post-rebase baseline has 2.10m such parents, the fit is pulled up 3.1% to reach the old total, and most of that pull lands on the bottom band. If the tool is rerun on each release instead, the total just follows whatever the previous build produced. The loader checks the edges, the uprating and that the share arithmetic adds up, but nothing ties inputs.baseline.sha256 to the build being calibrated. Suggested fix: rebuild the resource on the post-rebase baseline. Then add a compile or certifier check that the current baseline's count is within a set tolerance of parameters.parent_count, or refuse when inputs.baseline isn't the incoming baseline. Leaving one band unbound, as in 1(b), keeps the bottom of the distribution free. The nine rows carry no tolerance or weight of their own, so they enter on the default loss like the other national rows. That makes the post-rebase before/after on the 1,199 shared targets (your 1.2% ESS figure) the evidence to rerun.

  2. The region cells rest on a grouping the PDF doesn't give, and on pooled nominal bands. See centax_childcare_parents.py:120-144 and build_uk_centax_childcare_parent_facts.py:200-211,224. The Figure 3.7 notes (p. 25) give the sample (England and Scotland, pooled 2019-2022) but don't say which regions make up "South excl. London" or "North and Midlands". The East of England's place is inferred from the ONS child-population check in the module comment. If the East sits in North and Midlands, the South cell is too high and the North and Midlands cell too low by the East's whole share of the band. The pooling also applies the nominal (£80k, £150k] band to four tax years of earnings growth, while the split band's total comes from 2021-22 alone (Figure 3.1). Suggested fix: say in the selector notes that the grouping is inferred, and have the diagnostic report the three region cells under the other placement of the East. Until the grouping is confirmed, consider binding London only, which the figure does name.

Nit

  1. CENTAX_SPLIT_BAND_2022 (centax_childcare_parents.py:119): the £150k top edge was the additional-rate threshold in 2021-22. Figures 3.3 and 3.7 both show a spike in the last bin. Aged to £187,158 it marks no 2025-26 threshold, while the current £125,140 additional-rate threshold falls inside the band. The effect is small (one bin of extra mass), but it belongs next to the £100k note in the selector notes.
  2. employment_main_income_source (centax_childcare_parents.py:245-263): the PDF (Figure 3.3 notes, p. 21) says only "main source of income is from employment". It doesn't say whether that means the largest single source or more than half of income. The measure uses the largest single source. A parent with £60k pay, £50k dividends and £30k profit is an employee under that rule but not under a half rule. Worth one line in the notes saying the PDF leaves this open.
  3. SHEETS (build_uk_centax_childcare_parent_facts.py:70-98): the PDF notes say the bins are £1,000 wide for Figures 3.1 and 3.6, but the tool reads £500 steps for both. The PDF also doesn't say whether bins are labelled by their upper or lower edge. test_band_sums_take_bins_by_their_upper_edge tests the code's convention, not the workbook's. The edges at £80k, £120k and £200k avoid the spikes, so the other convention would move each cell by one bin. A comment on both points would save the next reader from checking the code against the PDF.
  4. fact_row (build_uk_centax_childcare_parent_facts.py:313-321): period_coverage says 2025-01-01 to 2025-12-31 with basis "flow". The contract rows say fiscal_year_flow, and the measure is the 2025-26 tax year's ANI. The high-value-homes rows use calendar dates, but they record a stock. Either use the tax year's dates or note that 2025 is the engine year.
  5. As María noted, the resource also records workbook_sums, the Figure 3.12 means and the Table A.1 levels (build_uk_centax_childcare_parent_facts.py:214-278,467-468). Only diagnose_uk_centax_parents.py:256 reads them, and nothing on the build path does. They could go in the diagnostic's own output, which would leave the resource holding only what the loader validates.

Checked and fine

  • The aged edges: 50k, 80k, 120k, 150k and 200k times 1.24772 give 62,386, 99,817, 149,726, 187,158 and 249,543. The split edges match the band edges, and the loader refuses edges that don't.
  • band_sum takes (lower, upper] on both the £500 and £1,000 steps. max(fig31) == 200k is guarded, and so are the series reader's header and gap checks.
  • Year conventions: "2022" is 2021-22 (p. 2). Figures 3.1, 3.3 and 3.6 are single-year and 3.7 is pooled, as the module says. Only the English columns of Figure 3.7 enter the region shares.
  • The child definition matches CenTax's ("eligible ... for a positive number of months", Table A.1 notes). A DfE age 2 child can't qualify within the tax year, and the term-share floor at a sixth tests float32 thirds safely.
  • The female share within the split band agrees with Table A.1's 26.6% for £80k-£140k. Each split is the split-band share times the within-band share, and the three region cells add up to the split band.
  • Each fact key's digest covers the workbook sha256, the baseline sha256 and the method, so rebuilding on a new baseline changes the keys.
  • Tests: the PR's engine-free tests pass locally at the head. That's test_uk_centax_childcare_parents.py, test_uk_measure_simulation.py, test_uk_population_targets.py, test_uk_full_targets.py, test_uk_high_value_homes_region_control.py, test_uk_measurement_period.py and shared/test_country_spec.py, 313 passed. I did not run the engine test test_uk_centax_main_income_source.py (no policyengine-uk in my environment). I also skipped a merge-base comparison, because the branch conflicts with its base.

CI at 85181c8: no workflow runs; combined status pending with no checks reported.

Verdict: the shares-times-count derivation is clean and well guarded. Before the rebased build is judged on fit, two things should be settled: what population parent_count counts (1) and which baseline it comes from (2).

🤖 Generated with Claude Code

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

@juaristi22, sorry for the wait. I pushed the four commits, so you can rebase from ad0b2ee onto current main. test_chronicle_184_uc_and_obr_references_compile_fail_closed fails at that head, because I raised the UK spec to 1,345 target references but left the pin in test_uk_national_calibration.py at 1,336.

@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.

Following up on my earlier review, which noted that no workflow runs were reported. The cause is the PR's base. It still targets uk-pair-release-2151 (#1396, merged 26 October; that branch is now fully contained in main). .github/workflows/test.yml:3-7 triggers pull_request only for branches: [main]. So no check runs or statuses exist for ad0b2ee, or for any earlier head of this PR.

Rebasing onto main won't start CI by itself. The PR's base also needs switching to main (Edit, next to the title). That way the rebased branch gets the engine-free and engine-uk lanes, and the pin failure in test_uk_national_calibration.py shows up in CI.

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

juaristi22 and others added 3 commits November 23, 2026 23:00
Brings microcosm#1399 onto main 527ad49 (2,178 commits since its merge
base 67ee2dd). Main has grown its own uk_runtime/derived_facts.py with
the high-value home stock and DESNZ's constituency energy, so CenTax's
parent cells join that loader as its third resource, and every national
compile site (full and national targets, the certifier, the compile-parity
receipts, the UC matrix diagnostic, the incumbent evaluation) reads them
through it. The receipts name each resource through main's
_derived_fact_provenance.

Resolutions:
- measure_simulation.py: main's named terms replace _LOSS_RELIEF_MEASURES and
  its simulation factory replaces the direct call; the CenTax measures keep
  their routes beside them, and adjusted_net_income_annual follows main's
  savings-rate annual measures.
- generate_uk_target_references.py: main's feed row-contract check, then the
  streamed read and the CenTax resource.
- uk_population_targets.json: main's contract plus the nine CenTax targets
  at the end of the registry scope, their unmapped declarations, the
  accounting note and the category.
- target_references.json, target_reference_membership.json and the signed
  compile-parity receipt: main's, to be regenerated with the CenTax rows.
- Tests: main's single pin of the national reference count (now 1,723 with
  the nine cells), its derived-resource checks and its counts plus nine.
  test_uk_national_calibration.py no longer pins the count, so the failure
  Max reported at ad0b2ee is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workbook is registered raw-only in Chronicle as
centax-childcare-cliff-edge-2026 (the same sha256 as the copy CenTax shared
on 21 October). The builder checks a local copy against that registration
through pinned_inputs, and the resource (schema 2) records the
registration, the source page and the licence the manifest states.

Vahid's review (issuecomment-6610764268):
- 1: the shares are taken within (50k, 200k] in 2021-22 pounds and scaled
  by the baseline's parents in that range, so the adults HMRC's PAYE and
  Self Assessment data do not hold, almost all below 50k, no longer scale
  the cells. ani_0_to_50k is a diagnostic.
- 2: the resource is rebuilt on b891aa69, the #1687 national main builds,
  and names that build; the diagnostic's level check compares any H5's
  parents in the share base with the resource's.
- 3: only London binds; the South and the North and Midlands are
  diagnostics, reported with the East of England in either group.
- 4 to 8: the top edge's threshold, the main-source reading and the bins in
  the notes; the tax year's coverage dates; the diagnostics-only figures
  leave the resource for the diagnostic, which reads them from the
  registered workbook.

From the merge: policyengine-uk 2.179.2 ages 2021 to 2025 by 1.2337, so
the contract's edges move; employment in the main-source measure is pay
plus taxable benefits in kind, which the engine keeps apart from pay; and
the engine test walks adjusted_net_income_components. Six cells bind.

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

From the pinned feed (Chronicle 15040ea5, 2,160,350 facts) with the six
CenTax cells: six references with their hierarchy entries, six membership
entries and six ledger_only rows in the incumbent compile-parity receipt,
and the counts they move (1,720 active national references, 601 contract
targets). Every other entry is main's, unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juaristi22
juaristi22 changed the base branch from uk-pair-release-2151 to main November 24, 2026 09:24
@juaristi22 juaristi22 closed this Nov 24, 2026
@juaristi22 juaristi22 reopened this Nov 24, 2026
@juaristi22

Copy link
Copy Markdown
Collaborator

@vahid-ahmadi thanks, this is addressed at 9f7cea7b4, which merges main 527ad4938 into the branch (no rebase, so
Max's commits stay as they were). The workbook now comes from Chronicle: arunadvani.com publishes it as the data
for the charts, and Arun is happy for us to use it. PolicyEngine/chronicle#445 registers it raw-only as
centax-childcare-cliff-edge-2026 (same sha256, 8c238557…). The builder checks the bytes against that
registration, and the resource records it.

Must 1 (who parent_count counts). I took your option (b). The shares are now taken within (£50k, £200k] in
2021-22 pounds and scaled by the model's parents in that range at 2025. ani_0_to_50k is a diagnostic, not a
target. Your check was material: on the #1687 national (b891aa69), the parents up to the aged £50k with no pay,
profit or private pension in the year were about 6% of the parents the old count scaled by. The diagnostic
reports them.

Should 2 (which baseline sets the level). The resource is rebuilt on b891aa69, the #1687 national that main
now builds. The resource records that build and its H5's sha256. With (b), the bottom band is free and the pinned
level is only the count above £50k. tools/diagnose_uk_centax_parents.py --facts reports a level check on any H5:
its parents in the share base against the resource's, within a 2% tolerance. The A/B's control is that same
build. I haven't made it a release gate. The cut's head-to-head already scores every target on the line's
current build, so the certifier could refuse when the bands' share-weighted error there is outside the
tolerance. That changes the gate battery, so it's María's call.

Should 3 (regions). Only London binds now. The South excluding London and the North and Midlands are
diagnostics. The diagnostic reports them with the East of England in either group. The selector notes say the
grouping is inferred, and that Figure 3.7 pools 2018-19 to 2021-22 in nominal pounds.

Nits.
4. Added to the selector notes: the £150k top edge was 2021-22's additional-rate threshold, and Figures 3.3 and
3.7 show the spike in the last bin. Aged, it marks no 2025-26 threshold, while £125,140 falls inside the band.
5. The notes and the measure's docstring now say the report leaves "main source" open, and that the measure reads
the largest single source. Employment is now pay plus taxable benefits in kind: since policyengine-uk 2.165.0
the engine keeps them apart from pay, and its taxable employment income adds them back, as main's HMRC
employment rows do.
6. The workbook settles the bin widths. Its Figure 3.1 and 3.6 sheets hold £500 bins and say the report's charts
aggregate them to £1,000. The labels run from 500 to 200,000, so they are upper edges; SHEETS says so. Read
by lower edges instead, the six shares would move by 1.6% to 3.9%.
7. period_coverage now spans the 2025-26 tax year (6 April 2025 to 5 April 2026). The note says the period
value 2025 is the engine's year for it.
8. Done. The resource holds only the derivation: shares, edges, the parent count and the rows. Table A.1, Figure
3.12, the bottom band and the two other region groups come from the registered workbook, in the diagnostic's
own output.

From the merge. policyengine-uk 2.179.2's OBR earnings index ages 2021 to 2025 by 1.2337 (it was 1.2477 on
2.151.0). The edges are now £61,686, £98,698, £148,048, £185,059 and £246,746. The engine's total income is now
built from adjusted_net_income_components, so the engine test checks the compared sources against that list.
Max's 9 Nov pin failure is gone: main pins the national count once, in test_uk_target_references.py (1,720 with
the six cells).

Six cells bind, down from nine. The PR now targets main, so CI runs on it. The A/B on current main is next, and
it waits on María's go.

test_the_annual_measures_tax_each_persons_year checks that the receipt
lists every annual measure. The CenTax cells added
adjusted_net_income_annual, so the test computes it too: the leaver's
spell in the year raises it, the entrant's half year lowers it, and a
year paid in full leaves it unchanged.

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

Copy link
Copy Markdown
Collaborator

National A/B on current main (local measurement: nothing staged, certified or published)

This measures the pull of the six CenTax cells on the national that main builds.

  • Control: arm b2179c-41053, the national b891aa69, now current.
  • Treatment: this PR's head 428ff94da, calibrated on the control's own spine. The spine is the same bytes,
    and the ledger (15040ea5), doctrine and seed are the same, so only the targets differ.
  • Review date: the treatment runs at 2026-11-24 because main's gate registers hold entries signed on 22 and
    23 November. No calibration exclusion or uprating hold is approved, or lapses, between that date and the
    control's (2026-11-18).
  • The calibration took 1 h 04 min and exited 0.
  1. Build: the seven terminal gates pass in both arms: aggregate admin, reference coverage, CGT entrants,
    target fit, weight ESS, weight ratio and zero-weight strata. No CenTax row is skipped, past the loss cap or
    warned on.

  2. CenTax fit: the five cells with enough support end within 0.15% of their targets: the three ANI bands, women
    and London. The non-employee cell rests on fewer than 3 FRS source households, so its figures are withheld.

  3. Shared fit: of the 1,536 rows both arms bind, 1,516 are within 10%, one fewer than on the control (1,517).
    Six shared rows move by more than a point, all in these families:

    • HMRC SPI income-band rows and regional high-income rows;
    • regional population by age;
    • UC payment bands;
    • Welsh council tax bands.

    The London cell and the top band move weight off England's high-earning parents. The solver holds the
    national SPI bands by moving weight onto high earners elsewhere.

  4. Weights: the effective sample size is within 0.1% of the control's, and the weight-ratio gate passes. In the
    five cells, the Kish count of FRS source households rises, so weight within each cell spreads out.

  5. Level check: the treatment's parents in the share base are within 0.1% of the resource's parent count
    (tolerance 2%).

Still open:

  • the £100k childcare dashboard's static cost on this build, which runs locally next for one or two years
    against the dashboard's current figures;
  • María's call on the non-employee cell. Under the 2026-10-21 rule it stays bound unless a measured distortion
    takes it out. The checks above, which cover all six cells together, show none.

@juaristi22

Copy link
Copy Markdown
Collaborator

£100k childcare dashboard: static cost on this build (local; the live dashboard is unchanged)

This runs free-childcare-reform's own code from its main (998a608), unchanged, on two H5s with policyengine-uk
2.179.2: the control b891aa69 and this PR's treatment (the A/B above). Only the static steps ran, with no labour
supply response, for 2027 and 2028.

What the CenTax cells change (same engine and code; only the targets differ):

  • 2027: free hours +£0.015bn (+0.5%), the subsidy +£0.007bn (+0.1%), both legs +£0.023bn (+0.3%).
  • 2028: free hours +£0.014bn (+0.4%), the subsidy +£0.007bn (+0.1%), both legs +£0.024bn (+0.3%).
  • Baseline childcare spending moves by less than 1% on every programme in both years.

Against the dashboard's published figures (Enhanced FRS 7b0a06f0, policyengine-uk 2.94.0, generated 2
September):

  • 2027: free hours £3.108bn against £1.966bn; the subsidy £5.263bn against £4.839bn; both legs £8.109bn against
    £6.638bn.
  • 2028: free hours £3.246bn against £2.013bn; the subsidy £5.390bn against £4.956bn; both legs £8.358bn against
    £6.798bn.

These gaps come from the dataset and about 85 engine versions, not from the CenTax cells. Most of the free-hours
gap sits in the working-parent entitlement. Under the reform, that entitlement rises by £1.38bn in 2027 on
policyengine-uk 2.179.2, but it didn't move on 2.94.0. The reform's no-stacking rule takes universal hours away
from children who have the working-parent entitlement. The newer engine appears to count those hours under the
working-parent entitlement instead. That's for the dashboard's reruns (PolicyEngine/free-childcare-reform#12 and
#13) to check, not this PR.

@juaristi22
juaristi22 marked this pull request as ready for review November 24, 2026 13:58

@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 to my 3 November review, now at 428ff94. Thanks, María. Items 1 and 3 to 8 are addressed as you describe. Item 2 is narrowed but still open, and I explain below why that's acceptable for now. I found nothing blocking. Four points follow, all for your sign-off list rather than code changes.

Checked at this head

  • Shares. I recomputed all six from the workbook (8c238557…, the bytes chronicle#445 registers) without using the builder. The three bands come to 0.644353, 0.247273 and 0.108374, which sum to 1. The split band is 0.308517. Female is 0.081811, non-employee 0.044675 and London 0.088068. Every one matches parameters.shares to the last digit, and each row's value is its share times 318,478.72.
  • Ageing. At policyengine-uk 2.179.2 (unchanged in parameters and variables up to 2.179.3), the OBR earnings index gives 2025 over 2021 = 1.2337297844, and edges of £61,686, £98,698, £148,048, £185,059 and £246,746. These are identical to the resource and the contract filters.
  • Main income source. The compared sources cover all eight ANI components, with social security taken benefit by benefit as social_security_income.adds lists it, and savings interest and other_investment_income kept apart (taxable_savings_interest_income sums both).
  • Workbook pin. open_registered_workbook refuses another package, another kind, or bytes or a size that differ from the manifest. The loader refuses a resource that doesn't name the pinned file.
  • Tests and merge. test_uk_centax_childcare_parents.py gives 63 passed locally. I did not run the engine lane; CI is green on every lane. The branch merges cleanly with current main (fcabe4e). Main's commits since 527ad49 touch the emitter, telemetry and US QRF code only, so b891aa69 is still the national main builds.
  • Measurements. I read the A/B and the dashboard run but did not reproduce them.

1. The non-employee cell (your open item). It targets about 14,228 parents (0.044675 × 318,479), and the A/B says it rests on fewer than 3 FRS source households. Under the 2026-10-21 rule it stays bound unless a measured distortion takes it out. But the A/B's checks cover all six cells together, so a distortion local to this cell wouldn't show in them. Suggested measurement: the treatment-to-control weight ratio of those source households and their clones, with the shared rows they also carry. Add a plain pass or fail on whether the cell reached its target. All of that can go to the private repository with the other withheld figures. If those households carry the cell by a large multiplier, that is the measured distortion the rule asks for, and the cell can join the diagnostics as the two region groups did.

2. The level above £50k (my old item 2, narrowed rather than closed). The three bands still partition the share base, so together they pin England's parents in (£61,686, £246,746] to b891aa69's 318,479. The 2% level check is a manual run of the diagnostic. That's fine for this cut, since the A/B's treatment came within 0.1% of it. The risk returns at the next national that moves the spine: nothing forces the tool to be rerun or refuses a stale resource. What would close it: rebuild the resource as a release step, or the certifier check you proposed. Either is your call. I'd note it as accepted and open rather than resolved.

3. A number for the linkage item. CenTax's own count in the share base, Figure 3.1's parents in (£50k, £200k] in 2021-22, is 265,856. The model's count at the aged edges is 318,479, which is 20% higher. Earnings growth is taken out by the ageing, and the cohort of 3- and 4-year-olds has shrunk since 2021-22. So most of that gap is either couples that CenTax's linkage misses or model parents CenTax wouldn't count. This PR binds shares, so it doesn't change any target. It does bear on whether the level the bands pin, which flows into the £100k dashboard, is the right one.

4. Order with chronicle#445 and draft status.

  • The status list says the bytes are in Chronicle's R2 store, but chronicle#445 says publish-raw hasn't run.
  • The resource cites a registration that exists only on that open PR, so #445 should merge, with its upload, before this one.
  • The body opens with "WIP (draft)" and your sign-off box is unticked, but GitHub shows the PR as ready, with no conflicts and mergeable. Converting it back to draft until you sign off would prevent an early merge.

Nits (no action needed)

  • Employment compares pay plus benefits in kind, but leaves out employment_benefits (statutory sick, maternity and paternity pay), which the engine's taxable employment income also counts. For parents of young children that's mostly maternity and paternity pay. In this band it can only move someone whose pay and another source are within about £9k of each other. One line in the measure's notes would do.
  • Figure 3.6's band total is 82,017 against Figure 3.1's 82,021. The female share is taken within Figure 3.6 itself, so this is harmless.

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

Vahid's second review of microcosm#1399 (item 1) asked for a direct check of
the cell for parents whose main income source is not employment, which rests
on fewer than 3 FRS source households. The check is kept with the other
withheld figures, and on it María ruled the cell a diagnostic (24 November
2026), as the two region groups outside London are.

- centax_childcare_parents: CENTAX_SPLITS binds women and London;
  CENTAX_DIAGNOSTIC_SPLITS holds the non-employee split, and
  centax_diagnostic_cell_ids() names its cell.
- The builder no longer reads Figure 3.3; the resource is rebuilt with five
  rows, their values unchanged.
- The diagnostic reports the non-employee cell under diagnostic_cells, with
  CenTax's Figure 3.3 share among its workbook comparators.
- The contract drops the cell's target and registry-parity entries (662
  targets, a registry scope of 600).
- Regenerated from the pinned feed 15040ea5: target_references.json and the
  membership report (1,719 active references) and the signed compile-parity
  receipt (1,719 compiled).
- Tests follow the counts; the rows-digest test permutes as many rows as
  there are cells.

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

Copy link
Copy Markdown
Collaborator

The non-employee cell is now a diagnostic (5aa117168)

Vahid's second review (item 1) asked for a direct check of the cell for parents whose main income source is
not employment. It rests on fewer than 3 FRS source households. The check is kept with the other withheld figures
and shows the measured distortion the 2026-10-21 rule asks for. So the cell joins the diagnostics, as the two
region groups did (María's ruling of 24 November). The PR now binds five cells: the three ANI bands, women and
London.

  • uk_runtime/centax_childcare_parents.py: CENTAX_SPLITS binds women and London.
    CENTAX_DIAGNOSTIC_SPLITS holds the non-employee split, which tools/diagnose_uk_centax_parents.py reports
    with CenTax's Figure 3.3 share.
  • The resource is rebuilt from the registered workbook: five rows, with values unchanged, and the builder no
    longer reads Figure 3.3.
  • The contract drops the cell's target and parity entries (662 targets). The target references, membership
    report and signed receipt are regenerated from 15040ea5 (1,719 national references).
  • The A/B above measured the six cells. The five-cell version isn't recalibrated.

@juaristi22
juaristi22 merged commit cac12ab into main Nov 24, 2026
12 checks passed
juaristi22 added a commit that referenced this pull request Nov 24, 2026
)

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>
juaristi22 added a commit that referenced this pull request Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22 added a commit that referenced this pull request Nov 25, 2026
…C new-claimant draw and the PIP split on the clone-first spine (#931)

Main took 22 pull requests since bcb5cba. Among them are #1687
(policyengine-uk 2.179.2, the UC new-claimant draw and the re-pin to
Chronicle 15040ea5), #1663 (the PIP split and the LCWRA imputation), #1399
(CenTax childcare parent targets), and the frame and QRF changes #1666,
#1683, #1667, #1682 and #1684. Thirty files conflicted.

The spec. sources.yaml is the truth, and source_stages.json is derived from
it by stage name, so the two agree by value; only the stages'
source-manifest pins in the release-input coverage manifest move beyond a
plain three-way merge, from the merged stage file. Notes both sides
extended keep both texts. Main's child-tab pay (CHILD.CHEARNS) reaches
frs_hmrc_spine_leaves, whose block this branch never changed, and main's
uc_new_claimant_draw runs last, as on main: the roster has 64 stages.

The new-claimant draw follows this branch's engine-stage rule: its kernel
binds the modules every engine stage binds and the FRS release's year
rules, it joins the counting stages, and it binds frs_spine for two
constants only. Main's LCWRA imputation receipt counts people in distinct
source households among geographic clone 0's rows, as the rest of that
receipt does here; main's tests of it pass unchanged.

The release export keeps this branch's line parameter and area-code rule
and adds main's UK totals of the share keys' components. Main's
dataset-year frame is rebuilt with the ISA income contract and the savings
income projection, so the two export kernels now hash the engine adapter;
the measures and national problem kernels hash the shared-column check
main's frames run before each write (#1683).

target_fit_reviewed_exclusions.json is main's (640f252 retired a stale
national row), and the battery tests' clock moves to main's approval of 23
November. The gate battery's policy, gates manifest, fingerprint and
release-cut pins, the spec-engine seed map and protocol, and the UK loader
and US spec pins are computed on the merged tree; the US F0 coverage report
is regenerated (--check passes). The measure-simulation names number 146:
main's PIP and RTI checks and this branch's two land diagnostics.

The feed. Main re-pinned to Chronicle 15040ea5. On the merged tree the
vendored facts, the national and local references and membership (with
the two UC seat deferrals), and both compile parity receipts are rebuilt
from the 15040ea5 artifact under main's labels.
The rebuild gives the three-way merge's own bytes everywhere but in two of
this branch's files: the Scottish Band D facts now name the 15040ea5 feed,
their 32 rows unchanged, and the local references list main's CenTax
childcare parents source, with 27,155 active references and 2,944 signed
deferrals as before.
The H2 fixture is regenerated on policyengine-uk 2.179.2.

Checks on the merged tree: the feed-gated tests on the 15040ea5 artifact
(the high-value homes, their gates and region control, the target
references, the local rows, the RFDR layer, the stock cells, the Chronicle
feed and the shared pin identity: 251) pass, and so do the touched,
fixture, pin and spec tests (2,136). The H2 clone-first tests cannot build
their engine blocks until the engine-population declaration is reviewed on
2.179.2, which the next commit does; the US pool tool's tests need
policyengine-us, which this environment does not install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22 added a commit that referenced this pull request Nov 27, 2026
…beside the LCFS decile receipt (#1717)

PolicyEngine/chronicle#450 adds ONS Family Spending, financial year ending
2025 (workbook 1, Tables 3.1E and A6). It is the official reference #1717
asked for beside the LCFS stage's frame-against-donor decile comparison.

- The UK feed is re-pinned to 4e7d7746, #450's head on Chronicle main
  ece6bb29: 2,160,837 rows, against 15040ea5's 2,160,350. The surfaces were
  regenerated in docs/uk-chronicle-feed-repin.md's order.
  - Every 15040ea5 row is byte-identical, and the 487 new rows are #450's.
  - The national references and both compile-parity receipts are
    byte-identical.
  - The other surfaces change only their feed identity. The DESNZ
    constituency resource keeps its 2,526 values, with new keys.
  - The local references gain the CenTax hierarchy category that #1399
    declared.
- The new vendored ons_family_spending_income_decile_facts.json (133 rows)
  holds Table 3.1E's deciles on the updated OECD-modified scale and all
  households. The country package and the LCFS stage declare it.
- family_spending_by_decile() reads it. For each decile, in total and by
  division, decile_fit sets the published weekly mean and its shape beside
  the frame's and the donor's own profiles. A profile is each decile's mean
  over its deciles 4 to 7. The reading is report-only: an unavailable table
  records its reason.
- On the licensed stage replay:
  - the donor's profile sits within 0.93 to 1.10 of the published shape in
    every decile, with the bottom decile at 0.98;
  - the frame's bottom decile sits at 1.13.

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.

3 participants