Model/datatypes
Khalim Conn-Kowlessar a05ecacd67 Slice 43: percent_draughtproofed mapper fix — surface lodged value on EpcPropertyData
Mapper-drop audit across the 9-fixture cohort: `percent_draughtproofed`
is lodged on 9/9 certs (raw values 85-100) but the schema-21.0.1
mapper never set it on EpcPropertyData. The site-notes mappers always
have (line 312 of mapper.py); only the API path was missing.

cert_to_inputs reads `epc.percent_draughtproofed` for the §2
ventilation cascade (window draught loss); with None → 0 default, the
calc was treating every API-routed cert as fully draughty —
over-counting draught infiltration on every fixture in the cohort.

Fix: `percent_draughtproofed=schema.percent_draughtproofed` in
`from_rdsap_schema_21_0_1`.

Cohort SAP / PE / CO2 shifts (all 9 fixtures move; many shift one
SAP point because the continuous SAP was near a rounding boundary):

  cert                              old SAP  new SAP   PE shift   CO2 shift
  0240-0200-5706-2365-8010          -12      -10        -7.63      -0.39
  0300-2747-7640-2526-2135          -9       -7         -6.36      -0.55
  0390-2254-6420-2126-5561 (LN12)    0       +1         -9.10      -0.13
  0390-2954-3640-2196-4175          -7       -4         -4.87      -0.44
  2130-1033-4050-5007-8395 (DE22)   +8       +9         -3.67      -0.04
  6035-7729-2309-0879-2296          -6       -5         -8.90      -0.21
  7536-3827-0600-0600-0276          +3       +4         -9.19      -0.24
  8135-1728-8500-0511-3296          +1       +1 (cont   -7.48      -0.14
                                              72.7→73.5)
  9390-2722-3520-2105-8715          +2       +3         -7.32      -0.01

LN12 lost its exact-SAP-match (0 → +1, continuous 65.47 → 66.28); the
other fixtures' rounded SAP residuals tightened or worsened by 1
depending on which side of the rounding boundary they sit. This is
spec-correctness over residual-tightness: the lodged value is correct,
our calc now reads it.

930/930 Elmhurst cascade green. 78/78 mapper tests + 14/14 golden
cohort + PCDB chain green. Pyright net-zero.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 15:06:32 +00:00
..
epc Slice 43: percent_draughtproofed mapper fix — surface lodged value on EpcPropertyData 2026-05-24 15:06:32 +00:00
magicplan typing and renaming 🟪 2026-05-07 13:26:49 +00:00
__init__.py further breaking up code 2023-07-20 12:24:34 +01:00
datatypes.py further breaking up code 2023-07-20 12:24:34 +01:00
enums.py completed build of new demo portfolio - some fixed required still 2023-11-20 14:42:16 +00:00