Model/tests
Jun-te Kim 3282cef04e Fix RdSAP-17.0 mapper dropping lodged secondary heating
The `from_rdsap_schema_17_0` path hardcoded `sap_heating.secondary_heating_type`
and `secondary_fuel_type` to None, unlike every other API path (19.0/20.0/…),
which read them from `schema.sap_heating`. The gov EPC API *does* populate a
secondary heating SAP code for a genuine fixed secondary (e.g. 691 "electric
room heaters", 694), so the hardcode silently discarded it.

Because `recommend_secondary_heating_removal` gates purely on
`sap_heating.secondary_heating_type`, any 17.0 cert carrying a fixed secondary
would never get its removal recommendation. Surfaced while auditing portfolio
814's recommendations; 814 has 17.0 certs but none with a fixed secondary, so
the defect was latent there — this restores parity with the other paths so it
cannot bite.

Mirrors the 19.0 path exactly (secondary_fuel_type via `_api_secondary_fuel_type`).
Adds a regression guard that injects a fixed secondary into a real 17.0 cert and
asserts the code survives the mapping.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 10:41:52 +00:00
..
applications fix broken unit tests 2026-06-29 15:40:22 +00:00
datatypes Fix RdSAP-17.0 mapper dropping lodged secondary heating 2026-07-01 10:41:52 +00:00
domain Merge pull request #1370 from Hestia-Homes/feature/ventilation-audit-changes 2026-07-01 09:20:54 +01: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 Persist no Lodged Performance for a predicted Property 🟩 2026-06-30 22:10:57 +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 branch 'main' into audit/bad-lodged-source-data 2026-07-01 07:49:21 +00: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