Story: Hotfix: the recovery test fails when the database is busy

Table of Contents

+#+filetags: :hotfix:workflow:tests:isolation:sprint_26:v0: +#+created: 2026-10-01 +#+updated: 2026-10-01 +#+environment: clever_dijkstra +#+todo: BACKLOG STARTED | DONE ABANDONED

This page documents a story in Sprint 26. It captures the goal, current status, acceptance criteria, and the tasks that compose it.

1. Goal

The recovery case fails on CI and passes on a quiet machine:

workflow_engine_tests.cpp:404: FAILED: after.size() == 2 for: 1 == 2

recover_in_progress() re-dispatches every in-progress instance the database holds. The engine reads them with the system tenant because the generated repository has no read by state, so the pass sees the workflows the other test binaries ctest runs in parallel started in their tenants. The case subscribes to the step subject with a ten-message buffer and waits five seconds, so a busy deployment evicts the command it is waiting for and the pass grows past its budget. The case tested a quiet machine, not the behaviour.

2. Status

Field Value
State DONE
Parent sprint Sprint 26
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-10-01

3. Acceptance

  • The case passes alone and with other suites running beside it.
  • Its buffer and its wait are stated where a reader can see why they are larger than the neighbouring cases'.
  • The bound on the recovery pass itself is recorded as the repository read it needs, rather than papered over in the case.

4. Tasks

Task State Start End Description
Implement Hotfix: the recovery test fails when the database is busy DONE 2026-10-01 2026-10-01 Raise the case's buffer and wait with the reason beside them, and verify alone and under the parallel pattern CI uses.

5. Decisions

  • The case is made to hold under load rather than the engine changed. The pass's breadth is deliberate: a restart must find every in-progress run. What it needs is a repository read by state, which is a change to the generated repository and a story of its own; the capture on the runs the tests leave behind already covers the residue that makes the breadth expensive.
  • The buffer is not raised for every case: only the recovery case triggers a pass that re-dispatches other tenants' work.

6. Out of scope

  • The repository read by state, and the test residue, both filed already.

Emacs 29.3 (Org mode 9.6.15)