Model/datatypes
Khalim Conn-Kowlessar 29cfdf6461 Slice S0380.11: resolve zero-shower lodgings to count=0 (closes cert 2225)
Cert 2225-3062-8205-2856-7204 lodges **zero showers** in its Summary
§1x Baths and Showers block. The Summary mapper at
`mapper.py:3536-3537` predicated the shower-count assignment on
`has_electric_shower`: for cohort certs with no electric shower the
counts collapsed to None — but cert 2225 has no showers at all, and
the cascade's None-handling defaults to 1 mixer shower (over-counting
HW kWh by ~66 against the worksheet (64)/(216) target).

Same disposition the API path received in slice 102f-prep.8 (commit
1d5183c6, "API mapper resolves shower_outlets=None → 0 mixers") —
extending it to the Summary mapper.

Scope-limited fix: zero-shower lodgings resolve to **explicit 0**
counts (not None) so the cascade does not default-assume a mixer.
Non-zero shower lodgings keep their existing convention (None for
non-electric → cascade derives count from `shower_outlets`) so the 5
boiler-cohort hand-built parity tests
(`test_from_elmhurst_site_notes_matches_hand_built_*`) stay GREEN.

Forcing function: cert 2225 first-attempt Summary SAP closes from
Δ -0.3079 to Δ **+0.0441** — within the ±0.07 ASHP-cohort spec floor.

Cohort closure status (5 of 7 ASHP certs now at spec floor):
  cert  Δ vs worksheet  spec floor?
  0380  +0.0594         ✓
  0350  +0.0458         ✓
  2225  +0.0441         ✓  ← this slice
  2636  +0.4873         ✗  (cantilever + alt-wall; next slice)
  3800  +0.0442         ✓
  9285  +0.0502         ✓
  9418  +2.5973         ✗  (Daikin EDLQ05CAV3, distinct PCDB)

Added two tests:
- `test_summary_2225_no_showers_lodged_resolves_to_zero_counts` —
  unit-level pin that no-shower lodgings produce explicit 0 counts.
- `test_summary_2225_full_chain_sap_within_spec_floor_of_worksheet`
  — Layer-4 chain test at ±0.07.

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

Regression suite: 682 pass + 10 fail (handover baseline 669 + 10 +
13 new GREEN tests across S0380.2..S0380.11). The 5 boiler hand-
built parity tests confirmed still GREEN — the refinement
deliberately preserves their convention by only flipping the zero-
shower case.

Spec refs:
- Slice 102f-prep.8 (commit 1d5183c6) — API-path precedent.
- SAP 10.2 Appendix J — shower energy accounting (electric vs mixer
  routing); mixer showers draw from the HW system and contribute to
  HW kWh; electric showers are §J line 64a (separate energy stream).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 16:28:46 +00:00
..
epc Slice S0380.11: resolve zero-shower lodgings to count=0 (closes cert 2225) 2026-06-01 16:28:46 +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