mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Golden cert 6035's residual (SAP -2 / PE +19.16 / CO2 +0.42t) was a real API-mapper bug, NOT lodged divergence (prior claim retracted). The API `room_in_roof_type_1` block lodges gable walls by length only (no height). The mapper carried just the scalar `gable_*_length_m`, and the cascade's `_part_geometry` gable formula silently drops height-less gables (needs a height) -> the whole A_RR shell `12.5√(A_RR_floor/1.5)` billed as roof at U_RR=2.30 instead of the §3.9.1(e) residual `A_RR − Σ gables`. On 6035 that over-counted roof by 22.78 m² × 2.30 = +52.4 W/K (roof 130.73 -> 78.33, matching the site-notes case-4 replica at 1e-4 — cross-mapper parity). RdSAP 10 §3.9.1(e) (PDF p.21): "the area of the room-in-roof gable walls ... is deducted from A_RR to give the residual roof area." Fix: route the Type 1 gables through `detailed_surfaces` (gable area = L × the §3.9.1 default RR storey height 2.45 m; gable_wall_type 0=Party->gable_wall U=0.25, 1=Exposed->gable_wall_external "as common wall" per Table 4 p.22) so the cascade's Detailed-RR residual fires — the same path the site-notes mapper already uses. Re-pinned golden residuals: - 6035: SAP -2 -> +0 (exact), PE +19.16 -> +1.84, CO2 +0.42 -> +0.01 - 0240: same fix applies (2 Party gables L=6.4); PE +5.80 -> +3.91, CO2 +0.32 -> +0.22, SAP integer unchanged Also corrected the stale "gable_wall_type 0 = external" schema comment (6035's Summary proves 0=Party, 1=Exposed) and added a strict UnmappedApiCode raise for unknown gable_wall_type codes. Suite: 2342 passed, 1 skipped. New code: 0 pyright errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| common.py | ||
| helpers.py | ||
| rdsap_schema_17_0.py | ||
| rdsap_schema_17_1.py | ||
| rdsap_schema_18_0.py | ||
| rdsap_schema_19_0.py | ||
| rdsap_schema_20_0_0.py | ||
| rdsap_schema_21_0_0.py | ||
| rdsap_schema_21_0_1.py | ||