mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Mirror of the cohort-2 Summary-path sweep that closed across
S0380.30..38: for each of the 38 cohort-2 certs whose API JSON was
fetched in S0380.39, drive the full API chain (`from_api_response`
→ `cert_to_inputs` → `calculate_sap_from_inputs`) and assert
`sap_score_continuous` vs the worksheet's lodged SAP at abs <= 1e-4.
Per cross-mapper parity ([[feedback-cross-mapper-parity-via-cascade]]):
the SAP cascade is the load-bearing equivalence check between
EpcPropertyData produced by from_api_response and from_elmhurst_site_notes.
If both paths hit the worksheet at 1e-4, they're cascade-output-
equivalent for load-bearing fields — strictly stronger than a noisy
structural EpcPropertyData diff.
Two parametrized tests, both green at HEAD:
- test_api_cohort_2_full_chain_sap_matches_worksheet_at_1e_minus_4:
34 certs that hit the worksheet at 1e-4 on the API path immediately
(the cascade can't tell which mapper produced the EPC).
- test_api_cohort_2_open_cert_residual_matches_current_pin:
4 certs that don't yet hit 1e-4 — pinned at their current cascade
output as forcing functions per [[project-api-to-sap-residual-test]].
When a follow-up slice closes the underlying mapper/spec gap, the
cascade output moves and the pin fires, forcing the cert to migrate
from _COHORT_2_API_OPEN to _COHORT_2_API_CLOSED.
Open cohort residuals (handover to Slice C+):
- 0300/1536/9380: tight +0.42..+0.44 band — likely a single shared
cascade-spec gap (API-mapper-specific, since Summary path hits 1e-4)
- 2102: -6.30 — Summary test (test_summary_2102_secondary_heating_
routes_house_coal_for_open_fire) shows the cert lodges house-coal
open-fire secondary heating; API mapper likely routes secondary
fuel differently. Probe `secondary_heating` block first.
Test suite: 712 → 750 pass (0 fails). Pyright net-zero on touched file.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| handler | ||
| tests | ||
| __init__.py | ||
| db_writer.py | ||
| elmhurst_extractor.py | ||
| extractor.py | ||
| local_runner.py | ||
| parser.py | ||
| pdf.py | ||