Model/backend/documents_parser/tests
Khalim Conn-Kowlessar 06b4ef3d12 Slice 102f-prep.9: RdSAP cantilever exposed-floor detection (closes cert 2636)
RdSAP "first floor over passageway" rule — when an upper storey has
larger floor area than the storey immediately below, the excess
overhangs an unheated space or external air and routes through
Table 20's U_exposed_floor (1.20 W/m²K for age-D + no insulation,
the modal cohort lodging).

Cohort ground-truth: cert 2636 BP0 floor 1 (42.92 m²) − floor 0
(39.18 m²) = 3.74 m². Worksheet (28b) "Exposed floor Main: 3.74 ×
1.20 = 4.4880" matches the spec rule exactly.

`_part_geometry` now computes `cantilever_floor_area_m2` per BP.
The per-BP loop in `heat_transmission_from_cert` injects U×A onto
the floor accumulator and includes the area in (31) total external
area (which feeds (36) thermal bridges).

Gated to avoid false positives on flats and sub-ground multi-storey
shapes:
  - `property_type == "0"` (house) — excludes flats (cert 9501 BP0
    has 6.85 m² floor 0 + 74.43 m² floor 1; the diff is stairwell
    access, not a real cantilever).
  - `excess >= 1 m²` — excludes 2-dp rounding artefacts (cert 001479
    Main BP0 lodges floor 1 = 30.77 vs floor 0 = 30.45 → 0.32 m²
    drift that's not a real cantilever; would otherwise add 0.4
    W/K and break the closed-cert 1e-4 Layer 4 chain gate).
  - `excess / prev_area < 0.25` — excludes sub-ground / partial-
    storey shapes (cert 7536 BP0: 33.7/17.28 = 195% — not a real
    cantilever; floor 0 likely a partial vestibule, not the full
    ground footprint).

Cohort impact: cert 2636 SAP residual closes from +0.4873 → -0.0055
(by far the largest cohort outlier becomes the closest match).
Zero regressions: 654 pass + 10 pre-existing baseline fails (9 cert
001479 hand-built skeleton + 1 FEE). All 7 ASHP certs now cluster
within ±0.06 SAP vs worksheet.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 16:31:24 +00:00
..
fixtures chore: stage cert 9501 fixtures (second boiler validation cert) 2026-05-26 18:53:08 +00:00
__init__.py Map to RdSapSiteNotes from site notes JSON 🟥 2026-04-16 13:54:03 +00:00
test_elmhurst_end_to_end.py fix: address 22 project-wide test failures from previous sweep 2026-05-26 13:34:51 +00:00
test_elmhurst_extractor.py extract window frame details from elmhurst site notes 🟥 2026-04-27 15:50:25 +00:00
test_end_to_end.py P6.1 follow-on: unbox BuildingPartIdentifier at backend boundaries 2026-05-20 09:58:23 +00:00
test_extractor.py Handle wall thickness "Unmeasurable" 🟩 2026-04-30 16:41:16 +00:00
test_pdf.py rename example site notes to PasHub_ and add Elmhurst example 2026-04-24 13:01:51 +00:00
test_summary_pdf_mapper_chain.py Slice 102f-prep.9: RdSAP cantilever exposed-floor detection (closes cert 2636) 2026-05-27 16:31:24 +00:00