Model/backend/documents_parser
Khalim Conn-Kowlessar 1491899412 Slice S0380.166: Elmhurst "Bulk LPG" label → API code 27 (mapper unblock)
Adds the single missing dict entry that lets cert `pcdb 3` cascade:

  `_ELMHURST_MAIN_FUEL_TO_SAP10["Bulk LPG"] = 27`

API code 27 = "LPG (not community)" — routes via:
  - `API_FUEL_TO_TABLE_12[27] = 2` (SAP 10.2 Table 12 bulk LPG: £62
    standing, 6.74 p/kWh, 0.241 CO2, 1.141 PE; spec PDF p.189)
  - `API_FUEL_TO_TABLE_32[27] = 2` (RdSAP 10 Table 32 bulk LPG: £70
    standing, 7.60 p/kWh; spec PDF p.95)

Pre-slice the mapper produced `main_fuel_type=''` for any Elmhurst
fixture lodging "Bulk LPG" as fuel type, so the cascade strict-raised
`MissingMainFuelType` per S0380.132. The legacy `"LPG bulk"` label
(different word order) maps to API code 6 = wood logs — a pre-existing
oddity unexercised by any live fixture; left untouched per
[[feedback-bigger-slices-for-uniform-work]] (different label, different
fix).

Cascade closure `pcdb 3` (Vokera Linea LPG combi 83.10 %, PCDB index
8262, no cylinder, 18-hour tariff) — EXACT on first try across all 4
metrics:

  cascade  SAP_c = 49.2953    worksheet = 49.2953    Δ = +0.0000
  cascade  cost  = £1165.81   worksheet = £1165.81   Δ = +0.0000
  cascade  CO2   = 3367.95    worksheet = 3367.95    Δ = +0.0000
  cascade  PE    = 13936.60   worksheet = 13936.60   Δ = +0.0000

Closure on first try because the cascade was already fully wired for
the gas/oil/LPG path; the Elmhurst label was the only gap. Moves
pcdb 3 out of `_BLOCKED_BY_MISSING_MAIN_FUEL_TYPE` into `_EXPECTATIONS`
at ±0.0000.

Blocked tier now: 15 variants (community heating × 5, electric storage
11-14, no system, oil 2-6).

Tests:
  - test_elmhurst_main_fuel_to_sap10_maps_bulk_lpg_to_api_code_27
  - corpus pin: pcdb 3 expected residuals = ±0.0000 on all 4 metrics

912 pass / 0 fail; pyright net-zero 43 → 43.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 15:40:25 +00:00
..
handler address JTK review comments 2026-04-20 15:11:17 +00:00
tests Slice S0380.166: Elmhurst "Bulk LPG" label → API code 27 (mapper unblock) 2026-06-04 15:40:25 +00:00
__init__.py Map to RdSapSiteNotes from site notes JSON 🟥 2026-04-16 13:54:03 +00:00
db_writer.py include updating epc_property_data to pashub to ara workflow 2026-04-29 09:55:14 +00:00
elmhurst_extractor.py Slice S0380.140: §4 cylinder storage loss — extractor picks up §16 thermostat lodging + Table 2b note b restricts ×0.9 to boiler/warm-air/HP systems 2026-05-31 19:03:58 +00:00
extractor.py Handle wall thickness "Unmeasurable" 🟩 2026-04-30 16:41:16 +00:00
local_runner.py update local runner to work for elmhurst 2026-04-24 14:01:36 +00:00
parser.py load ecmk site notes to db 2026-04-29 11:20:47 +00:00
pdf.py update local runner to work for elmhurst 2026-04-24 14:01:36 +00:00