Commit graph

7588 commits

Author SHA1 Message Date
Khalim Conn-Kowlessar
fb3516ee95 Floor insulation is withheld when it cannot lower the derived floor U 🟩
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 16:06:45 +00:00
Khalim Conn-Kowlessar
128981289a Floor insulation is withheld when it cannot lower the derived floor U 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 16:05:04 +00:00
Jun-te Kim
838668bfdb
Merge pull request #1451 from Hestia-Homes/fix/sap-heating-optional-air-conditioning
Make nested SapHeating.has_fixed_air_conditioning optional across all RdSAP schemas
2026-07-03 16:34:27 +01:00
Jun-te Kim
6172f5d30d
Merge pull request #1452 from Hestia-Homes/fix/roof-construction-another-premises-above
Map API roof_construction code 9 ("another premises above") to None
2026-07-03 16:34:15 +01:00
Jun-te Kim
d769f4488a Suppress roof heat loss for API roof_construction codes 7 and 9
RdSAP 10 Specification (10-06-2025) §5.2.5: "If a dwelling or part of a
dwelling has commercial premises above record as another dwelling
above" — so code 9 ("another premises above") must get the same
zero-heat-loss treatment as code 7 ("another dwelling above"), per the
spec's own "there is no heat loss through the roof of a building part
that has the same dwelling above or another dwelling above."

The previous fix mapped both to None, which only avoided the mapper
crash — it didn't achieve zero heat loss. heat_transmission.py's
per-part suppression (part_roof_is_party) only fires when
roof_construction_type CONTAINS the literal string "another dwelling
above"; that string was only ever set on the Elmhurst ingestion path.
The API path mapped 7 (and, until now, 9) to None, so the suppression
never fired for any API-derived cert — has_exposed_roof (the
dwelling_type-label-only fallback) was the sole gate, with no way to
know about a per-part party-ceiling lodgement. Both codes now map to
"(another dwelling above)" so the existing suppression logic fires on
both ingestion paths, matching what
domain/epc/property_overrides/roof_party_ceiling_guard.py already does
independently for the landlord-override pipeline (same spec citation).

