Model/applications
Jun-te Kim fb308cfaea Use NullPool as a graceful ceiling for the one-connection-per-lambda design
The invocation is architecturally one DB connection at a time (read up front,
sequential write Units of Work, overrides resolved on the unit's own session).
Keep that as the design intent, but back it with NullPool instead of a fixed
pool_size=1 pool: each checkout opens a fresh connection and closes it on return,
so there is no pool slot to exhaust.

The difference is the failure mode if a path ever regresses and holds two
Sessions at once. A pool_size=1/max_overflow=0 pool turns that into a hard
30s dead-lock that fails the whole invocation ("QueuePool limit of size 1
overflow 0 reached, connection timed out"). NullPool instead opens a transient
second connection for that instant and the Lambda keeps running. The design
target stays one connection; NullPool just keeps it alive if we slip.

The single-connection invariant itself is still enforced in the Unit of Work
(overrides read on the unit's own session) and pinned by the regression test,
which uses its own strict pool_size=1 engine so it asserts the architecture
regardless of the production NullPool choice.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 17:10:23 +00:00
..
ara_first_run feat(epc-prediction): thread prediction injection points through the composition root 2026-06-16 13:53:54 +00:00
audit_generator add additional empty rows to template 2026-06-10 16:37:53 +00:00
bulk_upload_finaliser property override 2026-06-05 12:18:13 +00:00
landlord_description_overrides Group landlord property-override enums under domain/epc/property_overrides 🟪 2026-06-19 14:49:58 +00:00
magic_plan use task_handler rather subtask_handler for magicplan 2026-06-09 12:17:57 +00:00
modelling_e2e Use NullPool as a graceful ceiling for the one-connection-per-lambda design 2026-06-24 17:10:23 +00:00
postcode_splitter updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
sharepoint_renamer ignore jpg and heic files. resolve filepath relatively 2026-06-16 10:06:39 +00:00
__init__.py applications/postcode_splitter: PostcodeSplitterOrchestrator + Lambda entrypoint slice 2026-05-19 17:46:12 +00:00