Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
38e07a9
Carry Vahid's #904 review notes: refuse a foreign vendored feed under…
juaristi22 Sep 14, 2026
8f1bf7f
Add a positive-regime QRF draw from caller uniforms and a fitted view…
juaristi22 Sep 14, 2026
4cfd13a
Declare donor uprating to FY2024-25 on the LCFS and ETB stages and th…
juaristi22 Sep 14, 2026
b1c6a77
Condition the LCFS consumption QRF on the vehicle count and take the …
juaristi22 Sep 14, 2026
51b43d0
Draw local-bus use incidence from NTS and rake bus fares and support …
juaristi22 Sep 14, 2026
7080b58
Rake domestic energy in kWh to vendored NEED means and price it at th…
juaristi22 Sep 14, 2026
92adc6d
Skip and receipt a vendored-fact rake cell whose regions are absent f…
juaristi22 Sep 14, 2026
999a489
Regenerate the H2 parity fixture and re-pin the UK spec and gate-batt…
juaristi22 Sep 14, 2026
75de422
Record a road-fuel litres audit in the LCFS stage evidence (#890 PR-S…
juaristi22 Sep 14, 2026
66a7492
Impose the bus-use incidence only where a fare cell levels the amount…
juaristi22 Sep 14, 2026
3096b0e
Receipts Parts K-O for #890 PR-S: declarations, spine-s twin, twin di…
juaristi22 Sep 14, 2026
30d2dc0
Regenerate the release-input coverage manifest after the incidence-sc…
juaristi22 Sep 14, 2026
c655e87
Rake gas kWh over gas-connected households, declare the NTS share sco…
juaristi22 Sep 15, 2026
ac1b94c
Regenerate the H2 fixture and coverage manifest and re-pin the UK spe…
juaristi22 Sep 15, 2026
73ff09d
Say in the stage notes which uprating factors the rakes level away (#…
juaristi22 Sep 15, 2026
95893e5
Receipts Part P: round 2 on spine-s2 after Vahid's review of #927
juaristi22 Sep 15, 2026
81e6fcc
Check NEED where the rake acts: a stage-time energy_rake gate replace…
juaristi22 Sep 15, 2026
a4d6186
Pin the energy_rake allowances at the spine-s3 baseline and re-pin th…
juaristi22 Sep 15, 2026
9dd8457
Receipts Part Q: round 3 on spine-s3 with the stage-time NEED gate (#…
juaristi22 Sep 15, 2026
713b506
Clip bus fares to donor support before the fare rake (#890, María's r…
juaristi22 Sep 15, 2026
7f10ee2
Regenerate the H2 parity fixture after bus fares rejoined the support…
juaristi22 Sep 15, 2026
590c281
Receipts Part R: the Wales fare fence, the rake-then-bind ruling and …
juaristi22 Sep 15, 2026
2830fba
Make the energy_rake gate a fact check with one declared residual tol…
juaristi22 Sep 15, 2026
a58d91b
Regenerate the H2 parity fixture after the crosswalk provenance edit …
juaristi22 Sep 15, 2026
88b0845
Receipts: the domestic energy gap decomposed and chronicle#270 filed …
juaristi22 Sep 15, 2026
33bcd67
Re-pin the loader golden vector and the US pool spec binding after re…
juaristi22 Sep 16, 2026
85ae2b2
Re-pin the UK Chronicle feed to ec20085 and vendor the domestic energ…
juaristi22 Sep 16, 2026
b7d4dd0
Price domestic energy at the QEP averages paid, impose the published …
juaristi22 Sep 16, 2026
5e0e4ff
Fit the gas connection to household weight, declare the 2.5 % residua…
juaristi22 Sep 16, 2026
4adc9b8
Receipts Part T: spine-s5, the published-source residual and round 5 …
juaristi22 Sep 16, 2026
34a5c23
Let a synthetic smoke build record, not block on, population fact che…
juaristi22 Sep 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/890-bus-incidence-and-fact-rakes.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add two UK stage operations that bind imputed bus columns to vendored publisher facts (microcosm#890 I and D). `assign_bus_use_incidence` on `lcfs_consumption` decides who uses local buses take-up style: each person takes a frequency-of-use band by an identity-keyed draw from the vendored DfT NTS0313 shares (NTS0621 for people aged 60 and over; the under-60 shares are derived from the two published series and the frame's design-weighted 60-plus share, since DfT publishes no other breakdown), bands are joined by declared labels because the two tables word them differently, a household is a user when any member rides at least once a year, user households the QRF chain drew at zero take the bus step's positive-regime draw at an identity-keyed quantile (`FittedRegimeGatedQRF.predict_positive_from_uniforms` on the chain step's fitted view) and non-users take zero; the chain keeps conditioning on the raw prior draw. `rake_to_vendored_facts` scales imputed columns so that each declared cell's design-weighted total equals one published FY2024-25 value read from a vendored resource: on `lcfs_consumption`, user households' bus fares to DfT BUS05ai receipts for London and England outside London spread across design-weighted person income quintiles in proportion to NTS0705a trips per person, Scottish Transport Statistics passenger revenue for Scotland and Translink passenger receipts for Northern Ireland (Wales publishes no receipts and is untouched); on `etb_services`, bus support to DfT BUS05bi net support for the two England areas, Scottish Transport Statistics all government support, the StatsWales local-authority gross expenditure on concessionary fares plus support to operators, and the NITHC accounts' PSO plus concessionary compensation bound jointly on bus plus rail support for Northern Ireland (`joint_columns`). Raked columns are exempt from the support clip; both stages record incidence and rake receipts (shares, quintile edges, cell targets, before and after totals, factors) as evidence. Both stages declare the vendored resources they read as artifacts and refuse a cell naming any other.
1 change: 1 addition & 0 deletions changelog.d/890-chronicle-repin-ec20085.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Re-pin the UK Chronicle feed to `ec20085` (chronicle #269/#270 via PR #271): the DESNZ domestic energy facts (Energy Trends domestic consumption, subnational consumption and meter counts, Quarterly Energy Prices average prices paid, NEED 2024), the ONS Consumer Trends 04.5 sub-classes and the census central-heating tables join the feed (275,698 rows); the national surface gains the 04.5.1 electricity and 04.5.2 gas targets and signs out the 04.5 total (614 active); the local surface is unchanged.
1 change: 1 addition & 0 deletions changelog.d/890-domestic-energy-published-level.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rake the UK LCFS stage's domestic energy in kWh to the NEED shape at the DESNZ level and price it at the published average prices paid (microcosm#890 F, chronicle#270). Both NEED rakes (the donor-side income margin and the post-imputation income, tenure, property-type and region margins) take their mean-kWh shape from the vendored `need_energy_facts.json` for the declared consumption year (`margins_period_value` 2024), England and Wales by all four margins and Scotland by income, tenure and property type with its all-dwellings mean as the region margin; Northern Ireland stays untouched by the shape. The `price_domestic_energy` operation (replacing `price_energy_at_cap`) converts spend to kWh and back at each household's QEP price region through `ofgem_region_crosswalk.json` (dominant area; Northern Ireland gas at the UK average, as QEP publishes no Northern Ireland gas row) using the vendored DESNZ Quarterly Energy Prices FY2024-25 average variable unit cost and fixed cost across payment methods, standard metering, including VAT (`qep_energy_prices.json`; UK electricity 24.81 p/kWh plus GBP 209.39 a year, gas 6.23 p/kWh plus GBP 113.13), with a gas fixed cost only for connected households. The gas connection is imposed on the recipient frame at each region's published share, the vendored DESNZ subnational gas meters over electricity meters for 2024 (`desnz_domestic_energy_facts.json`; Great Britain 84 %), by disconnecting the households with the smallest drawn gas first (Northern Ireland has no subnational row and keeps the positive-gas rule); after the four-margin rake one factor per fuel levels the design-weighted kWh totals to the DESNZ Energy Trends domestic consumption at actual temperature over the four FY2024-25 quarters (93.0 TWh electricity, 260.1 TWh gas). The `energy_rake` stage gate recomputes every NEED mean, the DESNZ level, the level factor and the connection shares from the vendored rows and holds the IPF residual to the declared 2 % tolerance. The Ofgem cap matrix stays vendored as the regional maximum that a lockstep test compares to the QEP averages; the retired `need_energy_targets.json` carried hand-copied NEED kWh priced at an unbacked Q2-2026 unit rate with no standing charge. Translations the publisher forces are declared and receipted: England and Wales terraced houses take the mid-terrace row (no combined row is published), mobile homes the all-dwellings mean. The support gates exempt the raked bus columns, whose donor bounds are no longer committed; the E6 support bounds and the release-input coverage manifest are regenerated.
1 change: 1 addition & 0 deletions changelog.d/890-donor-uprating.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Declare the uprating of the UK imputation donors to the FRS 2024-25 base year as a manifest operation, `uprate_donor_columns`, on `lcfs_consumption` (the 2023-24 diary) and `etb_services` (the FYE-2024 ETB), replacing the stale "identity at this vintage" note. Each column names its basis: `engine_parameter` reads the ratio of a PolicyEngine UK index at the two January-first instants (the OBR CPI for consumption columns and bus fares, average earnings, mixed income and the private-pension index for the income predictors, lockstepped with what the engine applies afterwards); `vendored_litre_proxy` moves petrol and diesel by the published outturn (DESNZ pump-price ratio times HMRC litres per head from the vendored Chronicle facts) and records the engine's own litre-proxy index ratio beside it as an audit, since the two disagree; `vendored_ratio` moves rail and bus support by ORR 7270 and DfT BUS05bi England net support at the two fiscal starts. The energy columns are exempt (the NEED rake and Ofgem pricing set their level). `uk_runtime/donor_uprating.py` resolves the factors and returns a receipt the stages record as `donor_uprating` evidence; `ledger_fact_vendoring.vendored_rows` is the one fail-closed reader of vendored rows (pin check, fiscal-start and dimension selection) and the BUS0415 alignment now reads through it. The ETB `compute_ratio` denominator moves to `rail_fare_index_2024` (1.165) so `rail_usage` is stated in the uprated donor's own year; the `cpi` block of `lcfs_consumption_anchors.json` retires. Four operation kinds (`uprate_donor_columns`, `assign_bus_use_incidence`, `rake_to_vendored_facts`, `price_energy_at_cap`) join the manifest vocabulary and schema for the rest of microcosm#890 PR-S.
1 change: 1 addition & 0 deletions changelog.d/890-lcfs-vehicle-count-predictor.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retire the UK LCFS stage's WAS-to-LCFS has-fuel bridge (microcosm#890 A and E2). The consumption QRF now conditions on the vehicle count on both sides: LCFS `a124` on the donor and the `was_wealth` draw of WAS `vcarnr8` on the recipient (the FRS carries no vehicle variable), both rounded and clipped to the declared 0-5, replacing the bridged 0/1 `has_fuel_consumption` predictor whose donor side was an uninformative QRF prediction of a random flag. The recipient fuel flag stays `num_vehicles > 0` times an identity-keyed draw, but its rate is now one minus the zero-emission share of the vendored DfT VEH1103 licensed-car stock (2024, Great Britain, battery-electric and fuel-cell cars; plug-in hybrids count as fuel buyers), declared on the stage's `assign_binary_from_rate` operation in place of the hand-copied `nts_ice_share` anchor. The stage records a `has_fuel_consumption` evidence block (the rate receipt with source record ids, design-weighted vehicle and positive-fuel shares on the donor, vehicle and flagged shares on the recipient). `lcfs_consumption_anchors.json` and the `was_bridge_donor` artifact are removed, `bridge_donor_column_via_qrf` leaves the manifest vocabulary, `--was-tab` is no longer required to build the LCFS stage, and the graph's `lcfs_consumption` node reads only the two LCFS sources. The LCFS and ETB stages now declare the vendored resources their operations read as `public_aggregate_reference` artifacts, and the vendor register lists both stage modules as present consumers (each module refuses a declaration naming a resource it does not consume).
2 changes: 2 additions & 0 deletions changelog.d/890-qrf-positive-draw.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add `FittedRegimeGatedQRF.predict_positive_from_uniforms`, a stateless draw of every target conditional on it being positive: the sign gate is bypassed and each row takes the positive-magnitude forest's value at its caller-supplied quantile, so a separate take-up style incidence mechanism can decide who has a target while the fitted model supplies how much (microcosm#890's bus-use incidence). Regimes without a positive forest and released models are refused by name; no model RNG is consumed. `QRFChainStepResult` gains `fitted`, a one-target `FittedRegimeGatedQRF` view of the step's model (predictors = the chained prefix) with its own reproducible draw stream, so a chained stage can re-draw one target from identity-keyed uniforms without refitting. The `fit.qrf` parity pins are re-pinned for the changed implementation hash; `direct.csv` is byte-identical.
Because the seed protocol attests `microcosm.fit.qrf`, the change moves the seed-protocol and seed-map digests (`spec_engine/inventory_coverage.py`, the regenerated `docs/evidence/spec-engine/us-f0-coverage.json`) and every country's `spec_sha256` (AM, BE and UK bundle pins, the minimal-spec loader golden vector and the pool-tool spec binding), re-pinned in the same change as the amendment-20 lane did.
16 changes: 8 additions & 8 deletions docs/evidence/spec-engine/us-f0-coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -1656,13 +1656,13 @@
"compiler_ir.node_slices"
],
"expected": {
"map_sha256": "aebfd2679cea76302c403766c79fdb8762404f73f3070aa749739a0c7bf304fd",
"protocol_sha256": "1c969722646900ddd8e06ed56d01c615be8f63aad2629f42ab1199403c6f1881"
"map_sha256": "86cecb19281446d2b505fb975c822c60a604e18f44baded5dc9d62d508a8197e",
"protocol_sha256": "55d6b907dd44613a5498dd7156f1ce9e78758835255bc7c336b4c327bb40e9bf"
},
"failures": [],
"observed": {
"map_sha256": "aebfd2679cea76302c403766c79fdb8762404f73f3070aa749739a0c7bf304fd",
"protocol_sha256": "1c969722646900ddd8e06ed56d01c615be8f63aad2629f42ab1199403c6f1881"
"map_sha256": "86cecb19281446d2b505fb975c822c60a604e18f44baded5dc9d62d508a8197e",
"protocol_sha256": "55d6b907dd44613a5498dd7156f1ce9e78758835255bc7c336b4c327bb40e9bf"
},
"status": "covered"
},
Expand All @@ -1677,7 +1677,7 @@
"compiler_ir.seed_stream_map"
],
"expected": {
"implementation_sha256": "1c969722646900ddd8e06ed56d01c615be8f63aad2629f42ab1199403c6f1881",
"implementation_sha256": "55d6b907dd44613a5498dd7156f1ce9e78758835255bc7c336b4c327bb40e9bf",
"protocol": "legacy-v1",
"streams": [
"build_model",
Expand All @@ -1698,7 +1698,7 @@
},
"failures": [],
"observed": {
"implementation_sha256": "1c969722646900ddd8e06ed56d01c615be8f63aad2629f42ab1199403c6f1881",
"implementation_sha256": "55d6b907dd44613a5498dd7156f1ce9e78758835255bc7c336b4c327bb40e9bf",
"protocol": "legacy-v1",
"streams": [
"build_model",
Expand Down Expand Up @@ -2599,7 +2599,7 @@
"country": "us",
"schema_id": "country_spec",
"schema_version": 1,
"spec_sha256": "c2c693988cb884af7f56ec6b37f62384fe0dcec3c26e257e49c0b30daf47c187"
"spec_sha256": "e058159f89a01b6541e98ee57ffb0169eeff8ed2ea4fb1c664b3f3fb0c60a675"
}
},
"report_schema_version": 3,
Expand All @@ -2609,7 +2609,7 @@
"country": "us",
"schema_id": "country_spec",
"schema_version": 1,
"spec_sha256": "c2c693988cb884af7f56ec6b37f62384fe0dcec3c26e257e49c0b30daf47c187"
"spec_sha256": "e058159f89a01b6541e98ee57ffb0169eeff8ed2ea4fb1c664b3f3fb0c60a675"
},
"status": "pass"
}
2 changes: 1 addition & 1 deletion docs/uk-chronicle-feed-repin.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ Universal Credit packages); the `df35af7` re-pin (#929, chronicle #264 and #267)
moved the rows to `chronicle.consumer_fact.v3`, which adds the publisher's
`geography.name` to every fact (the label the hierarchy needs for constituencies
and local authorities, microcosm#920) and brought the council taxbase packages
for England, Wales and Scotland (266,390 rows).
for England, Wales and Scotland (266,390 rows); the `ec20085` re-pin (#890 PR-S, chronicle #269/#270 via PR #271) brought the domestic energy facts the energy stage levels and prices against (DESNZ Energy Trends domestic consumption, subnational consumption and meter counts, QEP average prices paid, NEED 2024, ONS 04.5 sub-classes) and the census central-heating tables (275,698 rows).
Loading
Loading