Verified against the motivating cert (uprn 10013320122): roof_w_per_k
now correctly computes to 0.0. Full RdSAP-21.0.1 corpus (1000 certs)
re-run: within-0.5 unchanged at 77.8%, MAE improves marginally
(0.6364 vs 0.637 ceiling) — no regression.
2026-07-03 14:44:01 +00:00
Daniel Roth
41d46e3910
Merge pull request #1454 from Hestia-Homes/feature/extend-sharepoint-renamer
Extend sharepoint renamer to work for batch subfolders
2026-07-03 14:48:07 +01:00
Daniel Roth
7852928181 delete test data file 2026-07-03 13:38:09 +00:00
Daniel Roth
0c3fbe5853 rename dodgy address 2026-07-03 13:37:58 +00:00
Jun-te Kim
71b970a697 Map API roof_construction code 9 ("another premises above") to None
Same party-ceiling semantics as the already-mapped code 7 ("another
dwelling above" / "same dwelling above") — the unit has no exposed
roof, so there's nothing for the cascade to compute a U-value for.
Confirmed against the live cert (uprn 10013320122): roofs[].description
= "(another premises above)", roof_insulation_location = "ND" (the
codebase's established "no exposed roof" signal).

Surfaced by 1 failed modelling_e2e subtask on portfolio 817
(task_source='modelling_e2e', job_completed > '2026-07-03 12:50:37.555+01:00').
2026-07-03 13:24:10 +00:00
Jun-te Kim
1144b1e7b1 Make nested SapHeating.has_fixed_air_conditioning optional across all RdSAP schemas
Some lodged certs omit the sap_heating.has_fixed_air_conditioning key,
which the generic from_dict loader treats as a required field and
rejects outright. Two prior commits (26651ca71, 8074f4152) fixed the
duplicate top-level field of the same name but left this nested copy
untouched; a third pass (44991bed0) missed it too. The mapper already
reads it defensively (== "true", which is False on None), so this is
a safe default.

Surfaced by 7 failed modelling_e2e subtasks on portfolio 817.
2026-07-03 13:09:17 +00:00
Jun-te Kim
f629b42bd2
Merge pull request #1448 from Hestia-Homes/fix/full-sap-export-capable-mapping
Full-SAP certs carry their lodged PV export-capability flag (WS3 of #1435)
2026-07-03 13:32:53 +01:00
Jun-te Kim
23ebd5e637
Merge pull request #1446 from Hestia-Homes/fix/ashp-size-to-dwelling-heat-loss
Size the ASHP to the dwelling's design heat loss (fix undersized fixed pump scoring below baseline)
2026-07-03 13:32:30 +01:00
Daniel Roth
dc188ca3c5 SharePoint 404s raise ResourceNotFoundError without error-level logging 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 12:26:33 +00:00
Khalim Conn-Kowlessar
4fcd23455b The multi-measure trigger fixture is a cert the sized ASHP alone cannot clear 🟩
Golden cert 0330 now reaches band C on the dwelling-sized ASHP alone
(ADR-0049), dropping its solid_floor_insulation companion; cert 0390
still fires three measures, so the per-measure trigger-attribute
assertions move there (and gain the lighting triggers).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 12:25:03 +00:00
Daniel Roth
4a71c555fa SharePoint 404s raise ResourceNotFoundError without error-level logging 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 12:22:26 +00:00
KhalimCK
ebca28f704
Merge pull request #1447 from Hestia-Homes/fix/electric-underfloor-pathway-and-noop-walls
Electric underfloor gets its heating pathway; wall insulation gated on derived U (WS2 of #1435)
2026-07-03 13:17:36 +01:00
Daniel Roth
87ac00d499 Correct St Helier Avenue spelling to match SharePoint folder names
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 12:14:46 +00:00
Khalim Conn-Kowlessar
325c0ea257 Merge remote-tracking branch 'origin/main' into fix/full-sap-export-capable-mapping 2026-07-03 12:11:25 +00:00
Daniel Roth
e533316771 UPRN-prefixed property folders rename to a single-UPRN filename 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 12:09:32 +00:00
Khalim Conn-Kowlessar
c5b55197b4 Full-SAP certs carry their lodged PV export-capability flag 🟩
`from_sap_schema_17_1` hardcoded is_dwelling_export_capable=False, so
SAP 10.2 Appendix M1 zeroed the PV export credit on every export-capable
full-SAP cert. Cert 0380-3044-6070-2305-5925 (property 741840, PRD #1435
WS3) now reproduces its lodged 92 exactly (was 89); the existing
19.1.0 pin 10096028301 closes its documented -1 residual (84 -> 85 =
lodged). The full-SAP top-level pv_connection is deliberately NOT
carried: its enum disagrees with the RdSAP one the calculator gates on.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 12:09:04 +00:00
Daniel Roth
787f7731b2 UPRN-prefixed property folders rename to a single-UPRN filename 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 12:09:02 +00:00
Khalim Conn-Kowlessar
6656d8dec2 A full-SAP export-capable PV cert reproduces its lodged SAP 10.2 score 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 12:05:04 +00:00
Daniel Roth
781251eb07 updated address list 2026-07-03 11:59:01 +00:00
Jun-te Kim
5c510e1b15
Merge pull request #1439 from Hestia-Homes/feat/sap-corpus-campaign
test(accuracy): corpus-1000 — 74.2% → 77.7% within-0.5, MAE 0.721 → 0.637 (8 fixes; mapper+calc validated vs Elmhurst)
2026-07-03 12:52:57 +01:00
Khalim Conn-Kowlessar
bc39030707 The e2e candidate menu is generated from the Effective EPC, not the lodged cert 🟩
The printed "candidate measures considered" now matches what the
orchestrator actually offered — on 711795 the lodged cavity wall printed
a cavity-fill candidate the plan (timber-frame effective wall) never saw.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:42:29 +00:00
Khalim Conn-Kowlessar
da4aec9840 Treatable old-band solid walls keep their EWI and IWI options under the gate 🟩
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:41:56 +00:00
Khalim Conn-Kowlessar
7a039d30bc Cavity fill is withheld when it cannot lower the derived wall U 🟩
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:41:33 +00:00
Khalim Conn-Kowlessar
5f74c34f9a Cavity fill is withheld when it cannot lower the derived wall U 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:41:02 +00:00
Khalim Conn-Kowlessar
7c8b161653 Solid-wall insulation is withheld when it cannot lower the derived wall U 🟩
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:40:41 +00:00
Khalim Conn-Kowlessar
574e58a5c8 Solid-wall insulation is withheld when it cannot lower the derived wall U 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:39:32 +00:00
Khalim Conn-Kowlessar
573588d4e7 Underfloor overrides no longer log an incomplete companion set 🟩
Regression guard: category 8 + control 2701 keep the ADR-0048 coherence
invariant satisfied for SAP codes 421/422/424.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:37:57 +00:00
Khalim Conn-Kowlessar
07362b357a Electric underfloor override drags the conservative Group 7 control (2701) 🟩
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:37:19 +00:00
Khalim Conn-Kowlessar
566374bf34 Electric underfloor override drags the conservative Group 7 control (2701) 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:36:51 +00:00
Khalim Conn-Kowlessar
57e899e8d9 Electric underfloor override stamps the Table 4a underfloor category (8) 🟩
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:36:30 +00:00
Khalim Conn-Kowlessar
51fa497793 Electric underfloor override stamps the Table 4a underfloor category (8) 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:35:55 +00:00
Khalim Conn-Kowlessar
e110dd0746 Record ADR-0050 (underfloor override companions) and ADR-0051 (wall U-value gate) 🟪
WS2 of PRD #1435, diagnosed on property 711795: an electric-underfloor
override inherits the replaced community-heating category (no pathway,
baseline mis-rated 51 vs 67), and wall generators offer £4k insulation
that cannot change an age-band-L wall's derived U (0.280 → 0.280).
Glossary: Wall U-Value Gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:35:05 +00:00
Daniel Roth
46ed8bfe86 Renamer warns once per property only after all roots miss 🟪
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 11:19:34 +00:00
Daniel Roth
213cd92998 Renamer warns once per property only after all roots miss 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 11:18:42 +00:00
Daniel Roth
ce749061aa Renamer warns once per property only after all roots miss 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 11:18:10 +00:00
Daniel Roth
1196a8f75d Renamer finds properties filed under _Sero Batch roots 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 11:16:46 +00:00
Daniel Roth
ab8b8decb3 Renamer finds properties filed under _Sero Batch roots 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 11:15:50 +00:00
Daniel Roth
a442dcfbaa Renamer discovers _Sero Batch roots under Property Folders 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 11:13:39 +00:00
Daniel Roth
dcd2a7442f Renamer discovers _Sero Batch roots under Property Folders 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 11:12:59 +00:00
Khalim Conn-Kowlessar
ac2b600bbd Merge remote-tracking branch 'origin/main' into fix/ashp-size-to-dwelling-heat-loss 2026-07-03 11:02:42 +00:00
Khalim Conn-Kowlessar
30616dc427 Record ADR-0049: ASHP sized to the dwelling's design heat loss at the efficiency peak
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:02:13 +00:00
Khalim Conn-Kowlessar
bf240e3315 ASHP sizing targets the Appendix-N efficiency peak (realistic installed pump) 🟩
Sizing selects the aroTHERM plus rung nearest PSR ~0.8 (0.8 x design heat
loss) — the Appendix-N efficiency peak, reproducing the pump a real
installer fits — rather than the MCS PSR>=1.0 capacity target, which
oversizes. Validated against the relodged Elmhurst ASHP cert (delta 0
held at the 5 kW Vaillant); the two self-snapshot pins re-pin to their
correctly-sized larger pumps, and the orchestrator/harness thread the
calculator's design heat loss so production sizes to the dwelling. Manual
SapResult test stubs carry the new design_heat_loss_kw field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:02:13 +00:00
Daniel Roth
7abf466b56
Merge pull request #1445 from Hestia-Homes/feature/abri-api-integration
Abri deal abandonment check
2026-07-03 11:48:37 +01:00
Daniel Roth
1a5368571f add typehint 2026-07-03 10:46:24 +00:00
Khalim Conn-Kowlessar
cb91954bb4 The orchestrator threads the dwelling design heat loss into ASHP sizing 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 10:31:57 +00:00
Khalim Conn-Kowlessar
b25e7bb7f9 ASHP cost sizes to the threaded design heat loss over the floor-area proxy 🟩
_ashp_option threads its sized design heat loss into ashp_cost_inputs so
the cost band and the pump's efficiency record share one figure — a leaky
dwelling's larger pump is priced on the matching band.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 10:29:50 +00:00