Model/tests/infrastructure/epc_client
Khalim Conn-Kowlessar a9632937d5 fix(ventilation): use lodged extract-fan count when known, not max(lodged, age default) (RdSAP 10 §4.1 Table 5, PDF p.28)
Table 5 reads "Number of extract fans if known; if number is unknown:
[age-band default]" — the default is an UNKNOWN-fallback, NOT a floor. The
cascade applied `max(lodged, table_5_default)`, flooring a genuinely-lodged
count up to the age-band minimum: e.g. an age H-M dwelling lodging 2 extract
fans was billed at the 6-8-room default of 3, over-counting ventilation line
(8) and the heat-loss coefficient. Fixed to `lodged if lodged > 0 else
default` (a lodged 0 is the Elmhurst/RdSAP "unknown" form → default; any
positive count is taken literally).

Surfaced by Khalim's Elmhurst stress worksheet (simulated case 46): this was
its last ventilation residual — our Jan effective ACH 9.14 -> 9.0748 (exact
match to the accredited worksheet), SAP 29 -> 30 = Elmhurst, cost £1496 vs
£1493. Corpus IMPROVED: within-0.5 71.6% -> 72.5%, MAE 0.819 -> 0.815 (the
max-flooring over-counted ventilation on every cert lodging fans below its
age default). Floor ratcheted 0.71 -> 0.72. pyright not installed locally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 06:22:26 +00:00
..
__init__.py python upgraded due to enum 2026-06-12 15:47:28 +00:00
conftest.py python upgraded due to enum 2026-06-12 15:47:28 +00:00
test_client.py python upgraded due to enum 2026-06-12 15:47:28 +00:00
test_mapper_corpus.py python upgraded due to enum 2026-06-12 15:47:28 +00:00
test_mapper_dispatcher.py python upgraded due to enum 2026-06-12 15:47:28 +00:00
test_pv_battery_sap_neutrality.py test(pv-battery): pin SAP cost-neutrality on export-capable standard tariff 2026-06-14 09:51:34 +00:00
test_sap_accuracy_corpus.py fix(ventilation): use lodged extract-fan count when known, not max(lodged, age default) (RdSAP 10 §4.1 Table 5, PDF p.28) 2026-06-21 06:22:26 +00:00