Model/backend/documents_parser
Khalim Conn-Kowlessar b6454d27e6 Slice S0380.14: add 'Large' → cylinder_size=4 (closes cert 9418 Daikin)
🎯 Closes the 7th and final ASHP cohort cert. Summary path now
mirrors the API path's complete cohort closure at the ±0.07 spec
precision floor.

Cert 9418-3062-8205-3566-7200 (Summary_000902.pdf): Daikin Altherma
EDLQ05CAV3 (PCDB 102421 — distinct from the rest of the cohort's
Mitsubishi 104568), end-terrace house, TWO 1.64 kWp PV arrays (N+S),
210 L cylinder, `heating_duration_code='24'` (continuous heating).
Worksheet "SAP value" lodges 84.6305.

Single-line fix to
`_ELMHURST_CYLINDER_SIZE_LABEL_TO_SAP10`:
  +    "Large": 4,
extending Slice S0380.6's "Medium" → 3 mapping to also cover the
"Large" cylinder. Without it `_elmhurst_cylinder_size_code('Large',
True)` returned None → cascade routed off the HP-with-cylinder HW
path → HW kWh under by 466 (Summary 1404 vs API 1871 vs
worksheet-implied 1871 via (64)/(216) divide).

Forcing function: cert 9418 first-attempt Summary SAP closes from
Δ +2.5973 (lookup miss) to Δ **+0.0296** — within ±0.07. The PV
multi-array Slice S0380.9 work was already sufficient for cert
9418's two-array PV layout (1.64 kWp N + 1.64 kWp S surfaced
correctly first-try).

ASHP cohort closure: 7/7 at spec floor:
  cert  Δ vs worksheet
  0380  +0.0594
  0350  +0.0458
  2225  +0.0441
  2636  +0.0323
  3800  +0.0442
  9285  +0.0502
  9418  +0.0296  ← this slice
  ───────────────
  mean  +0.0437

Identical disposition to the API path's cohort closure at slice
102f (commit c0086660). Both paths now sit at the documented
Appendix N3.6 PSR-interpolation precision floor.

Added two tests:
- `test_summary_9418_large_cylinder_routes_to_code_4` — unit-level
  pin on the new mapping.
- `test_summary_9418_full_chain_sap_within_spec_floor_of_worksheet`
  — chain test at ±0.07.

Pyright net-zero on both edited files (mapper.py 32 baseline).

Regression suite: 686 pass + 10 fail (= handover baseline 669 + 10
+ 19 new GREEN tests across Slices S0380.2..S0380.14).

Spec refs:
- SAP 10.2 Table 2a — cylinder volume factor (52) keyed on volume_l;
  210 L = 0.8x range factor (vs 160 L = 0.9086).
- BRE PCDB Table 362 — Daikin EDLQ05CAV3 (id 102421) is the cohort's
  second HP record alongside Mitsubishi PUZ-WM50VHA (id 104568).
- Cert 9418 worksheet `dr87-0001-000902.pdf` "Cylinder Volume 210.00".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 16:28:46 +00:00
..
handler address JTK review comments 2026-04-20 15:11:17 +00:00
tests Slice S0380.14: add 'Large' → cylinder_size=4 (closes cert 9418 Daikin) 2026-06-01 16:28:46 +00:00
__init__.py Map to RdSapSiteNotes from site notes JSON 🟥 2026-04-16 13:54:03 +00:00
db_writer.py include updating epc_property_data to pashub to ara workflow 2026-04-29 09:55:14 +00:00
elmhurst_extractor.py Slice S0380.12: parse 'Alternative wall' window-location in pre-data slice 2026-06-01 16:28:46 +00:00
extractor.py Handle wall thickness "Unmeasurable" 🟩 2026-04-30 16:41:16 +00:00
local_runner.py update local runner to work for elmhurst 2026-04-24 14:01:36 +00:00
parser.py load ecmk site notes to db 2026-04-29 11:20:47 +00:00
pdf.py update local runner to work for elmhurst 2026-04-24 14:01:36 +00:00