mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Slice S0380.69: Add 38 cohort-2 certs to test_golden_fixtures.py with PE/CO2 pins
Per [[project-golden-coverage-state]] memory + docs/HANDOVER_GOLDEN_COVERAGE.md:
cohort-2 (38 certs) was chain-tested at 1e-4 SAP via
`test_summary_pdf_mapper_chain.py::test_api_cohort_2_full_chain_sap_
matches_worksheet_at_1e_minus_4` but NOT in golden — PE/CO2 cascade
output for 38 worksheet-backed certs had zero regression guards.
Largest invisible drift: cert 2102-3018-0205-7886-5204 at PE +20.36
kWh/m² / CO2 −0.79 t/yr. Was the +20.4 PE outlier called out in the
handover doc. Now pinned and visible to any future cascade refactor.
Cohort-2 SAP residuals all close to 0 at integer (1e-4 continuous-SAP
convergence rounds to exact match). PE / CO2 baseline residuals
captured at HEAD:
- PE residual range: −4.18 to +20.36 kWh/m². Median ≈ −0.1.
- CO2 residual range: −0.79 to +0.05 t/yr. Median ≈ −0.02.
- 14 certs cluster at PE ≈ −2.7 to −4.2 kWh/m² (gas combi PCDB
+ boiler PE under-count pattern, shared with cohort-1
cert 2130 and ASHP cohort certs).
Pinned per the existing `_GoldenExpectation` shape — SAP at abs=0
(integer), PE at abs=0.01 kWh/m², CO2 at abs=0.001 t/yr. Notes kept
short for each cohort-2 cert because the pinned residual itself is
the signal; per-cert slice history lives in the chain test's
`_COHORT_2_API_CLOSED` list and `sap worksheets/Additional data with
api/<cert>/dr87-*.pdf` worksheets.
Test suite: 317 pass (was 279) + 9 expected 000565 cascade-gap fails
(unchanged). Pyright: 1 error baseline preserved on the
`pytest.approx` import line (per [[feedback-prefer-abs-diff-over-
pytest-approx]] this is the legacy `test_api_to_domain_mapper_
preserves_main_heating_index_number` line that pre-dates the AAA
convention; not touched by this slice).
Next-investigation target: cert 2102 PE +20.36 / CO2 −0.79 closure.
Likely sits in the secondary-heating House coal PE/CO2 cascade
(S0380.43 closed SAP via spec-fuel routing but didn't address the
PE/CO2 paths). Visible as a fired golden test on any cascade refactor
of that surface.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
f0ab7446b2
commit
c4b2782931
1 changed files with 59 additions and 0 deletions
|
|
@ -347,6 +347,65 @@ _EXPECTATIONS: tuple[_GoldenExpectation, ...] = (
|
|||
"fix closed PE -3.01 → -2.89."
|
||||
),
|
||||
),
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Cohort-2 — 38 API-path-chain-closed certs, all hitting worksheet
|
||||
# continuous SAP at <1e-4. Until Slice S0380.69 these chain tests
|
||||
# only pinned the SAP cascade — PE/CO2 cascades for the 38 certs
|
||||
# had zero regression guards. Cert 2102 (`+20.36 PE / −0.79 CO2`)
|
||||
# was the largest invisible drift; adding cohort-2 to golden makes
|
||||
# it fire on any cascade refactor that disturbs PE/CO2 paths the
|
||||
# smaller cohort doesn't exercise (heat-network, electric storage
|
||||
# heater secondary, district heat, etc.). Notes per cert kept short
|
||||
# because the pinned residual itself is the signal — slice history
|
||||
# for each cert can be retrieved from the chain-test file
|
||||
# (`test_summary_pdf_mapper_chain.py::_COHORT_2_API_CLOSED`) and
|
||||
# the per-cert `dr87-*.pdf` worksheet under
|
||||
# `sap worksheets/Additional data with api/`.
|
||||
# ------------------------------------------------------------------
|
||||
_GoldenExpectation(cert_number="0036-6325-1100-0063-1226", actual_sap=63, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.4019, expected_co2_resid_tonnes_per_yr=+0.0255, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0100-5141-0522-4696-3463", actual_sap=86, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-2.3311, expected_co2_resid_tonnes_per_yr=-0.0314, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0200-3155-0122-2602-3563", actual_sap=81, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.9879, expected_co2_resid_tonnes_per_yr=-0.0097, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0300-2403-2650-2206-0235", actual_sap=77, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.5118, expected_co2_resid_tonnes_per_yr=+0.0442, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0310-2763-5450-2506-3501", actual_sap=78, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.4387, expected_co2_resid_tonnes_per_yr=+0.0149, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0320-2126-2150-2326-6161", actual_sap=72, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-0.2060, expected_co2_resid_tonnes_per_yr=+0.0128, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0320-2756-8640-2296-1101", actual_sap=90, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-2.9435, expected_co2_resid_tonnes_per_yr=-0.0363, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0330-2257-3640-2196-3145", actual_sap=85, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-2.6609, expected_co2_resid_tonnes_per_yr=-0.0218, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0360-2266-5650-2106-8285", actual_sap=80, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.2223, expected_co2_resid_tonnes_per_yr=-0.0171, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0380-2530-6150-2326-4161", actual_sap=66, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-0.0893, expected_co2_resid_tonnes_per_yr=-0.0315, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0390-2066-4250-2026-4555", actual_sap=65, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-0.2522, expected_co2_resid_tonnes_per_yr=+0.0005, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0464-3032-0205-4276-3204", actual_sap=80, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.6127, expected_co2_resid_tonnes_per_yr=+0.0450, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="0652-3022-1205-2826-1200", actual_sap=71, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.4950, expected_co2_resid_tonnes_per_yr=+0.0275, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="1536-9325-5100-0433-1226", actual_sap=66, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-0.1568, expected_co2_resid_tonnes_per_yr=-0.0456, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="2007-3011-9205-8136-3204", actual_sap=68, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-0.3773, expected_co2_resid_tonnes_per_yr=-0.0325, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="2031-3007-0205-1296-3204", actual_sap=64, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.4198, expected_co2_resid_tonnes_per_yr=-0.0420, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
# Cert 2102: largest cohort-2 PE residual (+20.36 kWh/m²) — was
|
||||
# invisible to any current test before S0380.69 added this pin per
|
||||
# [[project-golden-coverage-state]]. Root cause likely sits in
|
||||
# `secondary_heating_fuel_kwh_per_yr` cost cascade for House coal
|
||||
# (S0380.43 closed SAP but not PE/CO2). Next-investigation target.
|
||||
_GoldenExpectation(cert_number="2102-3018-0205-7886-5204", actual_sap=64, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+20.3639, expected_co2_resid_tonnes_per_yr=-0.7895, notes="Cohort-2 baseline pin captured by S0380.69. Largest residual in the cohort — open investigation target (House coal secondary PE cascade)."),
|
||||
_GoldenExpectation(cert_number="2130-3018-4205-4686-5204", actual_sap=71, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.4083, expected_co2_resid_tonnes_per_yr=-0.0357, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="2336-3124-3600-0517-1292", actual_sap=83, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-2.7961, expected_co2_resid_tonnes_per_yr=-0.0981, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="2536-2525-0600-0788-2292", actual_sap=80, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-3.4839, expected_co2_resid_tonnes_per_yr=-0.0582, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="2590-3025-7205-9066-0200", actual_sap=66, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-0.1309, expected_co2_resid_tonnes_per_yr=-0.0036, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="2699-3025-5205-8066-0200", actual_sap=69, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.4755, expected_co2_resid_tonnes_per_yr=-0.0016, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="2800-7999-0322-4594-3563", actual_sap=78, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-3.4448, expected_co2_resid_tonnes_per_yr=-0.0473, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="3136-7925-4500-0246-6202", actual_sap=78, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.2521, expected_co2_resid_tonnes_per_yr=-0.0486, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="3336-2825-9400-0512-8292", actual_sap=78, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-3.4645, expected_co2_resid_tonnes_per_yr=-0.0877, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="4536-5424-8600-0109-1226", actual_sap=82, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-3.2123, expected_co2_resid_tonnes_per_yr=-0.0684, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="4536-8325-3100-0409-1222", actual_sap=66, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-0.2794, expected_co2_resid_tonnes_per_yr=+0.0093, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="4800-3992-0422-0599-3563", actual_sap=87, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-3.8280, expected_co2_resid_tonnes_per_yr=-0.0848, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="6835-3920-2509-0933-5226", actual_sap=80, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-0.1246, expected_co2_resid_tonnes_per_yr=-0.0238, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="7700-3362-0922-7022-3563", actual_sap=63, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-0.4141, expected_co2_resid_tonnes_per_yr=+0.0216, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="7800-1501-0922-7127-3563", actual_sap=65, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-0.0594, expected_co2_resid_tonnes_per_yr=+0.0440, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="7836-3125-0600-0526-2202", actual_sap=80, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.3469, expected_co2_resid_tonnes_per_yr=+0.0164, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="9036-0824-3500-0420-8222", actual_sap=84, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-3.0984, expected_co2_resid_tonnes_per_yr=-0.0220, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="9370-3060-1205-3546-4204", actual_sap=88, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-2.7546, expected_co2_resid_tonnes_per_yr=-0.0749, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="9380-2957-7490-2595-3141", actual_sap=75, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=+0.4794, expected_co2_resid_tonnes_per_yr=-0.0245, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="9421-3045-3205-1646-6200", actual_sap=87, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-3.3687, expected_co2_resid_tonnes_per_yr=-0.0432, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="9796-3058-6205-0346-9200", actual_sap=90, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-4.1762, expected_co2_resid_tonnes_per_yr=-0.0391, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
_GoldenExpectation(cert_number="9836-7525-9500-0575-1202", actual_sap=75, expected_sap_resid=+0, expected_pe_resid_kwh_per_m2=-0.5524, expected_co2_resid_tonnes_per_yr=+0.0010, notes="Cohort-2 baseline pin captured by S0380.69."),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue