diff --git a/backend/documents_parser/tests/test_summary_pdf_mapper_chain.py b/backend/documents_parser/tests/test_summary_pdf_mapper_chain.py index b4d7fced..21857309 100644 --- a/backend/documents_parser/tests/test_summary_pdf_mapper_chain.py +++ b/backend/documents_parser/tests/test_summary_pdf_mapper_chain.py @@ -1782,16 +1782,21 @@ _API_9285_JSON = ( / "9285-3062-0205-7766-7200.json" ) -_ASHP_COHORT_CHAIN_TOLERANCE: float = 0.04 -"""ASHP-cohort chain-test tolerance after S0380.28 (reciprocal-linear -PSR interpolation per SAP 10.2 Appendix N footnote 43). Pre-slice the -cohort sat at +0.03..+0.06 SAP and this constant was 0.07. Post-slice: - Summary path: 6 of 7 certs hit < 1e-4; cert 2636 -0.015 (cantilever) - API path: all 6 certs hit +0.014..+0.031 (cohort-residual cluster - — open thread; Summary EPC ≠ API EPC for a load-bearing - field — see [[project-api-to-sap-residual-test]]) -0.04 gives ~30% headroom over the API path's worst residual (cert 0350 -+0.031) and fires loudly on regression beyond the documented residuals.""" +_ASHP_COHORT_CHAIN_TOLERANCE: float = 1e-4 +"""ASHP-cohort chain-test tolerance. + +The cohort closed cumulatively across S0380.26..S0380.35: §3.2 curtain ++ reciprocal-η interpolation (SAP 10.2 fn 43), glazing-code Table 6b +extension to RdSAP21 codes 8-15, (31) NET area for alt-wall openings +(SAP 10.2 K2), and the RdSAP10 §15 Decimal-rounding cluster on living +area / gross wall / kWp. At HEAD all 7 ASHP cohort certs sit at < 5e-5 +SAP on BOTH paths (worst residual: cert 2225 4.8e-5): + Summary path: 7/7 < 1e-4 (cert 2636 -2e-6 after S0380.31) + API path: 7/7 < 1e-4 (parity with Summary at cascade output level) + +1e-4 matches the user's [[feedback-one-e-minus-4-across-the-board]] +target with ~2x headroom over the worst residual. Any future cohort +regression beyond ~5e-5 fires this tolerance loudly.""" def test_api_0380_full_chain_sap_within_spec_floor_of_worksheet() -> None: