Skip to content

fix(sdk,api,local): surface executions interrupted by a daemon restart - #1888

Open
ra-co88 wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
ra-co88:fix/execution-tombstones
Open

fix(sdk,api,local): surface executions interrupted by a daemon restart#1888
ra-co88 wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
ra-co88:fix/execution-tombstones

Conversation

@ra-co88

@ra-co88 ra-co88 commented Aug 30, 2026

Copy link
Copy Markdown

What

Executions interrupted by a daemon restart are now recorded as tombstones and surfaced through the API and SDK as interrupted, instead of lingering forever in a running state.

Why

When the daemon dies mid-execution, in-flight executions had no terminal state — they read as running indefinitely, breaking retries, UX, and any reconciliation logic. The record store now writes tombstones on startup for executions that belonged to the previous process, and the API/SDK expose the interrupted state.

What changed

  • makeExecutionRecordStore writes tombstones for prior-process executions at boot.
  • The executions API and SDK executor surface the interrupted state.
  • The local app wires the store.

Test plan

  • Record-store suite: tombstone written once, idempotent re-sweep, boundary reads.
  • Handler suite: interrupted executions return the terminal state, not running.

6 + 4 tests green against current main.

@ra-co88

ra-co88 commented Aug 30, 2026

Copy link
Copy Markdown
Author

Heads-up on the red E2E (cloud 13of16) check here: it's failing on main itself (e.g. the Version Packages runs), so it's pre-existing rather than from this PR. It's the cap-eviction scenario tripping over workerd resetting session Durable Objects mid-initialize when the test opens its burst of sessions — diagnosis and a proposed fix in #1895.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants