diff --git a/backend/documents_parser/tests/test_heating_systems_corpus.py b/backend/documents_parser/tests/test_heating_systems_corpus.py index 14ccc2d9..a09e3ae7 100644 --- a/backend/documents_parser/tests/test_heating_systems_corpus.py +++ b/backend/documents_parser/tests/test_heating_systems_corpus.py @@ -68,13 +68,18 @@ _CORPUS_ROOT = ( # Per-pin absolute tolerances. Worksheet `SAP value` lodges 4 d.p., -# (255) total fuel cost 4 d.p., (272) total CO2 4 d.p., (286) Total -# Primary energy kWh/year 4 d.p. — pin at 1e-4 relative to lodged -# precision so any drift outside cascade float noise fires. -_SAP_RESID_ABS_TOLERANCE = 0.001 -_COST_RESID_ABS_TOLERANCE_GBP = 0.01 -_CO2_RESID_ABS_TOLERANCE_KG = 0.1 -_PE_RESID_ABS_TOLERANCE_KWH = 0.1 +# (255)/(355) total fuel cost 4 d.p., (272)/(383) total CO2 4 d.p., +# (286)/(483) Total Primary energy kWh/year 4 d.p. — so the hard floor +# on any residual is ~5e-5 (half a unit in the last printed digit), +# independent of cascade precision. Pin at 1e-4 on EVERY metric (per +# [[feedback-zero-error-strict]] / [[feedback-continuous-sap-tolerance]] +# — basically zero error across continuous SAP, cost, CO2 and PE) so +# any drift beyond PDF print-rounding fires loudly. All 41 variants hold +# at this tolerance; closures re-pin the smaller residual, never widen. +_SAP_RESID_ABS_TOLERANCE = 0.0001 +_COST_RESID_ABS_TOLERANCE_GBP = 0.0001 +_CO2_RESID_ABS_TOLERANCE_KG = 0.0001 +_PE_RESID_ABS_TOLERANCE_KWH = 0.0001 @dataclass(frozen=True)