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> |
||
|---|---|---|
| .. | ||
| modelling | ||
| __init__.py | ||
| bulk_address_upload_table.py | ||
| config.py | ||
| engine.py | ||
| epc_property_table.py | ||
| landlord_built_form_type_override_table.py | ||
| landlord_construction_age_band_override_table.py | ||
| landlord_glazing_override_table.py | ||
| landlord_main_fuel_override_table.py | ||
| landlord_main_heating_system_override_table.py | ||
| landlord_override_enums.py | ||
| landlord_property_type_override_table.py | ||
| landlord_roof_type_override_table.py | ||
| landlord_wall_type_override_table.py | ||
| landlord_water_heating_override_table.py | ||
| magic_plan_tables.py | ||
| product_table.py | ||
| property_baseline_performance_table.py | ||
| property_details_spatial_table.py | ||
| property_override_table.py | ||
| property_table.py | ||
| solar_table.py | ||
| subtask_table.py | ||
| task_table.py | ||
| uploaded_file_table.py | ||