Skip to content

fix: hold interrupted scheduled turns for explicit retry - #47

Open
jz-krono wants to merge 1 commit into
CopilotKit:mainfrom
jz-krono:kronowave/interrupted-scheduled-turns
Open

jz-krono wants to merge 1 commit into
CopilotKit:mainfrom
jz-krono:kronowave/interrupted-scheduled-turns

Conversation

@jz-krono

@jz-krono jz-krono commented Oct 3, 2026

Copy link
Copy Markdown

User workflow

A scheduled Dot turn can create a Space page or use its permitted computer. If the worker stops after an action and before the turn's final result is saved, the owner can inspect saved pages and computer action records, then explicitly start another run.

Change

  • Give expired worker leases, server shutdowns, and settings interruptions a durable Interrupted task status and explanation.
  • Leave other due work claimable while the interrupted task waits for an explicit retry action.
  • Label the task action Retry after review and document the recovery step.
  • Cover a real SQLite/page-tool effect, lease expiry across a restarted database connection, old-lease fencing, shutdown, settings changes, continuation of other queued work, and the task control.

The local effect fixture demonstrates the recovery boundary: a page write completed before the run acknowledgement, then lease reclaim issued the same prompt with a new lease. It observed two distinct pages after the simulated replay. The regression on the base commit failed at the automatic reclaim assertion; the changed store holds that task for an explicit retry.

This addresses ambiguous completion. Ordinary failed-run recurrence is a separate lifecycle decision discussed in #27; Interrupted has its own state so that behavior can be considered independently.

Verification

  • Node 24.19.0, npm 11.9.0.
  • Full Vitest suite: 35 files, 167 tests passed.
  • npm run check-format, npm run lint, npm run typecheck, npm run build: passed.
  • git apply --check against the pinned source archive: passed.
  • Synthetic local SQLite and authorized page-tool fixture.

@jz-krono jz-krono changed the title Hold interrupted scheduled turns for explicit retry fix: hold interrupted scheduled turns for explicit retry Oct 3, 2026
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.

1 participant