Model/datatypes/epc/domain
Jun-te Kim 2851a0151b Drop phantom alternative-wall building parts lodged inline (reinstates dropped fix)
Task b9fcd354-2a33-4fc4-a64e-388c060a055c (portfolio 824 / scenario 1278)
still failed 5 of 128 batches with NotNullViolation on
epc_building_part.construction_age_band even after the SAP-Schema-15.0
mapper landed (PR #1531). Cert 8169-6926-5310-0447-8996 (UPRN
100010344955, SAP-Schema-15.0) lodges a bare alternative-wall record
(wall_area/wall_construction/wall_insulation_type, no identifier, age
band, or floor dimensions) as a second sap_building_parts element rather
than under a distinct sap_alternative_wall_1 key. RdSapSchema17_1 (which
the 15.0/16.x reduced-field mappers delegate to) has no alt-wall slot to
route it to, so it persisted as a phantom building part with a null age
band.

_drop_building_parts_without_age_band already solved exactly this shape
of problem for lodging artifacts (ae81a81e), but that commit sits on
fix/drop-building-part-without-age-band, an unmerged branch that has
since drifted far behind main. Reinstating the same filter (fresh, not
cherry-picked) fixes both the original artifact case and this SAP-15
alt-wall case, since RdSapSchema17_1 has nowhere else to put it either
way.

Verified against all 174 properties across the task's originally-failing
batches: zero remaining null-age-band building parts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-10 11:34:17 +00:00
..
tests Drop phantom alternative-wall building parts lodged inline (reinstates dropped fix) 2026-07-10 11:34:17 +00:00
__init__.py fix broken imports and rename mapper class 2026-04-13 16:36:13 +00:00
epc.py feat(modelling): Epc.sap_lower_bound() — band → minimum SAP (#1160) 2026-06-03 12:50:40 +00:00
epc_codes.csv slice 8a: window physics and orientation aggregates 2026-05-16 15:32:45 +00:00
epc_property_data.py rename mains_gas to gas_connection_available 2026-07-01 10:50:58 +00:00
field_mappings.py Gate community-heated dwellings from HHRSH recommendation 🟥 2026-07-01 14:13:57 +00:00
historic_epc.py demo generated for use in address2uprn 2026-05-08 14:48:15 +00:00
historic_epc_matching.py Map shard rows to HistoricEpc field-by-field so every column is pyright-checked 🟩 2026-07-04 14:58:09 +00:00
mapper.py Drop phantom alternative-wall building parts lodged inline (reinstates dropped fix) 2026-07-10 11:34:17 +00:00