Model/deployment/terraform/lambda
Jun-te Kim f0f9c8d8d7 feat(terraform): point modelling_e2e at the historic-EPC backup (ADR-0054)
Sets HISTORIC_EPC_S3_ROOT, the env var the handler reads to build the historic-EPC
reader. With it set, an EPC-less Property whose expired pre-2012 certificate is in
the backup has its prediction conditioned on that certificate and persisted as
source="expired" rather than "predicted" — which is what lets reporting tell "no EPC
at all" apart from "only an expired one".

The bucket comes from the shared remote state rather than a rebuilt string:
`retrofit_sap_data_bucket_name` is — despite the name — the retrofit-data-<stage>
bucket (shared/main.tf:167), and engine and fast-api already read it from that output.
modelling_e2e was the outlier hardcoding "retrofit-data-${var.stage}".

No IAM change: modelling_e2e_s3_read already grants GetObject + ListBucket across the
whole retrofit-data-<stage> bucket, which covers historical_epc/.

Note this makes 'expired' rows start appearing once deployed. assessment-model's
epcSources.ts joins only 'lodged' and 'predicted', so until it addresses the predicted
slot — source IN ('predicted','expired') — an 'expired' row matches neither and the
home drops out of both the "Homes Without an EPC" and "Expired EPCs" cards.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 12:08:29 +00:00
..
_template added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
abri_api abri_api not abri 2026-07-07 14:40:33 +00:00
address2UPRN added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
audit_generator add missing variable to lambda variables 2026-06-09 15:33:35 +00:00
bulk_address2uprn_combiner added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
bulk_document_download Terraform + CI for bulk_document_download: exports bucket, 10GB /tmp, SES SMTP, wiring 🟩 2026-07-08 10:03:50 +00:00
bulkUploadFinaliser tests files 2026-06-04 11:47:42 +00:00
categorisation added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
condition-etl added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
ecmk_to_ara added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
engine added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
fast-api Terraform + CI for bulk_document_download: exports bucket, 10GB /tmp, SES SMTP, wiring 🟩 2026-07-08 10:03:50 +00:00
hubspot_deal_etl correct reference to abri api tf state bucket in hubspot etl lambda 2026-07-08 13:14:07 +00:00
landlordDescriptionOverrides added landlord description overrides 2026-05-29 12:12:54 +00:00
magic_plan rename database environment variables 2026-06-05 16:04:33 +00:00
modelling_e2e feat(terraform): point modelling_e2e at the historic-EPC backup (ADR-0054) 2026-07-14 12:08:29 +00:00
ordnanceSurvey added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
pashub_to_ara increase pashub fetcher timeout to 5 mins 2026-06-04 15:12:29 +00:00
postcodeSplitter actually deploy postcode splitter 2026-05-20 15:17:55 +00:00
sharepoint_renamer correct lambda name 2026-06-15 14:08:40 +00:00