Repository navigation
Bind local-authority energy and regional bus journeys before the Budget (#1207) - #1286
Conversation
e851e76 to
e1a65e2
Compare
|
Direction fine. Ready once the I reviewed only this PR's own diff against Findings
Source and method checks (no change needed)
What I checked
🤖 Generated with Claude Code |
5689949 to
11c9fa5
Compare
|
@vahid-ahmadi thank you. Rebased onto #1270's new head (
Verification at
🤖 Generated with Claude Code |
11c9fa5 to
dc0756f
Compare
|
Fine once the Round 2, at head Round-1 points
New findings
I found nothing else new in the four commits. The region-share receipt is report-only, at prior weights, and only shares are recorded. What I checked
🤖 Generated with Claude Code |
… ceiling legs (#1207) The energy_pricing module header still summed Energy Trends over a fiscal year and stopped at the level step; the stage levels to calendar 2024 (microcosm#1113) and since microcosm#1164 also connects zero-gas households where a region's draw falls short and caps household kWh at the declared domestic-meter limits. The energy_rake gate's docstring, the crosswalk's policy text (pricing is at QEP regions, not cap levels) and the stage note on the ceiling (capped households' NEED cells are re-raked, not every household) now say so. Text only: no value moves. The stage note moves the coverage manifest and the H2 spine fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) Northern Ireland publishes no bus fares index, so its 2024-25 yield was re-priced to calendar 2024 on England's local bus fares index, a declared proxy carrying the January 2025 rise in the English fare cap. A new price_index basis, own_fiscal_yields, weights the area's own published yields of the fiscal years opening in 2023 and 2024 three months and nine (the calendar_year_window weights) over the later yield; the bus_pricing gate recomputes it through the same bus_fare_prices call. The factor moves from 0.982 to 0.989. The schema admits the basis; the stage, coverage manifest and H2 spine fixture move with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…els (#1207) Report-only. division_capture gains, per division and in total, the donor's weighted total and the frame's over it, in all and per household: the furnishings and health over-draw #1207 lists can now be read on any build against the 2024-25 donor. The recompose receipt's uncarried block (ONS 04.5.3 and 04.5.4, which stay in the housing total) gains the donor's own other fuels at diary prices beside it. No column, gate or generated surface moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s drift (#1207) policyengine-uk prices bus fares from the dataset's trips at its own boardings per trip and yield per boarding, while the national fare rows calibrate the stage's priced column, and nothing compared the two. The measure resolver's receipt now carries bus_engine_parity, area by area, with each gap marked against a 0.1% tolerance (report only; an engine without the parameters records why). On the locked engine the boardings per trip sit a few hundredths of a per cent below the stage's, after the population re-pin, and Northern Ireland's yield above it, after DfI's restatement; the other yields agree. consumption_drift also reports the full-rate VAT base at design and final weights. No target, gate or spine surface moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DESNZ's subnational energy statistics stamp every authority with the NSPL their publication was built on, publication_2025_nspl: the April 2025 LAD frame in England and Wales and the 2019 council areas in Scotland, the roster's boundaries but for Barnsley and Sheffield, which the existing lad_2025 aliases already carry. The crosswalk's England, Wales and Scotland accept-sets gain the label, so the local energy family's facts compile; a Northern Ireland fact stamped with it still refuses. The crosswalk was regenerated from the pinned ladder (bed3f13d); only the accept-sets move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…om spend (#1207) Two uprating appliers for the local-authority energy rows: one factor per fuel takes Great Britain's authorities to the lcfs stage's Energy Trends level (Northern Ireland's part at Great Britain's share of UK households until PolicyEngine/chronicle#356 lands), and the gas-connected households take each authority's gas meters over its electricity meters. Both stamp a hold for the register. household_energy_kwh inverts the stage's kWh-to-spend step; the drift receipt carries kWh at both weights (M1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ily, routes (#1207) Three local-authority rows for England, Wales and Scotland: electricity and gas kWh and gas-connected households. The metrics energy/* are appended after the high-value homes metrics and read the stored spend at the dataset period. The census family domestic_energy carries two DESNZ sources and four fences; kWh rows are amounts and gas-connected households a count; the gas-connected cells join the census household partition and take its uprating; the kWh rows declare no higher control; Orkney and Shetland are signed deferrals. The vendored resource and the regenerated surfaces land in the last commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ns (#1207) Nine national rows, family dft_bus_journeys. The frame carries NTS trips, so the resolver's household measures price each household's trips at the boardings per trip the lcfs stage priced each series at; a persisted column of either name is refused. The generator maps the eight regions. The regenerated national references land in the last commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re (#1207) A declared minimum share of the dense solve's loss weight for DESNZ's local energy family and the BUS01 region journeys, checked after the row-metadata rule builds the weights and recorded in the problem's bindings. Check-only: the rule's arithmetic is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…enum (#1207) A household paying nothing for a fuel uses none of it whatever its region, so the kWh read-back prices paying households only. A plain policyengine-uk Simulation returns region as enum codes, so the local energy metrics decode it before pricing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… reads do (#1207) The bus engine parity read parameters at "YYYY-01-01"; the resolver's UC and rate-class reads pass the year itself, which the engine resolves to the same instant. A stub that pins the year form refused the read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the new rows (#1207) The support-floor deferral pins move by the three energy rows; the BUS05 finance tests scope to their family and the BUS01a journey rows get their own tests; the data-target parity register lists the three local energy targets; changelog fragments for both families. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t period (#1207) policyengine-uk uprates electricity and gas spend by CPI away from the period they were supplied for; the engine test reads the metric at the dataset period and checks the calibration period would differ. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1207) The rule's shares are ratios of small integers (one family in ten of a grain's four is 2.5% exactly); a sum of float weights can land a hair under the floor and refuse a surface that meets it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1207) María's rulings of 2026-10-15: the nine BUS01a journey rows are held at FY2024-25 (matched period, no published index for journeys); the four domestic_energy fences are accepted as drafted; the loss-share floors stay 2.5% and 1.25%, checked under the doctrine's row-metadata rules only. Each signed entry expires on 2026-12-15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
María's ruling of 2026-10-15: the kWh rows stay at 2024 (matched period; Energy Trends 2025 was weighed as an index and not taken), and the gas-connected rows keep their 2024 meter share under the household controls (control rescaled). Both expire on 2026-12-15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gion's share (#1207) Review round 1, findings 1 and 2. The nine journey rows declare dft.bus01.stage_pricing_year: an applier holds each row at the fiscal year the lcfs stage prices boardings per trip from (factor one, the signed matched-period hold) and refuses a row resolved to another year, as the energy rows refuse a DESNZ year other than their level's. The stage's bus receipt gains england_outside_london_regions at prior weights: each English region's share of the eight regions' other local bus trips (one boardings-per-trip factor, so trip shares are boardings shares) beside its share of BUS01a's journeys, and London residents' share of the other local trips, which fall in no region row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 1, finding 3. DESNZ's subnational methodology and guidance booklet reads non-half-hourly meters from 31 January to 30 January and half-hourly meters over the calendar year, and counts both; the source note, the fence, its adjudication, the kWh hold and the contract note said February to January. Text only: the rows bind DESNZ's split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 1, finding 4. policyengine-uk's region enum carries UNKNOWN, which no QEP price region covers: a household there that pays nothing reads zero kWh, and one that pays is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 1, finding 5. A selection register entry may declare a licence (the licence and the attribution lines), validated and copied verbatim into the vendored header, as the derived resources state theirs. desnz_local_energy_facts.json declares OGL v3.0 for DESNZ and ONS; the other resources declare none, so their files do not move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1207) The 735820c feed artifact, whose facts and manifest digests are the ones chronicle_feed.json pins, vendors desnz_local_energy_facts.json (declared in country_package.json): the domestic electricity meter counts of 350 Great Britain authorities, the gas meter counts of 347 (the Isles of Scilly, Orkney and Shetland have no gas rows), and four ONS household totals, 701 rows, with the OGL v3.0 licence in the header. desnz_domestic_energy_facts.json and ofgem_price_cap_facts.json take the C1 purpose texts; no value moves. The national references gain the nine BUS01a rows (1,283 to 1,292 active). The local references gain 1,050 DESNZ cells (350 authorities, three rows), 1,040 of them active (24,269 to 25,309): seven are signed deferrals (the support floor's five, Orkney and Shetland's gas-connected cells) and the Isles of Scilly, Orkney and Shetland have no gas kWh row. The compile parity receipts take the new rows as ledger_only (national 691 to 700, local 4,991 to 6,031); no calibration_drift or fixture_only count moves. The reference, deferral, resource and scorer count pins move with them. The coverage manifest and the H2 spine fixture are regenerated here for the whole PR: the rebase onto main after #1283 kept main's regenerated copies in the stage-text and Northern Ireland fare commits, whose source manifest and lcfs_consumption stage contract this PR changes, as the re-vendored purpose text does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dc0756f to
e2e3875
Compare
|
@vahid-ahmadi thank you. #1283 merged into Artifact. My other lane built it from PolicyEngine/chronicle@735820c. Its facts and manifest digests ( Rebase. For the generated files I took New commit
The count pins move with them. 6. WIP titles: done. I used
Their bodies now say that the resource and the regenerated surfaces land in the last commit. 7. Full run: agreed. The verification below runs CI's own engine-free file list ( 8. Body: fixed. The Verification section is now at Verification at
🤖 Generated with Claude Code |
Delivers the ready items of #1207 under María's rulings of 2026-10-14 and 2026-10-15, in one PR as she ruled: DESNZ sub-national domestic energy as local-authority targets, DfT BUS01a journeys by English region, and the other #1207 items that can land before the Budget build. It does not close #1207; what still waits is listed at the end.
Based on
mainat8a7f79a82(after #1283; policyengine-uk 2.130.1). The735820cfeed artifact is in: the new resource is vendored from it, and the references are regenerated on it againstmain.What changes
Energy stage text (C1). The
energy_pricingheader, theenergy_rakegate docstring, the region crosswalk's policy text and the stage note now describe the calendar-2024 level, the connect leg and the household kWh ceilings (#1113, #1164). Text only; the coverage manifest and the H2 spine fixture move with the stage note (regenerated in the last commit).Northern Ireland bus fares from their own yields (C2). Northern Ireland publishes no bus fares index, so its 2024-25 yield was re-priced to calendar 2024 with England's local bus fares index, which carries the January 2025 English fare-cap rise. A new
price_indexbasis,own_fiscal_yields, weights NI's own published yields of the fiscal years opening in 2023 and 2024 three months and nine over the later yield. The factor moves from 0.982 to 0.989. This is the PR's only change to a spine column: between the two spines, only NI's bus fare columns and the receipts should differ.Report-only receipts (C3, C4).
division_capturegains, per COICOP division, the donor's weighted total and the frame's over it, so the furnishings and health over-draw can be read on any build against the 2024-25 donor. The recompose receipt records the donor's other fuels beside ONS 04.5.3 and 04.5.4.bus_engine_parity: the locked engine'sgov.dft.bus.boardings_per_tripandyield_per_boardingbeside the stage's, area by area, against a 0.1% tolerance. An engine without the parameters records why.consumption_driftgains the full-rate VAT base at design and final weights.Crosswalk vintage (C5). DESNZ stamps every authority with
publication_2025_nspl; the England, Wales and Scotland accept-sets gain it. Barnsley and Sheffield resolve through the existinglad_2025aliases.Local energy appliers (C6).
uk_runtime/domestic_energy_targets.py:desnz.energy_trends.gb_domestic_level: one factor per fuel puts Great Britain's authorities on the stage's Energy Trends level, so the rows carry only DESNZ's split between areas. Northern Ireland's part of the UK level is taken out at Great Britain's share of UK households (ONS LFS 2024) until UK local energy, area classification and Welsh bus facts: DESNZ Northern Ireland and sub-local consumption, rural-urban lookups, BUS04 country rows (PolicyEngine/microcosm#1207) chronicle#356 brings NI's consumption. A row resolved to a DESNZ year other than the level's is refused.desnz.subnational.gas_meter_share: each authority's census households times its gas meters over its electricity meters; a missing meter row or a share outside (0, 1] is refused.household_energy_kwhturns stored spend back into kWh at the stage's declared QEP prices (the inverse of the stage's own step).consumption_driftcarries electricity and gas kWh at both weights.Local energy family (C7). Three local-authority rows for England, Wales and Scotland:
desnz.subnational.electricity_kwh,desnz.subnational.gas_kwhanddesnz.subnational.gas_connected_households(census familydomestic_energy, two DESNZ sources, four fences).energy/electricity_kwh,energy/gas_kwhandenergy/gas_connected_households, appended after the high-value homes metrics, local authorities only. They read the stored spend at the dataset period: policyengine-uk uprates electricity and gas spend by CPI away from the period they were supplied for (an engine test pins this).local_routes: no_higher_control(DESNZ's region rows are the authorities' sums, and a gas bridge would put the three authorities without gas rows in controlled legs).census_gas_connected_share) and take the census-household uprating, so their share does not drift.desnz_local_energy_facts.json(authority meter counts and four ONS household totals, with the OGL v3.0 attribution for DESNZ and ONS).BUS01a journeys by English region (C8). Nine national rows, family
dft_bus_journeys: London and the eight other English regions, FY2024-25. The frame carries NTS trips, not boardings, so the resolver's new household measuresbus_in_london_boardingsandother_local_bus_boardingsprice each household's trips at the boardings per trip the stage priced each series at; a persisted column of either name is refused. London's row counts every resident's bus-in-London trips and has no residence filter. The selectors take BUS01a only (dimensions: []; BUS01c's concessionary rows carry a journey category). They pin no year; instead each row'suprating_index,dft.bus01.stage_pricing_year, holds it at the fiscal year the stage prices boardings per trip from and refuses any other year. The stage's bus receipt sets each English region's share of the eight regions' other local bus trips, at prior weights, beside its share of BUS01a's journeys.Loss-share floors (C9).
UK_LOCAL_FAMILY_LOSS_SHARE_FLOORS: a check-only minimum share of the dense solve's loss weight fordomestic_energy(2.5%) anddft_bus_journeys(1.25%), against about 2.8% and 1.5% under the doctrine rule (one of nine local-authority families; one of seventeen nation and region families). It runs after the row-metadata rule builds the weights and is recorded in the problem's bindings; the weights do not change. A share equal to its floor meets it.Fixes and guards found in local lanes. The kWh read-back decodes the engine's region enum, and it skips households that pay nothing: a defensive guard for a region no QEP price covers (policyengine-uk's
UNKNOWN; the frame has none). The bus parity reads engine parameters at the year, as the resolver's other reads do.Vendoring and regeneration on
735820c.desnz_local_energy_facts.json, declared inuk/country_package.json: 701 rows. They are the domestic electricity meter counts of 350 authorities, the gas meter counts of 347 (the Isles of Scilly, Orkney and Shetland have no gas rows), and four ONS household totals (England, Wales, Scotland and the UK). The licence is in its header.desnz_domestic_energy_facts.jsonandofgem_price_cap_facts.jsontake the C1 purpose texts; no value moves. Thelcfs_consumptionstage pins the first, so the H2 spine fixture's stage contract hash moves.ledger_only(national 691 to 700, local 4,991 to 6,031); nocalibration_driftorfixture_onlycount moves.mainafter UK local surface: band domain, signed small-cell rules, renewals, support flag (#1278) #1283 keptmain's copies in the C1 and C2 commits.Review round 1 (Vahid, 2026-10-15)
uprating_index(dft.bus01.stage_pricing_year) holds each row at the stage's pricing year and refuses another, as the energy rows refuse a DESNZ year other than their level's.england_outside_london_regions(prior-weight trip shares beside BUS01a's journey shares, and London residents' share of the other local trips). Per-region factors need NTS0318 (trips and stages by mode and region of residence), which the feed does not carry yet; it is item 6 of UK local energy, area classification and Welsh bus facts: DESNZ Northern Ireland and sub-local consumption, rural-urban lookups, BUS04 country rows (PolicyEngine/microcosm#1207) chronicle#356.desnz_local_energy_facts.jsondeclares OGL v3.0 for DESNZ and ONS.Review round 2 (Vahid, 2026-10-15)
git rebase --exec; the tree did not change. After the rebase they are30681db03,0eb83e8c9and1cd20e248.--maxfail.Rulings (María)
matched_period): both sides are 2024 by design, and Energy Trends 2025 was weighed as an index and not taken, so the weights do not absorb the change in use per household;control_rescaled);matched_period; journeys have no published index);domestic_energyfences;Verification (local, at
e2e38751a)The full runs were at
2ec0c12df, which differs from the head only by the scorer pin below; at the head, the scorer's tests and the dataset-size tool's tests pass.Engine-free, CI's own file list without
--maxfail(581 files, 18,819 tests): the four artifact-bound tests pass. Six tests failed. Five come from this machine's environment:test_spawned_workers_score_identically_to_sequential_cli: its worker flag needs Python 3.14.7, and this machine has 3.14.6;test_live_latest_pointer_resolves_to_a_coherent_certified_release[uk-2025-national]: it reads the live published release pointer;tools/orrery-contracthas nonode_moduleshere, and CI installs them;test_engine_is_reported_unavailable_without_the_uk_extra: this environment has the UK extra installed.The sixth was the local candidate scorer's count, which UK local surface, consumption and high-value homes: remaining items (consolidation) #1278 ties to the committed active references. The last commit moves it to 25,309.
Engine UK lane (51 files, 209 tests, policyengine-uk 2.130.1): green.
tools/ci_test_plan.py verify,tools/graph_acceptance_burndown.py --verify,ruff check .andruff format --checkon every touched Python file: clean.Disclosure: the new commit holds publishers' rows (DESNZ meter counts, ONS household totals), reference and cell counts, hashes and pins. It holds no microdata quantity.
Not run here: the integration smoke (CI runs it).
Disclosure control
The committed values are publishers' (DESNZ, DfT, ONS) or declared rules. No per-authority model estimate, error or support count is committed or posted. Build receipts will report, per family, counts and shares of areas within 10% and 25%, support in bands, and no maxima, minima or single areas.
Next
Two spines (control at
main, candidate here), two dense arms at K=15, and R1 on the candidate spine, one heavy job at a time; receipts inexperiments/1207-local-energy-bus-receipts.md; and the exclusion figures restated from R1. The PR was retargeted tomainon 2026-10-15 after #1270 merged and rebased ontomain(579296653) so that CI runs. It was rebased again the same day after #1283 merged (8a7f79a82).🤖 Generated with Claude Code