docs: session-8 handover — API mechanical_ventilation enum → §2 MV-kind dispatch

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-06-08 23:02:51 +00:00
parent 71b378b9e5
commit dfba20babf

View file

@ -13,16 +13,33 @@ deproven approaches + the meter/shower data-fidelity findings), and the earlier
`energy_rating_current`. Headline gauge:
`PYTHONPATH=/workspaces/model python scripts/eval_api_sap_accuracy.py`.
| metric | session-4 (`faf29942`) | session-5 (`19235d11`) | session-6 (`a7761ea8`) | **session-7 (`3e05c95e`)** |
| metric | session-5 (`19235d11`) | session-6 (`a7761ea8`) | session-7 (`3e05c95e`) | **session-8 (`71b378b9`)** |
|--------|------------------|------------------|------------------|------------------|
| **% \|err\| < 0.5** | 47.6% | 53.1% | 53.14% | **54.24%** |
| % \|err\| < 1.0 | 62.6% | 68.0% | 67.99% | **69.64%** |
| % \|err\| < 2.0 | 79.6% | ~81% | 81.85% | **83.50%** |
| mean \|err\| | 1.586 | 1.329 | 1.312 | **1.248** |
| median \|err\| | — | 0.467 | 0.467 | **0.457** |
| **% \|err\| < 0.5** | 53.1% | 53.14% | 54.24% | **55.01%** |
| % \|err\| < 1.0 | 68.0% | 67.99% | 69.64% | **70.08%** |
| % \|err\| < 2.0 | ~81% | 81.85% | 83.50% | **~83.6%** |
| mean \|err\| | 1.329 | 1.312 | 1.248 | **1.233** |
| median \|err\| | 0.467 | 0.467 | 0.457 | **0.448** |
| computed / raises | 909 / 0 | 909 / 0 | 909 / 0 | **909 / 0** |
| unsupported_schema | 100 (deferred) | 100 (deferred) | 100 (deferred) | 100 (deferred) |
### SESSION-8 — API `mechanical_ventilation` enum never mapped, `71b378b9`
Re-profiling after the sheltering fix surfaced `mechanical_ventilation=2` as a
clean systematic over-rate (n=20, signed +1.90, 5% within 0.5, every cert
positive). ROOT: `from_api_response` DROPPED the doc-level
`mechanical_ventilation` field, so `mechanical_ventilation_kind` was always None
and the §2 (24a..d) cascade defaulted to NATURAL — under-stating the air-change
rate for every mechanical system (only the Elmhurst path mapped it). New
`_api_mechanical_ventilation_kind` maps the RdSAP-Schema-21 enum →
MechanicalVentilationKind: 0→NATURAL, 1 MV→"MV", 2/3 MEV + 6 PIV-outside →
"EXTRACT_OR_PIV_OUTSIDE", 5 PIV-loft→NATURAL; **code 4 (MVHR) DEFERRED** (needs
the lodged HR efficiency, PCDB Table 326, the API path doesn't plumb — stays
NATURAL rather than mis-modelling as MV). Unmapped → `UnmappedApiCode`. Extract
cohort +1.90→+0.9 median (within-0.5 5%→35%), 20 improved / 3 regressed. The
**+0.9 residual is the MEV FAN ELECTRICITY** (§2.6.4 SFP, PCDB Table 322
decentralised-MEV — 9 of 20 carry `mechanical_ventilation_index_number`): a
clean next slice. Goldens + regression green, pyright net-zero.
### SESSION-7 — sheltered alternative walls (RdSAP Table 4 R=0.5), `3e05c95e`
The headline-moving audit. User: 53% is poor enough to indicate a MAJOR error
— audit again. The decisive diagnostic CHAIN (reusable):