Model/tests
Jun-te Kim 0a04448217 applications/postcode_splitter: PostcodeSplitterOrchestrator + Lambda entrypoint slice
Wires slice 1-5 primitives into a deployable splitter:

- orchestration/postcode_splitter_orchestrator.py: PostcodeSplitterOrchestrator
  loads addresses via UserAddressRepository, groups by postcode via
  iter_postcode_grouped_batches, persists each batch under
  ara_postcode_splitter_batches/{task_id}/{subtask_id}/, creates a WAITING
  child SubTask, and publishes an address2UPRN SQS message per batch.

- applications/postcode_splitter/: Lambda entrypoint. handler.py is decorated
  with @subtask_handler() so the parent SubTask lifecycle is decorator-owned;
  PostcodeSplitterTriggerBody validates the body. Dockerfile is the
  python:3.11 Lambda base with the DDD-shaped source layers and no pandas.

- tests/orchestration/test_postcode_splitter_orchestrator.py: integration
  test using moto S3 + moto SQS + in-memory SQLite that exercises the full
  wiring against a fixture CSV spanning three postcode groups (one
  oversize) and asserts child count, persisted inputs, queue bodies, and
  dispatch order.

backend/postcode_splitter/ and .github/workflows/deploy_terraform.yml are
intentionally unchanged: the dockerfile_path flip is deferred until the
companion backend/address2UPRN/ migration is also ready.
2026-05-19 17:46:12 +00:00
..
domain postcode_splitter: pure domain (UserAddress, sanitise_postcode, postcode_batching) 2026-05-19 16:45:47 +00:00
infrastructure infrastructure: typed S3/SQS clients (S3Client, CsvS3Client, SqsClient, Address2UprnQueueClient) 2026-05-19 17:12:21 +00:00
orchestration applications/postcode_splitter: PostcodeSplitterOrchestrator + Lambda entrypoint slice 2026-05-19 17:46:12 +00:00
repositories repositories: UserAddressRepository + UserAddressCsvS3Repository (CSV-on-S3 adapter) 2026-05-19 17:37:02 +00:00
utilities utilities/aws_lambda: @subtask_handler injects TaskOrchestrator as third positional arg 2026-05-19 17:31:27 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00