Model/domain
Khalim Conn-Kowlessar 26857f8df7 Bulk download: match uploaded_files via hubspot_deal_id bridge + add worker observability
A live test returned 'no documents could be packaged' for 91 correctly-resolved
properties. Root cause: no upload source populates uploaded_files.landlord_property_id
(pashub/magic-plan/audit set hubspot_deal_id; ECMK sets hubspot_listing_id), so
matching on landlord_property_id found zero rows.

Match fix: the worker now joins uploaded_files -> hubspot_deal_data (on deal_id) ->
landlord_property_id, taking the property identity from the bridge. The repository
returns a small PropertyDocument read-model instead of the infra ORM row, so the
orchestrator no longer names infrastructure.postgres.* (resolves the leak dancafc
flagged) and the s3_upload_timestamp cast is gone. Coverage is limited to
deal-id-linked sources; listing_id/uprn-only files are a noted follow-up.

Observability: the empty-selection failure now carries stage counts
(selected/matched/planned/skipped) in both the message (-> the worker WARNING log)
and details (-> sub_task.outputs), and the run logs those counts. The next failure
says 'matched 0 documents' instead of failing opaquely.

ADR-0060 + CONTEXT.md updated (matching decision + considered options).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 13:58:46 +00:00
..
abri Date an abandonment to the deal's own dates, not now() 🟩 2026-07-08 08:51:39 +00:00
addresses Both postcode batchers share one group-preserving packing core 🟪 2026-07-07 13:24:02 +00:00
billing Route an off-peak meter's electric end uses to the day/night carrier 🟩 2026-06-24 17:38:37 +00:00
bulk_document_download Bulk download: match uploaded_files via hubspot_deal_id bridge + add worker observability 2026-07-08 13:58:46 +00:00
data_transformation Let a deterministic guard override the fallback classifier per description 🟩 2026-07-01 09:39:50 +00:00
elmhurst more examples 2026-06-19 09:51:49 +00:00
epc A community override keeps an assessor-observed Group 3 control 🟩 2026-07-03 16:35:08 +00:00
epc_prediction The historic roof description conditions the cohort by form family 🟩 2026-07-06 12:05:56 +00:00
fuel_rates Expose an off-peak meter's standing charge and full day/night blend range 🟩 2026-06-24 17:14:51 +00:00
geospatial feat(geospatial): one-read spatial reference (coords + restrictions) 2026-06-04 17:13:39 +00:00
magicplan Mapper reads 'Individual Trickle Vent' label variant 🟩 2026-06-30 13:44:38 +00:00
modelling A small roof derives Sub-Ladder rungs below Google's smallest config 🟪 2026-07-07 22:10:37 +00:00
property feat: thread physical-state-change signal into rebaselining 🟩 2026-06-26 19:15:11 +00:00
property_baseline Persist no Lodged Performance for a predicted Property 🟩 2026-06-30 22:10:57 +00:00
sap10_calculator Electric underfloor codes resolve their SAP 10.2 Table 12a Grid 1 rows 🟩 2026-07-03 16:00:40 +00:00
sap10_ml fix(rdsap): RdSAP 10 Table 13 200/280mm solid-brick wall boundary 2026-07-03 12:25:07 +00:00
tasks A recorded batch failure carries structured details onto the sub_task outputs 🟩 2026-07-07 11:50:10 +00:00
building_geometry.py feat(modelling): floor Recommendation Generator + ground-floor-area geometry 2026-06-03 09:12:29 +00:00
postcode.py Add UK-postcode format validity to the Postcode value object 🟩 2026-06-29 15:24:18 +00:00