Story: Hotfix: the workflow deadline pass reads an entry it has freed

Table of Contents

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

1. Goal

A step that outlives its deadline stops its run on every platform. On macOS the run was never stopped: workflow_engine::expire_overdue_steps() failed the step, then read the run's id through a reference into a map entry it had just erased. Two ores.workflow.core.tests cases have failed on both macOS CI jobs since the deadline landed.

2. Status

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

3. Acceptance

  • The deadline pass reads nothing it has freed: valgrind reports no error on the two deadline cases.
  • ores.workflow.core.tests passes on Linux and on both macOS CI jobs.

4. Tasks

Task State Start End Description
Scaffold story: Hotfix: the workflow deadline pass reads an entry it has freed DONE 2026-10-02 2026-10-02 Story scaffolding rides this task: documents, sprint wiring, and the scaffold PR. Close it before merging that PR.
Implement Hotfix: the workflow deadline pass reads an entry it has freed DONE   2026-10-02 Initial task for: Hotfix: the workflow deadline pass reads an entry it has freed

5. Decisions

6. Out of scope

  • A test that fails on Linux without the fix. The fault is a read of freed memory, which only an allocator that reuses the block, or valgrind, makes visible; the two existing macOS cases are the regression check.

7. Result

The pass now erases a step's awaiting entry after it has read and stopped the run, and the exception handler still erases it once if anything throws. Valgrind reported one invalid read on the deadline case before the change and none after; the workflow suite passes.

Emacs 29.3 (Org mode 9.6.15)