Skip to content

Draw LCFS spending as a budget and a donor's mix, and fix the donor's income predictors (#1717) - #1736

Merged
juaristi22 merged 10 commits into
mainfrom
uk-lcfs-budget-mix-1717
Nov 27, 2026
Merged

juaristi22 merged 10 commits into
mainfrom
uk-lcfs-budget-mix-1717

Conversation

@juaristi22

@juaristi22 juaristi22 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Closes #1717. On the certified national build, imputed spending in the bottom income decile ran a quarter above the LCFS donor. The diagnosis found two causes, and this PR fixes both. It also adds a receipt and a report-only gate that set the frame's spending beside the donor's by income decile on every build. The receipt's official reference is ONS Family Spending (PolicyEngine/chronicle#450), read from a re-pinned Chronicle feed.

Fix A: the donor's income predictors

The frame's predictors are gross pay and self-employment profit; the donor now reads the same concepts (LCF 2024-25 User Guide Volume F).

  • employment_income: p008p, normal gross wage or salary on the 13-week rule. It was b303p, the pay last time paid.
  • self_employment_income: p047p plus p037p, income from main and from subsidiary self-employment. It was b3262p, the first subsidiary job's profit alone.

Fix B: one budget and one mix per household, instead of a chain

The chain drew each spend target conditioned on the earlier random draws. That compounded the forests' pull to the middle at the bottom of the income range. The new draw_budget_and_mix operation works in four steps.

  1. The budget. Each household's budget is its total spending over the twelve COICOP divisions. It is read at a keyed quantile of the household's neighbourhood in a forest fitted to the donors' log total spending, between neighbouring donors' totals.
  2. The mix. One donor is drawn at a second keyed uniform from the household's neighbourhood in a forest fitted to the division shares. That forest's features are the predictors and log total spending.
  3. The household's spending. The household takes that donor's spending scaled to its budget:
    • the divisions sum to the budget;
    • each fuel, fare and energy part keeps the donor's share of its division;
    • the excise shares are the donor's own.
  4. The range. The basket stays inside the donor's range on every spend target the support clip bounds, so the clip that follows changes nothing.
    • A household whose donor's basket, scaled to its budget, would leave that range keeps its budget. It takes a donor drawn afresh, at a third keyed uniform, from the neighbours whose basket fits.
    • A household none of whose neighbours fits keeps its donor and takes the budget nearest its own that the basket allows.

A household with a negative income, a self-employment loss say, draws like any other: both forests read incomes as values, so it sorts with the donors at the bottom of every split on income.

The general tools are in microcosm.fit.donors: forest_neighbourhoods, keyed_neighbour_donors and keyed_neighbour_quantiles.

  • microcosm.fit's __init__.py, qrf.py and model.py are untouched, so no fit kernel pin and no US pin moves.
  • The LCFS stage's hash now binds microcosm.fit.donors, as spi_employment_shell's does.

Measured on licensed data, in a local lane; aggregates only

The LCFS 2024-25 holdout. The draw is fitted on half the diaries and imputes the other half, over 12 splits, on the fix-A donor.

  • Bottom decile: total spending comes out at 0.97 of actual (se 0.03). The chain on the same predictors comes out at 1.13.
  • Other deciles: every decile is within 0.96 to 1.04 of actual.
  • Spread: the spread of total spending among similar households is 1.05 of actual, against 1.09 for the chain.
  • Correlations: the correlations between divisions sit at their sampling floor. The chain under-correlates them.

On the stage's own input (the certified build's spine), 0.5% of frame households share an exact basket with another. A draw that copies one donor's whole basket gives 99%. Mixes repeat, with about 35,000 frame households on about 5,000 donors; budgets do not.

