Model/backend/documents_parser/tests
Khalim Conn-Kowlessar bd84a2f190 Close the #1639 residual PasHub LRHA WAVE 3 mapper blocks 🟩
Clears the three non-table-add blocks tracked in #1639 plus a latent age-band
bug they surfaced. LRHA WAVE 3 cohort: 77 → 103 of 104 computing.

Block A (exact cylinder volume): a measured cylinder lodges its litres on a
separate "Exact cylinder volume:" line; parse it in the extractor, carry it on
WaterHeating.cylinder_volume_measured_l, route the "Exact cylinder volume" band
to SAP cylinder-size code 6, and thread the litres into SapHeating (the
calculator reads them only when the code is 6). Verified end-to-end on the real
166 L fixture.

Block B (Controls line-wrap): PasHub wraps a long "Controls:" value across two
PDF lines and _get_in read only the first, truncating the label so the mapper
missed its Table 4e code. Re-join the continuation when the value ends on a
conjunction/comma (grammatically incomplete) so "…room thermostat and TRVs"
matches the existing code 2314. Scoped to Controls: — the shared _get_in is
unchanged; a wider truncation audit is tracked separately.

Age-band normalisation: the heat_network_age_band '2007 - 2011' block was one
facet of a broader bug — PasHub lodges the construction age band in mixed
templates ("K: …" prefixed, tight "1991-1995", space-padded "2007 - 2011") and
only the letter form was normalised, so bare year ranges were SILENTLY
MIS-RATED by the age-band-keyed U-value/DLF cascades. Normalise every template
to its RdSAP letter in _extract_age_band: unblocks the heat-network dwellings
AND corrects ~30 already-computing fixtures (within-0.5 42.9% → 49.5%,
MAE 3.05 → 1.02). Sibling Guinness cohort unchanged (82.9% / 0.36).

Block C (gable 'None') was already resolved on main — no change needed.

Fixture 461178278096 lodges no main heating at all (MissingMainFuelType);
tolerated as a known gap in the harness and ticketed (#1680) for the modelling
decision. LRHA ratchets re-baselined to the corrected cohort (0.49 / 1.05).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 12:43:19 +00:00
..
fixtures Re-pin Wythenshawe accuracy harness to the DB oracle (#1649) 2026-07-19 11:40:51 +00:00
__init__.py Map to RdSapSiteNotes from site notes JSON 🟥 2026-04-16 13:54:03 +00:00
test_elmhurst_end_to_end.py rename mains_gas to gas_connection_available 2026-07-01 10:50:58 +00:00
test_elmhurst_extractor.py fix(extractor): drop windows-table header remnant from first window glazing type 2026-06-02 22:54:49 +00:00
test_end_to_end.py PasHub SAP accuracy: infiltration inputs + immersion DHW + lights/lobby/heat-network (#1615) 2026-07-16 00:30:55 +01:00
test_extractor.py Close the #1639 residual PasHub LRHA WAVE 3 mapper blocks 🟩 2026-07-24 12:43:19 +00:00
test_heating_systems_corpus.py Merge remote-tracking branch 'origin/main' into feature/per-cert-mapper-validation 2026-06-13 22:20:15 +00:00
test_pashub_sap_accuracy.py PasHub SAP accuracy: refresh 5 Paxton fixture to the current V5 (MEV) re-survey 🟩 2026-07-16 00:52:33 +00:00
test_pashub_sap_accuracy_lrha_wave3.py Close the #1639 residual PasHub LRHA WAVE 3 mapper blocks 🟩 2026-07-24 12:43:19 +00:00
test_pashub_sap_accuracy_wythenshawe.py Record Elmhurst-validation provenance finding (#1649) 2026-07-20 09:16:54 +00:00
test_pdf.py rename example site notes to PasHub_ and add Elmhurst example 2026-04-24 13:01:51 +00:00
test_room_heater_worksheet_001431.py S0380.239: system-build walls take masonry structural infiltration (0.35) 2026-06-05 19:00:02 +00:00
test_summary_pdf_mapper_chain.py fix(roof): bill at-rafters insulation on RdSAP 10 Table 16/18 column (2) 2026-06-16 04:42:44 +00:00