From e27b923bca9080e5bc3d4f8022675c1fc135e810 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 28 May 2026 11:49:56 +0000 Subject: [PATCH] =?UTF-8?q?Slice=20S0380.29:=20tighten=20=5FASHP=5FCOHORT?= =?UTF-8?q?=5FCHAIN=5FTOLERANCE=200.07=20=E2=86=92=200.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Post-S0380.28 (Appendix N footnote 43 reciprocal η interpolation), the ASHP-cohort chain-test residuals collapsed: Summary path: cert 0380: +0.000001 (was +0.034) cert 0350: +0.000022 (was ~+0.046) cert 2225: -0.000048 (was ~+0.044) cert 2636: -0.014945 (was ~+0.003 — cantilever-specific) cert 3800: -0.000020 (was +0.021) cert 9285: -0.000034 (was +0.021) cert 9418: -0.000000 (was +0.00004) API path (cohort handover thread 4 — open): cert 0380: +0.025273 cert 0350: +0.030594 (worst) cert 2225: +0.028517 cert 2636: +0.014705 cert 3800: +0.023327 cert 9285: +0.028674 The previous 0.07 tolerance gave 130%+ headroom over the pre-slice worst residual; with S0380.28 closing the cluster the same tolerance gives 130%+ headroom over the post-slice API worst (0.031), letting regressions hide for a long time before firing. 0.04 gives ~30% headroom over the API path's worst residual (cert 0350 +0.0306) and ~170% over the Summary path's worst (cert 2636 -0.015 — the cantilever fixture). Fires loudly on any regression beyond the documented API-path residual cluster. Tightens 15 chain tests (8 Summary path + 7 API path). All pass. Tests: 710 pass (unchanged), 10 expected fails unchanged. Co-Authored-By: Claude Opus 4.7 --- .../tests/test_summary_pdf_mapper_chain.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 43436f48..fa0671f4 100644 --- a/backend/documents_parser/tests/test_summary_pdf_mapper_chain.py +++ b/backend/documents_parser/tests/test_summary_pdf_mapper_chain.py @@ -1729,8 +1729,16 @@ _API_9285_JSON = ( / "9285-3062-0205-7766-7200.json" ) -_ASHP_COHORT_CHAIN_TOLERANCE: float = 0.07 -"""SAP-precision floor for the 7-cert ASHP cohort — see handover.""" +_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.""" def test_api_0380_full_chain_sap_within_spec_floor_of_worksheet() -> None: