From 99981e07e7b7455e829d9810fe495a28913709f3 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Fri, 12 Jun 2026 12:34:29 +0000 Subject: [PATCH] =?UTF-8?q?Guard=20all=20RdSAP-Schema-19.0=20corpus=20cert?= =?UTF-8?q?s=20in=20the=20strict=20parse+map=20bucket=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Promote RdSAP-Schema-19.0 into SUPPORTED so all 1000 corpus certs are held to the strict parse+map guard. Drop the now-redundant cert[0] tracer (subsumed by the parametrised bucket); keep the reduced-field synthesis behavioural test. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../epc_client/tests/test_mapper_corpus.py | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/infrastructure/epc_client/tests/test_mapper_corpus.py b/infrastructure/epc_client/tests/test_mapper_corpus.py index a674b5c6..e081f55a 100644 --- a/infrastructure/epc_client/tests/test_mapper_corpus.py +++ b/infrastructure/epc_client/tests/test_mapper_corpus.py @@ -5,10 +5,11 @@ sample of raw API certs across schema versions, produced by scripts/eon/harvest_certs.py. Each line is one cert in the exact shape ``from_api_response`` consumes. - * 21.0.0 / 21.0.1 — supported today; these are a regression guard. - * 20.0.0 — pre-SAP10 Reduced-Field Synthesis (ADR-0027). All 1000 - certs now parse and map, so the xfail is dropped and the - strict guard below keeps the whole bucket honest. + * 21.0.0 / 21.0.1 — supported today; these are a regression guard. + * 20.0.0 — pre-SAP10 Reduced-Field Synthesis (ADR-0027). + * 19.0 / 18.0 / 17.1 — pre-SAP10 family, inherited coefficients (ADR-0028). + All 1000 certs each parse and map; the strict guard + below keeps the whole bucket honest. If the corpus hasn't been harvested yet, every parametrisation is skipped. """ @@ -28,6 +29,7 @@ SAMPLES = Path("backend/epc_api/json_samples") SUPPORTED = { "RdSAP-Schema-21.0.1", "RdSAP-Schema-20.0.0", + "RdSAP-Schema-19.0", "RdSAP-Schema-18.0", "RdSAP-Schema-17.1", } @@ -64,24 +66,6 @@ def test_supported_schemas_map(cert: dict[str, Any]) -> None: assert isinstance(result, EpcPropertyData) -def _first(schema: str) -> dict[str, Any]: - certs = _load(schema) - if not certs: - pytest.skip(f"no {schema} corpus harvested") - return certs[0] - - -def test_rdsap_19_0_maps() -> None: - # Arrange - cert = _first("RdSAP-Schema-19.0") - - # Act - result = EpcPropertyDataMapper.from_api_response(cert) - - # Assert - assert isinstance(result, EpcPropertyData) - - def test_rdsap_19_0_synthesises_windows_for_windowless_cert() -> None: """ADR-0028 Reduced-Field Synthesis: a reduced 19.0 cert lodges no per-window geometry, only a glazed_area band — the mapper synthesises a