Ratchet the API-corpus within-0.5 floor to 78.8% for the water-only DHW fix 🟪

Enumerates the 3 corpus certs that can move (all WHC 950) individually per
#1592 sub-task D: two improve (one crossing inside 0.5), one worsens and is
handed to sub-task C for an accredited oracle. No loosening required.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-15 10:34:19 +00:00
parent 97ab27c914
commit a400005353

View file

@ -241,7 +241,26 @@ _CORPUS = Path(
# fallback (see the `_MAX_SAP_MAE` note below for the mechanism).
# 77.8% -> 78.6% via the RdSAP 10 §5.7 Table 13 200/280mm solid-brick-wall
# boundary fix (see the `_MAX_SAP_MAE` note below).
_MIN_WITHIN_HALF_SAP = 0.786
# 78.7% -> 78.8% (MAE 0.6273 -> 0.6272) via the water-only heat-network DHW
# fix (#1592 sub-task B): SAP 10.2 §4.3 (PDF p.24) puts the water-heating
# efficiency in the Table 12 price of delivered heat, and C4 (p.53) scopes the
# plant efficiency to "the calculation of CO2 emissions and Primary Energy" —
# so worksheet (310) = (64) × (305a) × (306) carries NO efficiency divisor.
# The WHC-950/951/952 branch had been applying it a second time dwelling-side.
# Also re-applies the Table 3 primary loss (p=1.0, h=3) for these certs.
# Only 3 corpus certs can move (all lodge WHC 950), enumerated individually:
# 5300047580 err 0.695 -> 0.249 (crosses inside 0.5 — this is the +0.1%)
# 10010254955 err 1.535 -> 0.795 (improves, still outside)
# 22032926 err 1.707 -> 2.737 (WORSENS — it over-rates, and the fix
# raises SAP further; a separate baseline residual that pashub's lodged
# `pre_sap` cannot adjudicate. Tracked as #1592 sub-task C, which pins an
# accredited Elmhurst worksheet as the oracle.)
# Net MAE 0.00016 over 1000 certs. PE 2.845 -> 2.867 and CO2 0.0701 -> 0.0702
# both drift slightly the wrong way but stay well inside their loose ceilings;
# the plant efficiency C4 reserves for CO2/PE is a known follow-up. Spec-
# verified against the SAP 10.2 PDF, not the ticket prose; unit-pinned in
# test_cert_to_inputs (950/951/952 must bill identical DHW fuel).
_MIN_WITHIN_HALF_SAP = 0.788
# 0.793 -> 0.789 via the §12 Unknown-meter + dual-electric-immersion off-peak
# trigger (RdSAP 10 PDF p.62): Apartment 241 (main 691 + 903 dual immersion)
# -5.38 -> -1.05. Worksheet-validated on "simulated case 48" (Elmhurst SAP 57,