Stage replay of this PR on that input. Frame spending over donor spending by income decile, after the stage's clip, rake and levelling, as the stage's decile_fit receipt gives it:

  • Bottom decile: 1.045, against 1.34 for the chain and 1.27 with fix A alone. The donor reweighted to the frame's household mix within each decile also gives 1.045.
  • Deciles 2 to 9: 0.89 to 0.99. Over the reweighted donor, deciles 3, 5, 6, 7 and 9 come out at 0.92 to 0.96, and deciles 2, 4 and 8 at 0.99 to 1.01.
  • Top decile: 1.20, against 1.59 for the chain. No budget goes above the donors' totals; the frame's top decile reaches further up the donor's income range than the donor's own, so more of its households draw budgets near the richest donors'. The reweighted donor's top decile sits at 1.01, so the household mix doesn't explain it.
  • All households: 0.98, level with the reweighted donor.
  • Mixes: the effective number of donors behind the frame's mixes is about 380 to 1,080 per decile, lowest in the top decile, and at least 60 in every region-and-decile cell.
  • The range step: 0.7% of frame households take a new donor at their own budget, and fewer than three keep their donor at the nearest budget it allows.
  • Gates: every release-blocking LCFS gate passes, and so does the decile gate. The UK local surface, consumption and high-value homes: remaining items (consolidation) #1278 levelling barely acts: its shared ratio is 0.99, against 1.25 for the chain.
  • The decile gate's reference.
    • Against the reweighted donor, deciles 1 to 9 have shapes of 0.97 to 1.06, with decile 1 at 1.05.
    • Against the donor as surveyed, decile 1's shape is 1.15, and the frame's household mix alone accounts for about 1.09 of that.
    • Against the reweighted donor, the chain's decile 1 is at 1.21 and fix A's alone at 1.23, so the gate still warns on the fault it was built for.
  • Against ONS Family Spending (each survey's own decile profile over the published shape):
    • The donor sits within 0.93 to 1.10 in every decile, with decile 1 at 0.98: the stage reads and ranks the LCFS much as ONS publishes it.
    • The frame sits at 1.13 in decile 1, 0.95 to 1.09 in deciles 2 to 9, and 1.23 in decile 10.

Receipt and gate

  • decile_fit, in the stage's evidence.
    • Each survey is ranked on its own equivalised predictor income: the frame at its design weights, the donor at its own.
    • Per decile and division, it gives the means, the shares spending anything, the frame's mean over the donor's, and the shape. The shape is the decile's ratio over the pooled ratio of deciles 4 to 7, so no choice of level moves it.
    • Each mean, ratio and shape comes twice: against the donor as surveyed, and against the donor reweighted, within each decile, to the frame's household mix of adults (1, 2, 3+), children (0, 1, 2+), cars (0, 1, 2+) and tenure.
    • In the reweighting, a category with fewer than three donor households joins another first, a category the frame lacks gets no weight, and no household's weight moves more than five times either way. The receipt records whether each decile met the frame's mix.
    • It gives the effective number of donors behind the frame's mixes, the inverse Simpson index at the design weights, in each decile and in each region's deciles: the number of distinct mixes to expect when cutting spending by such a group.
    • It sets ONS Family Spending beside both surveys: for each decile, in total and by division, the published weekly mean, its shape, and the frame's and the donor's own profiles over that shape. A profile is a decile's mean over its deciles 4 to 7, so the published weeks and price year need no conversion. The table is Family Spending's, financial year ending 2025 (workbook 1, Table 3.1E, the updated OECD-modified scale), from the vendored ons_family_spending_income_decile_facts.json. An unavailable table records its reason.
    • Support bands throughout, and no figure on fewer than three source households.
  • budget_and_mix, in the stage's evidence: the range step on every build. For the households given a new donor and for those moved to another budget, it gives the support band and the shares, unweighted (floored to the hundredth) and at the design weights.
  • uk_stage_lcfs_consumption_decile_fit: a diagnostic stage_health gate in the transferred phase.
    • It holds the frame to the reweighted donor (shape_reference: reweighted_donor). A frame whose households spend what the donor's households like them spend sits at 1, so a difference between the two surveys' household mixes doesn't set it off.
    • It warns when a decile 1 to 9 leaves 1 by more than 0.1 in shape.
    • Decile 10 is reported, not checked.

The Chronicle re-pin

The UK feed is re-pinned to Chronicle e4d46c93, the merge of PolicyEngine/chronicle#450. It has 2,160,837 rows, against 15040ea5's 2,160,350. The merge commit's tree is #450's head's (4e7d7746), so the artifact was built from that head and carries the merge commit's identity. Every surface was regenerated in docs/uk-chronicle-feed-repin.md's order.

Lockstep surfaces

  • the UK Chronicle feed pin and every surface it governs: the vendored resources, the references and membership, the local census, the validation levels, the parity receipts, the coverage manifest and the H2 fixture; the country package's resource list;
  • sources.yaml and its source_stages.json projection, a schema branch and the operation-kind allow-list;
  • the spine's seed key and the stage's hash binding;
  • the H2 parity fixture, regenerated (the LCFS operation, its contract sha, the synthetic person codes), and the coverage manifest's source digest;
  • the gate battery:
    • gates.json and the binding's parameter vocabulary;
    • the data contract's registries (entry, diagnostic, evidence, spine scope);
    • the policy, manifest, fingerprint and spine-part digests, with their test mirrors.

Tests run locally

These all pass:

  • test_donors.py;
  • the LCFS stage tests, stage health, country spec, source stages and QRF gates;
  • the gate battery files, the data contract and release input coverage;
  • first-party imports, transport kernels and H2 parity;
  • the UK staging smoke build and the national-role build;
  • on the new pin, the feed-reading checks for the high-value home stock and the conditioned atomic-area supports.

tools/ci_test_plan.py verify is ok, tools/build_uk_release_input_coverage_manifest.py --check reports current, and the H2 fixture regenerates byte-identically.

This closes #1717. Two questions it raised stay open: the target level for deciles 1 to 9, and how the frame's negative-income households should draw.

🤖 Generated with Claude Code

juaristi22 and others added 2 commits November 25, 2026 17:47
… income predictors (#1717)

The LCFS stage's imputed spending ran a quarter above its donor in the bottom
income decile. Two causes, two fixes:

- Fix A: the donor's income predictors now carry the frame's concepts.
  employment_income is p008p (normal gross wage, 13-week rule), not b303p
  (pay last time paid); self_employment_income sums p047p and p037p (main
  and subsidiary self-employment), not b3262p alone.
- Fix B: the spending is no longer chained target by target. The new
  draw_budget_and_mix operation reads each household's budget (total
  spending over the twelve COICOP divisions) between neighbouring donors'
  totals in a forest neighbourhood, and takes one donor's mix, drawn from a
  share forest at the predictors and that budget, scaled to the budget.
  The general tools are forest_neighbourhoods, keyed_neighbour_donors and
  keyed_neighbour_quantiles in microcosm.fit.donors.

A decile_fit receipt sets the frame's spending beside the donor's by income
decile on every build, and the report-only gate
uk_stage_lcfs_consumption_decile_fit warns when a decile 1 to 9 leaves the
donor's shape by more than 10%.

Lockstep surfaces: sources manifest and projection, schema branch and kind
allow-list, stage hash binding and spine seed key, H2 fixture, coverage
manifest, gate battery registries and digests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…icality in the national-role fixture (#1717)

Scaling a donor's basket to a household's budget could take a spend target
past the donor survey's range, so the support clip clipped rows and its
release-blocking gate, which allows none, failed the UK smoke build. A
household whose scaled basket would leave the range now keeps its budget and
takes a donor drawn afresh, at a third keyed uniform, from the neighbours whose
basket fits; one none of whose neighbours fits takes the budget nearest its own
that its donor's basket allows. Households whose first basket fits keep it.

The national-role test's bound spine report marked every spine gate
release-blocking; it now records each gate's declared criticality, as the
calibration seam's fixture does, since the spine scope carries the diagnostic
decile gate.

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.

Reviewed at 971cb5be0. This is a clear diagnosis and a well-chosen fix. Drawing one budget and one donor mix removes the chain's compounding pull to the middle. The holdout results (bottom decile 0.97 against 1.13 for the chain, all deciles within 0.96 to 1.04) are convincing. test_donors.py and test_uk_lcfs_consumption.py pass locally (167 passed).

Fix A. The new predictors (p008p, normal gross pay on the 13-week rule; p047p + p037p, main plus subsidiary self-employment) match the frame's gross concepts, and b303p (last pay) and b3262p (the first subsidiary job only) were clearly the wrong ones. I didn't verify the codes against the LCF 2024-25 User Guide Volume F myself, so that rests on your reading.

Points

  1. The top decile at 1.20. You say its incomes reach beyond the donor's. Because the budget comes from a quantile of donor totals in the neighbourhood, a frame household above the donor's income range gets a budget near the richest donors', so 1.20 comes from the frame's mix, not from extrapolation. The decile-10 figure is reported, not gated, which is fine. I'd add the frame's share of households above the donor's income maximum to the decile_fit receipt, so the 1.20 can be read against it.
  2. Mix repetition. About 35,000 frame households draw their mix from about 5,000 donors, so on average 7 households share each donor's shares. Budgets differ, so baskets don't repeat (0.5%). But within-decile variation in division shares is limited to the donor pool's. Your correlations at the sampling floor suggest that's fine. For any analysis that cuts spending by small groups (a region and decile cell, say), the effective number of distinct mixes per cell is the number to watch, so it might be worth putting in the receipt.
  3. The range step's fallback. "Fewer than three keep their donor at the nearest budget" is reassuring. One way to make sure it stays rare on future builds: a receipt count for this path, with a warning above some small share, alongside the 0.7% redraw count.
  4. Negative-income households. These are left for #1717, which is sensible. Until then, it would help to state in the stage notes how they draw: through the forest on a negative predictor, presumably landing with low-income donors.

Nothing blocks it from my side.

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

juaristi22 and others added 2 commits November 26, 2026 10:42
…ehold mix (#1717)

The decile_fit receipt now gives each decile's mean, ratio and shape twice:
against the donor as surveyed, and against the donor reweighted, within each
income decile, to the frame's household mix of adults (1, 2, 3+), children
(0, 1, 2+), cars (0, 1, 2+) and tenure, raked in turn. Before raking, a
category with fewer than three donor households joins another. A donor
category the frame lacks gets no weight, and no household's weight moves more
than five times either way. The receipt records whether each decile met the
frame's mix.

The report-only gate uk_stage_lcfs_consumption_decile_fit declares the donor
it holds the frame to (shape_reference) and now reads the reweighted shape. A
frame whose households spend what the donor's households like them spend
sits at 1, so a difference between the two surveys' household mixes no longer
sets the gate off.

On the licensed stage replay, decile 1's shape is 1.05 against the reweighted
donor, against 1.15 against the donor as surveyed. Against the reweighted
donor, the chain's decile 1 stays at 1.21 and fix A's alone at 1.23.

Re-pinned: the gate battery's policy, manifest and fingerprint digests and
the spine part's two, with the data contract's test mirror.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… decile (#1717)

From the review of #1736 at 971cb5b:

- The draw's result now names each household's mix donor, and the
  households the range step redrew or moved to another budget.
- A budget_and_mix receipt records the range step on every build. For
  each path it gives the support band and the shares, unweighted (floored
  to the hundredth) and at the design weights. Each is withheld where one
  or two source households carry it.
- The decile_fit receipt gives the effective number of donors behind the
  frame's mixes, the inverse Simpson index at the design weights, in each
  decile and in each region's deciles. It is withheld under three.
- The draw's docstring now says how a negative-income household draws. The
  forests read incomes as values, so it sorts with the donors at the
  bottom of every split on income.

Not added: the frame's share of households above the donor's income
maximum. It would turn on one LCFS household's income.

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

Copy link
Copy Markdown
Collaborator Author

Thanks, Vahid. Since your review, the decile gate compares the frame with the donor reweighted, within each decile, to the frame's household mix of adults, children, cars and tenure (cb2f994). On the licensed replay, decile 1's shape against that reweighted donor is 1.05, so the gate passes; against the donor as surveyed it is 1.15. On your points, at 469ddf9:

  1. The top decile. Agreed. Budgets are read between neighbouring donors' totals, so no budget goes above the donors'. The 1.20 comes from the frame's top decile reaching further up the donor's income range than the donor's own top decile, so more of its households draw budgets near the richest donors'. The household mix doesn't explain it: the reweighted donor's top decile sits at 1.01. I haven't added the share above the donor's income maximum, though. That share would turn on a single LCFS household's income, which the UKDS disclosure rules keep out of receipts. A share above a high percentile of the donor's income, the 99th say, would give much the same reading on many households.

  2. Mix repetition. Added. The decile receipt now gives the effective number of donors behind the frame's mixes, the inverse Simpson index at the design weights, in each decile and in each region's deciles, withheld under three. On the licensed replay it is about 380 to 1,080 per decile, lowest in the top decile, and every region-and-decile cell has at least 60.

  3. The range step's fallback. Added a budget_and_mix receipt. For the households given a new donor and for those moved to another budget, it gives the support band and the shares, unweighted and at the design weights. A warning on the moved share would be a new diagnostic gate in the battery, so I've left it out of this PR.

  4. Negative-income households. Added to the draw's docstring, the changelog and the PR body. A negative income draws like any other: both forests read incomes as values, so it sorts with the donors at the bottom of every split on income.

@juaristi22
juaristi22 marked this pull request as ready for review November 26, 2026 12:30
juaristi22 and others added 6 commits November 26, 2026 17:32
Main had moved 177 commits on. Four files conflicted, each a pinned or generated surface that both
sides had moved:

- the gate battery's policy, manifest and fingerprint digests and the spine part's two, in the
  data contract and its test mirror, recomputed from the merged spec. The contract keeps the
  decile gate's entry, diagnostic, evidence and spine-scope registrations;
- the release input coverage manifest, regenerated;
- the H2 parity fixture, regenerated (--check byte-identical).

Main's policyengine-uk 2.180.0 comes in with the lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PolicyEngine/chronicle#450 merged into Chronicle main as e4d46c93, onto an unmoved base, so the merge commit's tree is
the pull request head's (4e7d7746). The consumer artifact's manifest records no commit, so the artifact built from that
head is the merge commit's. The pin and every surface that restates the feed identity move to the merge commit, as
microcosm#1421 moved from PolicyEngine/chronicle#392's head to its merge.

- Every vendored resource changes only its pin stamps.
- The DESNZ constituency resource keeps its 2,526 rows and values, with new keys and build date.
- The local membership also moves the DESNZ cells' derived fact keys, and the local census restates the DESNZ
  resource's new digests.
- The release input coverage manifest and the H2 fixture move only their digests.
- The national and local references and both compile-parity receipts record no commit and are unchanged.
- The pin tests, the runbook entry and the changelog fragment name e4d46c93.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
María's renewal of 2026-11-27 ("renew them all in the pr, use today's date"). From 27 November the engine-free suite
failed two expiry clocks: the 22 uprating holds and the ORR rail-support measure exclusion lapse on 2026-12-11, inside
UK_HOLD_EXPIRY_NOTICE_DAYS (14). Fourteen more entries lapse between 1 and 10 December. The target-fit and area-support
gates fail an expired entry, so the next local build could not certify with them.

- uk/uprating_holds.json: the 22 holds, approved 2026-11-27 and expiring 2027-01-27, the two months the holds of
  2026-10-11 were signed for. Holds 9 (public transport support) and 16 (SLC student support) now say that the editions
  they wait for had not reached Chronicle at the renewal.
- uk/calibration_measure_exclusions.json: orr.rail_government_support, renewed with the holds to 2027-01-27. Its
  adjudication records the renewal: no build since 2026-10-24 has measured the row bound.
- uk/target_fit_reviewed_exclusions.json (5 national rows) and uk/local_target_fit_reviewed_exclusions.json (6 local
  cells): the local line's gate-only sign-offs, renewed for 28 days to 2026-12-25 (draft_uk_dense_signoff.py's
  FIT_WINDOW_DAYS), as the renewal of 2026-11-22 did. Each cites the current local release, dense build-2 attempt
  uk-local-candidate-f100-s42-20261123T075147Z-7081d968 (full gate report sha256 fbf5a2be5138e352...), which still
  breaches it. None is stale.
- uk/local_area_support_exclusions.json: the Isles of Scilly and City of London support-floor exclusions and the
  census-households bound family, renewed for three months to 2027-02-27 (AREA_WINDOW_MONTHS) with their wording
  unchanged. Both areas are still below the floor on that release.
- Tests: the battery clock moves to 2026-11-27, and the earliest expiry ahead is now 2026-12-14. The ORR row's and the
  census-households family's date pins follow.

Next to lapse: 11 more local-line target-fit sign-offs on 2026-12-14, and 3 holds on 2026-12-15, whose clock fails the
suite from 2026-12-01.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
María's go of 2026-11-27 ("Yes, renew them") for the next entries to lapse after the renewal in 217ccdd:

- the three uprating holds of 2026-10-15 that expire on 2026-12-15, whose clock would fail the engine-free suite from
  2026-12-01;
- the eleven local-line gate-only target-fit sign-offs of 2026-11-16 that expire on 2026-12-14 (six national rows and
  five local cells).

- uk/uprating_holds.json: DfT BUS01a bus journeys, DESNZ sub-national consumption and DESNZ gas-connected households,
  approved 2026-11-27 and expiring 2027-01-27, so all 25 renewed holds lapse together.
- uk/target_fit_reviewed_exclusions.json and uk/local_target_fit_reviewed_exclusions.json: renewed for 28 days to
  2026-12-25. Each cites the current local release (uk-local-candidate-f100-s42-20261123T075147Z-7081d968, full gate
  report sha256 fbf5a2be5138e352...), which still breaches it, and none is stale. Today's 22 fit renewals share one
  adjudication.
- The battery clock stays on 2026-11-27, and its comment names the earliest expiry ahead, now 2026-12-20. The
  changelog fragment covers all 51 entries.

Next clocks: the holds' fails the suite from 2026-12-20 (two holds expire 2027-01-03). The measure exclusions' fails
from 2026-12-25 (seven entries and the support floor expire 2027-01-08).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juaristi22
juaristi22 merged commit 5589fae into main Nov 27, 2026
12 checks passed
juaristi22 added a commit that referenced this pull request Nov 27, 2026
…the e4d46c93 feed and the new CI caps (#931)

Main took six pull requests since 4b78a9b: #1736 (LCFS spending drawn as
a budget and a donor's mix, with a decile receipt beside ONS Family
Spending, the UK feed re-pinned to Chronicle e4d46c93, and register
renewals), #1779 (the CI caps from the slowest legs of 19 to 26 Nov), #1772
(a batch file's error skips the fallback), #1767 (New Zealand declares its
receipt's take-up cap), #1751 (the US post-export H5 path) and #1723 (US QRF
identity tests). The engine lock does not move.

Eight files conflicted.
- uk_runtime/lcfs_consumption.py: main's receipt imports and the clip's
  docstring, which now names the mix donor and keeps this branch's count of
  distinct source households over every clone. Main's new decile and
  range-step receipts count the frame's support in distinct source
  households (source_household_id), so on the clone-first spine a source
  household's clones count once.
- uk_runtime/graph_kernels.py: the LCFS stage keeps this branch's full list
  under the derived binding rule and adds microcosm.fit.donors, which main's
  draw computes through.
- uk_runtime/calibration_run.py: main added the LCFS decile gate to the spine
  gate scope, which this branch keeps in gate_scopes.py; the gate goes there.
- .github/workflows/test.yml: main's caps and their basis, and this branch's
  note on the after-merge job's cap.
- The gate contract pins, the coverage manifest and the H2 fixture are
  recomputed on the merged tree.

The feed. Main moved the UK feed from Chronicle 15040ea5 to e4d46c93 and
recorded that every 15040ea5 row is byte-identical there, the 487 new rows
being ONS Family Spending. This branch's own Scottish Band D facts take the
new pin stamps with their 32 rows unchanged, as main's re-pin did for its
vendored resources; the local membership takes main's feed label and DESNZ
keys beside this branch's two UC seat deferrals. The vendor tool's check
against the e4d46c93 artifact did not run here, which lacks that artifact.

Checks: with policyengine-uk hidden, as in CI's engine-free job, the
tests main's six pull requests change, the LCFS, consumption, Band D,
vendoring and feed tests, the UK graph's binding rules, the nesting,
stage health, battery, contract, gate and coverage tests (2,245 pass;
the vendoring test that rebuilds the vendored resources from a local copy
of the pinned feed refuses this machine's 15040ea5 copy, as it should, and
skips in CI, which has none); the US coverage report and pins (--check);
CI's test plan verify; and on the engine, H2 parity, the UK graph, the
consumption resources and the release input coverage (56 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.

UK consumption: imputed spending in the bottom income decile runs a quarter above the LCFS

2 participants