Model/backend/documents_parser/tests
Khalim Conn-Kowlessar eda6f449e4 Slice S0380.143: RdSAP 10 §10.11 Table 29 — derive cylinder insulation defaults from construction age band when §15.1 lodges "No Access"
RdSAP 10 Specification §10.11 Table 29 page 56 — "Heating and hot
water parameters" → row "Hot water cylinder insulation if not
accessible":

  Age band of main property A to F: 12 mm loose jacket
  Age band of main property G, H:   25 mm foam
  Age band of main property I to M: 38 mm foam

Pre-slice the Elmhurst mapper passed through cylinder_insulation_type
and cylinder_insulation_thickness_mm as None whenever §15.1 lodged
"Cylinder Size: No Access" (the inaccessible-cylinder lodging form)
because the Summary doesn't carry the measured insulation label /
thickness on inaccessible cylinders. The cascade's §4 (56)m water
storage loss override at `_cylinder_storage_loss_override` then
returned None (gates on `insulation_type == _CYLINDER_INSULATION_
TYPE_FACTORY` + thickness lodged), so the worksheet's (56)m sum was
dropped entirely from (62)m.

Cert pcdb 1 (corpus 001431, Potterton KOA PCDB 716 + 110 L cylinder
+ §15.1 "No Access" + age G 1983-1990) exposes the gap: worksheet
(56)m monthly ≈ 59.06 kWh ((51) factor 0.024 from Note 1 formula
L = 0.005 + 0.55 / (t + 4) at t = 25 mm) × (52) volume factor 1.0294
× (53) Table 2b temperature factor 0.702 — annual sum ≈ 695 kWh,
missing from the pre-slice cascade entirely.

New helper
`_resolve_elmhurst_inaccessible_cylinder_insulation(age_band)` in
`datatypes/epc/domain/mapper.py` returns the
`(insulation_type_code, thickness_mm)` tuple for age G/H (factory
foam, 25 mm) and I/J/K/L/M (factory foam, 38 mm). Age bands A-F
(loose jacket, 12 mm) raise `UnmappedElmhurstLabel` — no current
Elmhurst corpus member is age A-F with §15.1 = "No Access", and the
loose-jacket SAP10 cylinder_insulation_type enum value is not yet
plumbed into the calculator's `cylinder_storage_loss_factor_table_2`
dispatch (only factory=1 is exercised). The strict-raise mirrors the
[[reference-unmapped-sap-code]] pattern so a future fixture forces
the loose-jacket extension explicitly.

`_map_elmhurst_sap_heating` calls the resolver before constructing
SapHeating; the accessible-cylinder path stays unchanged
(measured label + thickness from §15.1).

Corpus impact:

- pcdb 1 (only "No Access" cylinder variant in the corpus):
  SAP +2.86 → +0.57; cost -£63.22 → -£12.55; CO2 -328.74 → -51.19;
  PE -1257.97 → -109.46. The remaining residual is a ~1.3% cascade-
  side undercount on space-heating demand (cascade SH 7900 kWh vs
  worksheet (98c) 8004 kWh) plus minor pumps/fans rate noise — well
  within the spec-cascade floor.

Combined with S0380.141 (§9.4.11 -5pp interlock on SH + Eq D1) and
S0380.142 (§4 lines 7700/7702 cylinder-presence gates), the
pre-slice pcdb 1 residual SAP +6.95 closes to +0.57 (-92% magnitude),
cost -£157.61 to -£12.55, PE -3135.30 to -109.46.

Extended handover suite: 886 pass, 0 fail.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 21:03:10 +00:00
..
fixtures Slice S0380.52: cert 000565 Elmhurst-only mapper-driven cascade pin + glazing-label coverage 2026-05-28 22:03:52 +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 Slice S0380.17: map Elmhurst §11 glazing-type labels to SAP10 codes 2026-05-27 23:05:52 +00:00
test_elmhurst_extractor.py extract window frame details from elmhurst site notes 🟥 2026-04-27 15:50:25 +00:00
test_end_to_end.py P6.1 follow-on: unbox BuildingPartIdentifier at backend boundaries 2026-05-20 09:58:23 +00:00
test_extractor.py Handle wall thickness "Unmeasurable" 🟩 2026-04-30 16:41:16 +00:00
test_heating_systems_corpus.py Slice S0380.143: RdSAP 10 §10.11 Table 29 — derive cylinder insulation defaults from construction age band when §15.1 lodges "No Access" 2026-05-31 21:03:10 +00:00
test_pdf.py rename example site notes to PasHub_ and add Elmhurst example 2026-04-24 13:01:51 +00:00
test_summary_pdf_mapper_chain.py Slice S0380.143: RdSAP 10 §10.11 Table 29 — derive cylinder insulation defaults from construction age band when §15.1 lodges "No Access" 2026-05-31 21:03:10 +00:00