diff --git a/tests/domain/sap10_calculator/test_real_cert_sap_accuracy.py b/tests/domain/sap10_calculator/test_real_cert_sap_accuracy.py index e1877c598..d19acf630 100644 --- a/tests/domain/sap10_calculator/test_real_cert_sap_accuracy.py +++ b/tests/domain/sap10_calculator/test_real_cert_sap_accuracy.py @@ -875,10 +875,11 @@ _EXPECTATIONS: Final[tuple[RealCertExpectation, ...]] = ( # U 0.29 (engine) vs 0.30 (Elmhurst) — which VALIDATES the slice-5 # external-insulation default (100 mm added over solid brick, # `_WALL_ADDED_INSULATION_UNKNOWN_THICKNESS_MM`); the suspended ground - # floor is U 0.68 (engine) vs 0.70 (Elmhurst). (Elmhurst''s overall - # worksheet SAP is NOT comparable — the reused-assessment combi entered - # as a "Standard Combi" carries a Table-3a keep-hot loss the lodged - # assessment did not, a build-side heating artifact, not an engine gap.) + # floor is U 0.68 (engine) vs 0.68 (Elmhurst) — EXACT after rebuilding + # with 0 extract fans + PCDB 18908 (was 0.70 pre-rebuild). Ventilation + # (21) shelter-adjusted ACH is EXACT too (0.6938 = 0.6938), and dwelling + # volume (5) 196.8995 m³ matches (confirming the mapper's +0.25 m + # upper-floor height convention mirrors Elmhurst's own internal one). # §5 (12) fix: the Main bp lodges no `floor_construction_type` (gov-API # leaves it None), but `epc.floors[0].description` = "Suspended, no # insulation (assumed)" — `_has_suspended_timber_floor_per_spec` was @@ -886,7 +887,20 @@ _EXPECTATIONS: Final[tuple[RealCertExpectation, ...]] = ( # genuinely suspended-timber floor. Now falls back to the joined # description (mirroring `_main_floor_u_value`'s existing fallback), # applying (12)=0.2 unsealed; engine converges EXACTLY on lodged (76). - # PINNED to the observed exact match. + # Elmhurst's OWN overall worksheet SAP (72) still differs from ours + # (76.33) even on these now-identical inputs — traced to SAP 10.2 + # Table 11: Elmhurst's (201)/(202)/(215) show it assumes 10% of space + # heat comes from a portable-electric secondary (658 kWh/yr @ the + # electric rate) purely from the main system's category (gas boiler), + # with NO secondary lodged (`secondary_heating.description == "None"`). + # `_secondary_fraction` only applies Table 11 when a secondary is + # actually lodged or forced by §A.2.2 — deliberately, per the S-B30 + # note a few lines below: applying Table 11 unconditionally regressed + # the full 1000-cert corpus MAE by +0.16 (lodged software doesn't + # apply Elmhurst's blanket convention). Verified: forcing Table 11 on + # for just this cert moves 76.33 -> 73.62, ~62% of the 76.33-vs-72 gap + # — confirms this is the dominant driver, not a mapping/entry error. + # PINNED to the observed exact match (vs lodged, the correct target). RealCertExpectation( schema="RdSAP-Schema-21.0.1", sample="uprn_100061275133",