mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
SapRoomInRoof.detailed_surfaces (+ the gable/common-wall scalars) had no columns, so 107 corpus certs lost their whole §3.9/§3.10 room-in-roof geometry on the DB round-trip and fell back to the Simplified all-elements age-band default — worst case -15.21 SAP (#1665 / #1664). Add EpcRoomInRoofModel (0..1 per building part, unique FK) + EpcRoomInRoofSurface Model (0..n, surface_index order). Save nests via RETURNING (building part -> RIR -> surfaces); delete clears bottom-up (surfaces -> room_in_roof -> parts) since the FE FKs are ON DELETE no action; both read paths group + reconstruct in a new _to_room_in_roof / _to_rir_surface, replacing the two-field flat rebuild in _to_building_part. The flat room_in_roof_* columns on epc_building_part are superseded and dropped in a follow-up (#1664). Nullable is preserved on insulation_thickness_mm / u_value (null vs 0 is the Table 17-vs-18 branch); area is unconstrained (a §3.9.2 absent-gable adjustment is signed). Drop the 8 _UNPERSISTED_ALLOWLIST entries. Verified: worst RIR cert 10012119141 round-trip -15.21 -> 0.0000 with detailed_surfaces at deep equality. Companion FE migration: assessment-model#443 (epc_room_in_roof + epc_room_in_roof_surface). Deploy gate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| abri | ||
| chatgpt | ||
| epc_client | ||
| hubspot | ||
| landlord_overrides | ||
| magic_plan | ||
| openai | ||
| pashub_fetcher | ||
| postcodes_io | ||
| postgres | ||
| s3 | ||
| solar | ||
| __init__.py | ||
| address2uprn_queue_client.py | ||
| http_retry.py | ||
| sqs_client.py | ||