Keep a PasHub system-build wall off the basement cascade 🟩

PasHub surveys never lodge a basement wall, but "System Build (i.e Any
Other)" maps to wall code 6 — the gov-API basement sentinel — and with
wall_is_basement left None the dwelling silently routed through the basement
wall/floor U-value cascade (issue #1590 bug 7). Both part builders now pin
the flag False. Harness MAE 1.732 -> 1.727.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-14 21:56:27 +00:00
parent 5980b2d6ed
commit 895df42afe
2 changed files with 11 additions and 0 deletions

View file

@ -5990,6 +5990,11 @@ def _map_main_building_part(
return SapBuildingPart(
identifier=BuildingPartIdentifier.MAIN,
construction_age_band=_extract_age_band(main.age_range),
# PasHub surveys never lodge a basement wall; pin the flag so a
# "System Build" wall (code 6, which doubles as the gov-API basement
# sentinel) is not silently routed through the basement wall/floor
# cascade (issue #1590 bug 7).
wall_is_basement=False,
wall_construction=_pashub_wall_construction_int(
main.walls_construction_type
),
@ -6021,6 +6026,11 @@ def _map_extension_building_part(
return SapBuildingPart(
identifier=BuildingPartIdentifier.extension(ext_c.id),
construction_age_band=_extract_age_band(ext_c.age_range),
# PasHub surveys never lodge a basement wall; pin the flag so a
# "System Build" wall (code 6, which doubles as the gov-API basement
# sentinel) is not silently routed through the basement wall/floor
# cascade (issue #1590 bug 7).
wall_is_basement=False,
wall_construction=_pashub_wall_construction_int(
ext_c.walls_construction_type
),

View file

@ -1145,6 +1145,7 @@ class TestFromSiteNotesExample1:
SapBuildingPart(
identifier=BuildingPartIdentifier.MAIN,
construction_age_band="I",
wall_is_basement=False, # PasHub never lodges a basement wall
wall_construction=4, # "Cavity" → SAP10 code 4 (WALL_CAVITY)
wall_insulation_type=4, # "As built" → SAP10 code 4 (as built/assumed)
wall_thickness_measured=True,