Model/backend/documents_parser
Khalim Conn-Kowlessar ed8fdc6ae3 Slice S0380.83: Extractor + mapper recognise Exposed / Connected gable_type per RdSAP 10 §3.10
The Elmhurst Summary PDF §8.1 "Room(s) in Roof" per-surface table publishes the
gable-wall environment column with one of four values:

  Party                          → §8.1 party-wall row
  Sheltered                      → §8.1 sheltered external row
  Exposed                        → §8.1 exposed external row
  Connected (to heated space)    → §8.1 internal partition

Per RdSAP 10 §3.10 (PDF p.30-35) "Detailed Room-in-Roof" + Table 4 (p.22)
"Heat-loss surface variants":

  - Exposed gable wall → external wall at the lodged U-value
  - Sheltered gable wall → external wall at the lodged U-value
  - Party gable wall → party wall at U=0.25 (Table 4 row 2)
  - Connected gable wall → internal partition to heated space, NOT a
    heat-loss surface

The extractor was only capturing `gable_type ∈ {"Party", "Sheltered",
"Connected to heated space"}` — neither `"Exposed"` (every external gable
on cert 000565) nor the plain `"Connected"` string (the actual PDF
lodging value, vs the verbose "Connected to heated space" form used on
other Summary schemas) was recognised. Both fell through with
`gable_type=None`, masking the downstream cascade gap (cert 000565
BP[0] Main Gable Wall 1 is lodged "Exposed" at U=0.35 but extracted
as untyped → mapper routes to `gable_wall` party at U=0.25, vs the
worksheet's "Roof room Main Gable Wall 1" at U=0.35).

This slice closes the extractor side only:

  backend/documents_parser/elmhurst_extractor.py:_parse_rir_surface_row
  expands its `gable_type` lookup set to include "Exposed" and the
  plain "Connected" lodging value.

Mapper-side: `_map_elmhurst_rir_surface` (datatypes/epc/domain/mapper.py)
preserves cert 9501's behaviour — its flat-RR elif previously hinged
on `surface.gable_type is None and is_flat`; now extends to
`surface.gable_type in (None, "Exposed") and is_flat` so the same
flat-RR routing fires whichever lodging shape the Summary PDF uses.

Net cascade impact: zero. Cert 9501 (top-floor flat) retains its
RR-gables-as-external routing. Cert 000565 (house) keeps falling
through to the default `gable_wall` (party at U=0.25) routing for
"Exposed" + "Connected" gables — the next slice in the block reroutes
those to external walls + drops Connected surfaces per RdSAP 10
Table 4. This commit is pure data-extraction completion; pin
movement lands when S0380.84 wires the mapper through.

Test baseline: 555 pass + 8 expected `test_sap_result_pin[000565-*]`
fails (was 554 + 8 at S0380.82; one new test pins the spec rule).
Pyright net-zero on touched files (45 errors, matches baseline).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 23:00:31 +00:00
..
handler address JTK review comments 2026-04-20 15:11:17 +00:00
tests Slice S0380.83: Extractor + mapper recognise Exposed / Connected gable_type per RdSAP 10 §3.10 2026-05-29 23:00:31 +00:00
__init__.py Map to RdSapSiteNotes from site notes JSON 🟥 2026-04-16 13:54:03 +00:00
db_writer.py include updating epc_property_data to pashub to ara workflow 2026-04-29 09:55:14 +00:00
elmhurst_extractor.py Slice S0380.83: Extractor + mapper recognise Exposed / Connected gable_type per RdSAP 10 §3.10 2026-05-29 23:00:31 +00:00
extractor.py Handle wall thickness "Unmeasurable" 🟩 2026-04-30 16:41:16 +00:00
local_runner.py update local runner to work for elmhurst 2026-04-24 14:01:36 +00:00
parser.py load ecmk site notes to db 2026-04-29 11:20:47 +00:00
pdf.py update local runner to work for elmhurst 2026-04-24 14:01:36 +00:00