Story: Workflow engine hardening
Table of Contents
This page documents a story in Sprint 17. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
Goal
Harden the workflow engine: rename packages for consistency, add ORE import error reporting and step-log display, fix the pg_notify pipeline and badge RLS, reset the system bootstrap sequence, and eliminate controller shutdown latency by offloading DB writes to a thread pool.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent sprint | Sprint 17 |
| Now | Completed 2026-05-19. |
| Waiting on | None. |
| Next | None. |
| Last touched | 2026-05-19 |
Acceptance
- All tasks complete; PR-by-PR breakdown in
git log.
Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| Task: Workflow engine hardening + package renames | DONE | 2026-05-22 | 2026-05-22 | - Item 1: Dynamic step lists — `workflow_instance` gains `step_count` and `materialised_steps_json` so the step sequence |
| Task: [workflow] ORE import error reporting, step log, and service isolation | DONE | 2026-05-22 | 2026-05-22 | - Step outcome tri-state: replaces the binary `success` flag with `step_outcome` (`completed` / `completed_with_warnings |
| Task: [controller] Fix shutdown latency: offload DB writes to thread pool | DONE | 2026-05-22 | 2026-05-22 | - `monitor_process()` and `do_launch()` were running blocking libpqxx calls on the single-threaded `io_context`, seriali |
| Task: Fix pg_notify pipeline, badge RLS, and system reset | DONE | 2026-05-22 | 2026-05-22 | - pg_notify timestamp format: All 143 notify triggers now emit ISO 8601 UTC (`YYYY-MM-DDThh:mm:ssZ`); `datetime::from_is |
Decisions
- Thread pool for DB writes
- offloading DB writes on shutdown removes the O(n) blocking call that caused multi-second latency when the controller had many open connections.
Out of scope
- Workflow engine generalisation (completed in sprint 16).