Model/tests
Jun-te Kim 5b4a1b4966 Classify PCDB-index gas boilers with no SAP code for heating recs
Gov-API certs that lodge a gas boiler as main_heating_category=2 + a PCDB
main_heating_index_number but omit sap_main_heating_code were carried with
a null code, so the heating generators (which gated on sap_main_heating_code
alone) never evaluated them for a boiler upgrade or a system tune-up — they
silently got nothing (£0 works, plateau at D). The SAP calculator already
handles this shape (cert_to_inputs._is_wet_boiler_main), so the calculator
modelled these as wet boilers while the recommenders ignored them.

Mirror the calculator's classification in the generator:
- _is_wet_boiler / _is_electric_boiler fall back, when no SAP code is
  lodged, to a PCDB Table 105 boiler index or main_heating_category in
  {1,2} (heat pumps excluded); electric boilers stay excluded by the code
  range when lodged, else by an electricity main fuel.
- _already_condensing reads the boiler's declared PCDB winter efficiency
  when there is no Table 4b code, so a modern condensing boiler lodged this
  way still isn't offered a pointless like-for-like swap (gets a tune-up).

Verified read-only on portfolio 814 / scenario 1271: pids 742304, 742306,
742322, 742325, 742336 now get a gas_boiler_upgrade (two cross D->C on the
boiler alone) where they had £0 works; predicted properties whose heating
donor is a PCDB-shape boiler (e.g. 742095/742102/742105) also recover a
tune-up. Fixes the A#2 slice of #1388 (and unblocks 742302/742367).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 14:52:47 +00:00
..
applications fix broken unit tests 2026-06-29 15:40:22 +00:00
datatypes Normalize RdSAP insulated_door_u_value on the 20.0.0 + 21.0.0 paths 2026-07-01 14:48:25 +00:00
domain Classify PCDB-index gas boilers with no SAP code for heating recs 2026-07-01 14:52:47 +00:00
e2e Prove prediction resolves landlord overrides to a real cohort match end-to-end 🟩 2026-06-16 15:20:49 +00:00
fixtures/epc_prediction feat(epc-prediction): geo-proximity weighting, per-component (#1227) 2026-06-15 14:58:42 +00:00
harness Fix test asserting None for cfl_fixed_lighting_bulbs_count on 21.0.1 cert 🟩 2026-06-24 13:31:02 +00:00
infrastructure test(accuracy): ratchet after HP water-heating 100% floor 🟪 2026-06-29 15:40:53 +00:00
lambdas new application to trigger e2e for a single property and scenario 2026-06-22 12:54:53 +00:00
magic_plan Mapper reads new 'Total Trickle Vent Effective Area' label 🟥 2026-06-30 12:56:54 +00:00
orchestration Fix integration test: LPG solid-brick dwelling now correctly offered HHRSH (#1378) 2026-07-01 11:14:36 +00:00
repositories Merge pull request #1373 from Hestia-Homes/fix/1361-class-b-predicted-null-lodged 2026-07-01 08:35:58 +01:00
scripts Merge pull request #1395 from Hestia-Homes/fix/neighbour-divergence-fuel-cohort 2026-07-01 15:49:38 +01:00
utilities task_handler passes orchestrator and task_id to wrapped function when flag is true 🟥 2026-06-24 10:47:05 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
conftest.py Audit generator populates XLSX, uploads to S3, and records UploadedFile row 🟪 2026-06-09 12:05:55 +00:00
test_lambda_packaging.py better smoke tests to check what is failign 2026-06-17 11:53:33 +00:00