Model/scripts/hyde
Jun-te Kim 05e3a25d25 Sanitise millimetre-lodged full-SAP opening dimensions to metres
Some SAP-Schema-17.x/18.0.0 certs lodge sap_openings width/height in MILLIMETRES
mixed with metre rows in the same array (e.g. a 2025x2100 mm window beside a
3.06x1 m one). The 17.1 mapper read them all as metres → a 4.25M m2 window →
HTC in the millions → SAP clamped to 1.

Fix (TDD, datatypes/epc/domain/mapper.py): _sanitise_opening_dimension_m treats
any dimension > 50 m as mm and divides by 1000; _sap_opening_area_m2 applies it
to areas. Wired into the window, roof-window, and door-area-weighting paths.
The 3 broken certs (uprn_10093117227 / 10090317693 / 10091636031) now score
90 / 81 / 79 instead of 1.

3 RED->GREEN slices + refactor; new test class
TestFromSapSchema17_1OpeningUnitSanitisation + sap_17_1_mm_openings.json fixture;
0 new pyright errors; no regressions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 20:16:27 +00:00
..
elmhurst_dom Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00
autonomous_run_findings.md Sanitise millimetre-lodged full-SAP opening dimensions to metres 2026-06-16 20:16:27 +00:00
elmhurst_download.py Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00
elmhurst_explore.py Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00
elmhurst_fill.py Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00
elmhurst_lib.py Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00
elmhurst_README.md Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00
elmhurst_session.py Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00
full_sap_17_1_remapper_handoff.md Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00
main.py Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00
mapping_decisions.md Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00
perimeter_decision.md Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00
start_viewer.sh Checkpoint: UPRN 10093116543 Elmhurst build + devcontainer VNC/Playwright + perms 2026-06-16 15:21:56 +00:00