Model/repositories
Khalim Conn-Kowlessar 91db972d48 Bulk download: readable email, deal-name folders, visible worker logs
First successful live run surfaced three issues:

1. Email looked rubbish (a giant raw presigned URL). Now sends a proper HTML
   email with a 'Download documents' button plus a plain-text fallback, and a
   summary (N documents across M properties, expiry). Email delivery is now
   best-effort: a transport failure no longer loses an already-built package
   (the link is still on sub_task.outputs), and the SMTP connect has a 30s
   timeout so an unreachable SES endpoint fails fast instead of hanging to the
   900s Lambda timeout.

2. Every folder was 'address unavailable (...)': the resolver read property.address,
   but these are HubSpot deals with no property row. It now uses the deal's
   dealname from hubspot_deal_data.

3. No logs / no idea why a run took ~9 minutes: the worker's INFO logs were
   dropped (Lambda root logger defaults to WARNING). The handler now raises the
   level, and the orchestrator logs per-phase timing and volume (gather+plan,
   packaged N files / X MB, upload, email, total) so the slow phase is visible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 15:02:38 +00:00
..
bulk_upload tests files 2026-06-04 11:47:42 +00:00
comparable_properties Merge remote-tracking branch 'origin/main' into feature/e2e-runs 2026-06-23 17:07:27 +00:00
email Bulk download: readable email, deal-name folders, visible worker logs 2026-07-08 15:02:38 +00:00
epc An expired-source EPC occupies the predicted slot without stranding rows 🟩 2026-07-06 08:33:16 +00:00
fuel_rates Load the off-peak day/night rate from the committed snapshot 🟩 2026-06-24 17:20:19 +00:00
geospatial feat(geospatial): batch coordinates_for_uprns lookup (#1227) 2026-06-15 14:35:32 +00:00
historic_epc refactor(address2uprn): name the match/decision return types; rename helper 2026-07-07 16:00:00 +00:00
hubspot_deals The deal row names the job number client_booking_reference, matching HubSpot and the schema 🟪 2026-07-07 12:43:40 +00:00
landlord_overrides property override 2026-06-05 12:18:13 +00:00
magic_plan correct imports in postgres repo 2026-06-09 14:25:29 +00:00
materials feat(first-run): FirstRunPipeline E2E — Ingestion → Baseline → Modelling (#1136) 2026-06-01 16:28:48 +00:00
plan Review nitpicks: pids_with_default naming, empty-batch guard, truthful fake 🟪 2026-07-07 16:44:23 +00:00
product Hold one DB connection per modelling_e2e invocation 2026-06-24 16:58:21 +00:00
property Bulk download: readable email, deal-name folders, visible worker logs 2026-07-08 15:02:38 +00:00
property_baseline refactor(property-baseline): rename baseline → property_baseline aggregate (PR #1139 review) 2026-06-01 16:28:48 +00:00
scenario refactor(modelling): consolidate scenario + installed_measure into the subpackage 2026-06-03 22:52:35 +00:00
solar perf(modelling_e2e): bulk reads and batch writes to cut RDS load 2026-06-24 18:43:42 +00:00
spatial feat(spatial): per-UPRN cache repo for the OS spatial reference 2026-06-04 17:15:51 +00:00
tasks perf(modelling_e2e): batch SubTask bookkeeping to stop per-property writes 2026-06-24 19:26:42 +00:00
unstandardised_address updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
uploaded_file Bulk download: match uploaded_files via hubspot_deal_id bridge + add worker observability 2026-07-08 13:58:46 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
postgres_unit_of_work.py Resolve overrides on the unit's own session, not a second connection 2026-06-24 17:01:41 +00:00
unit_of_work.py feat(repositories): expose the spatial cache repo on the Unit of Work 2026-06-04 17:20:39 +00:00