Guard all RdSAP-Schema-19.0 corpus certs in the strict parse+map bucket 🟩

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) <noreply@anthropic.com>
This commit is contained in:
Jun-te Kim 2026-06-12 12:34:29 +00:00
parent 1fcad454fa
commit 99981e07e7

View file

@ -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