mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Audit of raw-JSON keys vs RdSapSchema21_0_1 across the 9-fixture golden cohort surfaced 7 vent / draught fields silently dropped at deserialization: blocked_chimneys_count, open_flues_count, closed_flues_count, boilers_flues_count, other_flues_count, psv_count, has_draught_lobby. cert_to_inputs reads all of them for the §2 infiltration cascade; without them the calc treats every dwelling as flue-free / vent-free / no draught lobby and under-counts ACH. Fix: declare the 7 fields on RdSapSchema21_0_1; extend the mapper to surface blocked_chimneys_count on EpcPropertyData top-level (already declared) and the other 6 on SapVentilation (extends the slice 37 extract_fans_count work). has_draught_lobby coerces "true"/"false" strings to bool to match the SapVentilation type. Cohort residual shifts after re-pinning: - LN12 (0390-2254) — SAP +1 → 0 (FIRST CERT TO HIT LODGED SAP EXACTLY). blocked_chimneys=2 reduces infiltration, tightens both SAP and PE (PE −10.62 → −3.14, CO2 −0.11 → +0.04). - 0300 — PE +18.92 → +17.34, CO2 −0.43 → −0.54 (open_flues=1 + has_draught_lobby=true cross-cancel near-zero). - 0390-2954 — PE −25.62 → −27.64, CO2 −2.45 → −2.58 (has_draught_lobby=true). - 8135 — PE −17.58 → −14.37, CO2 −0.22 → −0.15 (blocked_chimneys=1). - Other 5 fixtures (0240, DE22, 6035, 7536, plus retired 9390): no shift — their certs lodge zeros or no vent fields beyond what Slice 37 plumbed. Rounded-SAP cohort distribution post-slice: 0 (LN12), +1 (8135), +2 (9390), +3 (7536), +8 (DE22, spec-drift), -6 (6035), -7 (0390-2954), -9 (0300), -12 (0240, RR-driven). Schema scope: 21.0.1 only. 21.0.0 schema's SapBuildingPart shares the same mapper code but no 21.0.0 fixtures live in the cohort to anchor against; defer to a future slice if needed. 930/930 Elmhurst cascade green. 14/14 golden cohort green at new pinned residuals. 77/77 mapper tests green. Pyright net-zero (34 errors before and after). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| epc | ||
| magicplan | ||
| __init__.py | ||
| datatypes.py | ||
| enums.py | ||