Model/tests
Jun-te Kim b1ff711260 perf(modelling_e2e): batch SubTask bookkeeping to stop per-property writes
Even after batching the data writes, the handler still wrote to the DB per
property through the orchestrator's SubTask bookkeeping: create + start +
complete each self-committed, and _cascade re-listed every sibling and re-saved
the parent on every transition — ~5 writes per property plus an O(N^2) cascade.

- TaskOrchestrator.run_subtasks: create all children in one INSERT, run each
  (failures isolated per child), then persist all terminal states in one bulk
  save and cascade the parent once. Children go WAITING -> terminal; the
  transient IN_PROGRESS row is never written.
- SubTaskRepository.create_many / save_many (bulk INSERT / bulk fetch + update).
- _cascade short-circuits when the Task is already FAILED (terminal) — skips the
  sibling roll-up entirely.
- modelling_e2e handler fans out via run_subtasks instead of per-property
  create_child_subtask + run_subtask.

Per N-property batch the SubTask bookkeeping drops from ~5N writes + an O(N^2)
cascade to ~2 writes + 1 cascade.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 19:26:42 +00:00
..
applications perf(modelling_e2e): batch SubTask bookkeeping to stop per-property writes 2026-06-24 19:26:42 +00:00
datatypes Tolerate non-string building-part identifier (fix TypeError) 2026-06-24 10:33:23 +00:00
domain Prefer a MAIN-bearing prediction template so EPC-less dwellings predict 🟩 2026-06-24 13:20:43 +00:00
e2e Prove prediction resolves landlord overrides to a real cohort match end-to-end 🟩 2026-06-16 15:20:49 +00:00
fixtures/epc_prediction feat(epc-prediction): geo-proximity weighting, per-component (#1227) 2026-06-15 14:58:42 +00:00
harness Fix test asserting None for cfl_fixed_lighting_bulbs_count on 21.0.1 cert 🟩 2026-06-24 13:31:02 +00:00
infrastructure Merge pull request #1288 from Hestia-Homes/feature/per-cert-mapper-validation 2026-06-24 12:04:00 +01:00
lambdas new application to trigger e2e for a single property and scenario 2026-06-22 12:54:53 +00:00
magic_plan Migrate all MagicPlan tests to single new-format fixture 🟪 2026-06-05 12:59:56 +00:00
orchestration perf(modelling_e2e): batch SubTask bookkeeping to stop per-property writes 2026-06-24 19:26:42 +00:00
repositories perf(modelling_e2e): batch SubTask bookkeeping to stop per-property writes 2026-06-24 19:26:42 +00:00
scripts re run ddd tests 2026-06-22 08:52:45 +00:00
utilities task_handler passes orchestrator and task_id to wrapped function when flag is true 🟥 2026-06-24 10:47:05 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
conftest.py Audit generator populates XLSX, uploads to S3, and records UploadedFile row 🟪 2026-06-09 12:05:55 +00:00
test_lambda_packaging.py better smoke tests to check what is failign 2026-06-17 11:53:33 +00:00