diff --git a/tests/infrastructure/epc_client/test_sap_accuracy_corpus.py b/tests/infrastructure/epc_client/test_sap_accuracy_corpus.py index fb38613f..a19c9b6d 100644 --- a/tests/infrastructure/epc_client/test_sap_accuracy_corpus.py +++ b/tests/infrastructure/epc_client/test_sap_accuracy_corpus.py @@ -82,8 +82,19 @@ _CORPUS = Path( # -> 0.68) and case 42 (rafters 50mm -> 0.88; rafters genuine-unknown band C # -> 2.30 per Table 18 footnote 1 "applies for unknown and as built"). Do NOT # revert the rafters column. -_MIN_WITHIN_HALF_SAP = 0.65 -_MAX_SAP_MAE = 1.08 +# +# DETAILED RR SLOPE + STUD WALL (RdSAP 10 §3.9 Figure 4 + §5.11.3 Table 17 cols +# 1/3, p.43-44): the gov API lodges a Detailed RR's sloping ceilings (slope_*) +# and stud/knee walls (stud_wall_*) alongside the gable + flat-ceiling surfaces. +# Those fields were UNDECLARED on the schema, so `from_dict` dropped them and the +# mapper built only gable + flat-ceiling — the (large) sloping roof and knee +# walls contributed ZERO heat loss -> undercounted RR fabric -> over-rate. +# Declaring + threading slope/stud into `detailed_surfaces` (cascade already +# routes both to the roof aggregate) recovered the 15-cert /tmp cohort from +# mean|err| 4.26 -> 2.05 (e.g. 0390-2538 +5.95 -> +3.56). Corpus within-0.5 +# 67.3% -> 67.5% (MAE 1.020 -> 0.987). +_MIN_WITHIN_HALF_SAP = 0.67 +_MAX_SAP_MAE = 1.00 _MAX_CO2_MAE_TONNES = 0.35 # t CO2 / yr vs co2_emissions_current _MAX_PE_PER_M2_MAE = 16.0 # kWh / m2 / yr vs energy_consumption_current