Commit graph

994 commits

Author SHA1 Message Date
Jun-te Kim
3718743801 Carry the EPC certificate number through address2uprn to property
EpcClientService.search_by_postcode already returns the matched
certificate number alongside the UPRN, but it was dropped before
persistence. Thread it through get_epc_data_with_postcode ->
get_uprn_with_epc_df / get_uprn_from_historic_epc (using the historic
dataset's lmk_key) -> the address2uprn_certificate_number result
column -> PropertyIdentityInsert -> the property table's new
certificate_number column (assessment-model PR #362).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 13:26:49 +00:00
Jun-te Kim
bc1cca77db
Merge pull request #1356 from Hestia-Homes/feature/historic-epc-repository
Historic EPC repository: DDD port + resolver for address→UPRN
2026-07-07 10:56:33 +01:00
Daniel Roth
a5868cc2e0 One AbriOrchestrator runs every Abri flow for a deal 🟪
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 16:26:48 +00:00
Daniel Roth
7e5dc1722e A rate-limited HubSpot write is retried before succeeding 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:59:27 +00:00
Daniel Roth
350a76f942 A failed HubSpot write raises a scrubbed error carrying the orphaned job_no 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:57:16 +00:00
Daniel Roth
b847fa2f4c Transport and parse failures propagate with nothing recorded 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:55:38 +00:00
Daniel Roth
ddfbbd0052 An OpenHousing rejection is surfaced verbatim with nothing recorded 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:54:58 +00:00
Daniel Roth
6912dabf22 A logged job's job_no is written to HubSpot and then the deal database 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:52:35 +00:00
Daniel Roth
98674ae895 Log an OpenHousing job from a confirmed survey booking's deal fields 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:50:07 +00:00
Daniel Roth
6335796d6e
Merge pull request #1471 from Hestia-Homes/feature/abri-api-integration
Abri OpenHousing DomnaRelay — GetTenantData vertical (tenancy signatories to HubSpot)
2026-07-06 16:15:36 +01:00
Daniel Roth
06354a166e Phone-number selection policy lives in the domain layer 🟪
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:47:37 +00:00
Daniel Roth
76896f9a8e rename tenant data sync to abri tenant data sync 2026-07-06 14:05:42 +00:00
Daniel Roth
578de8845a Tenant-data fixtures carry fictional names and Ofcom-reserved phone numbers 🟪
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:02:38 +00:00
Daniel Roth
8fd808ffd9 HubSpot deal-contacts transport lives under infrastructure like the other API clients 🟪
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:01:47 +00:00
Daniel Roth
8d684c57c7 Transient HubSpot failures are retried under the shared rate-limit policy 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:36:43 +00:00
Daniel Roth
065217f8af A failed HubSpot write stops the sync and reports the orphaned contacts 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:35:20 +00:00
Daniel Roth
2e19085875 HubSpot failures surface without the response body that echoes tenant PII 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:33:42 +00:00
Daniel Roth
203ffac01f Empty tenancies, Abri rejections and ambiguous responses resolve like the other relay operations 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:31:55 +00:00
Daniel Roth
d4bdbf2e2f Tenant vulnerabilities are recorded on the tenant's own contact 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:30:22 +00:00
Daniel Roth
10636c1752 Runner-up number fills the contact's secondary phone number 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:28:56 +00:00
Daniel Roth
1d3219ca60 Contact carries the best-priority mobile and landline Abri lists 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:27:39 +00:00
Daniel Roth
01e61a6275 Each tenancy signatory gets its own deal contact, with blank fields omitted 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:27:04 +00:00
Daniel Roth
0ef1687bd7 Relay receives the spec's recorded getSCSTenantData envelope 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:26:07 +00:00
Daniel Roth
78fcba45e5 Abri tenancy signatory becomes an associated HubSpot deal contact 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:22:52 +00:00
Khalim Conn-Kowlessar
71bdd080c0 Expired-pairs integration gate: frozen single-file corpus + ratcheting floors 🟩
30 pairs (28 deterministically scoreable) from the 2,000-postcode sweep,
frozen as ONE anonymised raw-payload JSON (pairs + cohorts + actuals — a
thousand per-cert files would drown the PR diff). The gate replays the
whole conditioning path offline — mapper, conditioning, selection,
synthesis, comparison — in ~9s; floors are the measured values, tighten-
only. comparable_from_payload is extracted from the corpus loader so both
fixture formats share one payload->ComparableProperty path; the builder
(build_expired_pairs_corpus.py) refreezes from the raw-JSON disk cache.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 13:05:18 +00:00
Khalim Conn-Kowlessar
817c00720e The historic roof description conditions the cohort by form family 🟩
roof_construction codes group by FORM (empirical: 1=Flat 98%, 4/5/8=
Pitched 88-99%, 3=dwelling-above 100% over 7,974 certs; 7/9=premises-
above per #1452), so the filter matches families — an exact-code filter
would wrongly drop pitched neighbours lodged as 5/8. Historic prefixes
map to the same families; roof rooms and thatch stay unconditioned.
Harness ladder replay and telemetry mirror the new filter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 12:05:56 +00:00
Khalim Conn-Kowlessar
49c9f8181c The historic roof description conditions the cohort by form family 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 11:50:45 +00:00
Jun-te Kim
c238a0e6a0
Merge pull request #1449 from Hestia-Homes/feat/sap-corpus-campaign
fix(rdsap): RdSAP 10 Table 13 200/280mm solid-brick wall boundary
2026-07-06 12:25:17 +01:00
KhalimCK
180863ed41
Merge pull request #1456 from Hestia-Homes/fix/electric-boiler-cpsu-companions
Electric boiler/CPSU overrides drag category 2 and the conservative Group 1 control (#1444 A+B for 191/192)
2026-07-06 12:07:25 +01:00
Khalim Conn-Kowlessar
355c1e7d2f Age band conditions within one band; the floor-area band widens to ±20% 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 11:06:45 +00:00
Khalim Conn-Kowlessar
c79cd777e5 Legacy register fuel descriptions resolve to modern main_fuel codes 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 10:03:09 +00:00
Khalim Conn-Kowlessar
ee5bb6c4f2 Pairs harness telemetry: filter engagement + historic-vs-new agreement 🟩
Per pair, replay the age->fuel->TFA conditioning ladder over the plain
arm's cohort to record ENGAGED vs RELAXED per filter, and record whether
each historic stable attribute still agrees with the newly lodged cert
(the direct staleness measurement). Emitted as JSONL (--telemetry) and
aggregated into two diagnosis tables appended to the report.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 09:24:46 +00:00
Khalim Conn-Kowlessar
1d83637afa Pairs harness reports the full Component Accuracy suite per arm 🟩
Classification hit-rates for every compare_prediction component, all five
numeric residuals, and the secondary calculator-floored SAP residual
(calc(predicted) − lodged), plain vs conditioned side by side — the same
metric shape as the prediction-corpus gate (ADR-0030). Pair-check now
precedes the cohort fetch so a national postcode sweep only pays the
expensive search-by-postcode for shards that actually hold a pair.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 09:05:59 +00:00
Khalim Conn-Kowlessar
d9576db429 Pairs harness: score plain vs historic-conditioned prediction per attribute 🟩
Finds pre-2012 (S3 backup) x SAP-10.2 (new API) cert pairs per postcode,
predicts each from its leave-one-out cohort with and without ADR-0054
conditioning, and reports compare_prediction hit rates side by side.
Evidence for the stable-attribute whitelist, not a CI gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 08:46:16 +00:00
Khalim Conn-Kowlessar
9e1c1b71a4 An expired historic cert conditions ingestion's prediction and labels it 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 08:34:54 +00:00
Khalim Conn-Kowlessar
f32b0d8405 An expired-source EPC occupies the predicted slot without stranding rows 🟩
EpcSource widens to "expired" (ADR-0054; the column is TEXT — no
migration). "predicted"/"expired" form one slot family: _slot_sources
routes every slot read and slot-clearing delete through the family, so a
re-ingestion flipping the flavour replaces the row instead of stranding
its sibling. FakeEpcRepo mirrors the family.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 08:33:16 +00:00
Khalim Conn-Kowlessar
592f924761 An expired-source EPC occupies the predicted slot without stranding rows 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 08:28:40 +00:00
Khalim Conn-Kowlessar
248aa5ad6a Historic stable attributes condition cohort selection on the relax ladder 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 08:24:36 +00:00
Khalim Conn-Kowlessar
992950bd9f Resolve a historic EPC's stable attributes into cohort code spaces 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 08:21:41 +00:00
Khalim Conn-Kowlessar
ece4b736d9 A re-lodged UPRN resolves to its latest historic certificate 🟩
Pins behaviour the exact-match slice already carried (max by
lodgement_date; ISO dates sort lexicographically).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 08:18:41 +00:00
Khalim Conn-Kowlessar
4bbcdb6a61 Resolve a UPRN to its historic EPC record by exact match 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 08:17:07 +00:00
Daniel Roth
b2754baa04
Merge pull request #1463 from Hestia-Homes/feature/abri-api-integration
Abri OpenHousing DomnaRelay — Amend Appointment vertical (amendoptiappt)
2026-07-06 09:08:00 +01:00
Khalim Conn-Kowlessar
55284a1807 A shard with an unexpected extra column still maps to HistoricEpc 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 14:43:47 +00:00
Khalim Conn-Kowlessar
ab245de68d Merge remote-tracking branch 'origin/main' into feature/historic-epc-repository 2026-07-04 11:19:59 +00:00
KhalimCK
6dfaecc352
Merge pull request #1460 from Hestia-Homes/fix/table-12a-underfloor-rows
Electric underfloor codes resolve their Table 12a Grid 1 rows (ADR-0050 deferred follow-up)
2026-07-03 17:53:59 +01:00
KhalimCK
adcdce4271
Merge pull request #1462 from Hestia-Homes/fix/floor-u-value-gate
Floor insulation gated on the derived floor U-value (ADR-0051 floor arm)
2026-07-03 17:53:34 +01:00
Khalim Conn-Kowlessar
04810896e0 A community override keeps an assessor-observed Group 3 control 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 16:33:40 +00:00
Khalim Conn-Kowlessar
2bfda711d8 Community-heating overrides default to Group 3 control 2313 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 16:32:15 +00:00
Daniel Roth
05bd22269d Abri amend_job raises retriable transport errors when the amendment outcome is unknown 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 16:23:53 +00:00
Daniel Roth
65ec38012b Abri amend_job treats an unconfirmed amendment response as retriable 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 16:22:49 +00:00