Task: Implement Hotfix: the workflow deadline watch uses a thread Apple's libc++ lacks

Table of Contents

This page documents a task in the Hotfix: the workflow deadline watch uses a thread Apple's libc++ lacks story. It captures the goal, current status, acceptance, and any notes or results.

1. Goal

Make the deadline watch portable, so both macOS legs build and test again.

2. Status

Field Value
State DONE
Parent story Hotfix: the workflow deadline watch uses a thread Apple's libc++ lacks
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-09-30

3. Acceptance

  • stoppable_thread starts a thread with a token, requests a stop and joins in its destructor, and is movable and not copyable.
  • The workflow engine declares and constructs it, and grep for std::jthread over projects/ finds nothing.
  • The tree builds; the workflow, platform and iam core suites pass.
  • A macOS run builds and tests the branch.

4. Plan

  1. Write the type, with a comment saying why it exists and why it is not exported.
  2. Add it to the concurrency aggregate header and to the component file list.
  3. Read the engine's two sites and move them onto it.
  4. Build, run the suites, format-check, and dispatch macOS.

5. Measurements

What Value Command Commit
std::jthread uses before 2, in the workflow engine grep -rn jthread projects/ main at 26d66e66
The same after 0 same this branch
The initialiser-order warning the first draft produced field 'source_' is uninitialized when used here, an error under -Werror cmake --build this branch, first draft
Suites 6 of 6 pass: workflow api/core/service, platform, iam core, shell workflow =ctest -R "workflow\ platform\ iam.core"= this branch
Full tree builds cmake --build --preset linux-clang-debug-make -j 8 this branch
Formatting clang-format clean on the four changed files clang-format --dry-run --Werror this branch
macOS dispatched gh workflow run continuous-macos.yml this branch

6. Notes

  • The first draft initialised the thread in the constructor's member-init list and read the stop source there. clang flags that under -Werror as an uninitialised field read, and the fix is to take the token and assign the thread in the body: the token is then a plain value and the initialisation order cannot be argued about.
  • The macOS run of the previous fix (36704140032) succeeded, so the failure this task fixes is the one the deadline watch introduced afterwards.

7. PRs

PR Title
#2442 Fix the macOS build: a portable stoppable thread for the deadline watch

8. Review

Comment summary File Decision Notes
       

9. Result

ores.platform::concurrency::stoppable_thread carries the stop token and joins in its destructor, and the deadline watch uses it. No source in the estate names std::jthread; the six affected suites pass and the tree builds.

Emacs 29.3 (Org mode 9.6.15)