Skip to content

Recover interrupted orchestration runs and edit budgets - #115

Open
suprie wants to merge 3 commits into
mainfrom
feat/role-orchestration-recovery
Open

suprie wants to merge 3 commits into
mainfrom
feat/role-orchestration-recovery

Conversation

@suprie

@suprie suprie commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Recover interrupted orchestration runs and edit budgets

Summary

Continue unfinished queued loops after interruption without discarding existing work. Store run plans and execution snapshots in per-user SQLite shared by linked worktrees, and let users raise token or time limits before continuing.

What changed

  • Import validated legacy run-plan/execution YAML once into a schema-versioned SQLite store outside the repository. Resolve linked worktrees to the main checkout and enforce execution revision checks in database transactions.
  • Preserve managed branches, worktree edits, completed phases, attempt counts, provider session checkpoints, and failure diagnostics during recovery. Resume compatible Claude/Codex sessions; fall back only for explicit missing-session cases.
  • Add inactive-run budget editing through typed IPC and a run queue form. Reject zero limits and preserve saved progress.
  • Show Codex sub-agent call results and child status separately, without treating a completed delegation call as a completed parent turn.
  • Apply shared ASD-STE100 writing guidance alongside optional role charters for both providers.
  • Update role-based orchestration PRD completion bookkeeping, compact project memory, and document operational recovery and migration limits.

PRD

  • docs/epics/role-based-orchestration/prd-role-foundations.md
  • docs/epics/role-based-orchestration/prd-agent-handoff.md
  • docs/epics/role-based-orchestration/prd-parallel-scheduling.md
  • docs/epics/execution-foundations/operational-recovery.md

This change builds on the merged role foundations and handoff work. The parallel-scheduling PRD status update is bookkeeping for its separate implementation in PR #113; this PR does not introduce that scheduler.

Decisions and limits

  • Centralize mutable run/execution snapshots; retain authored specifications and decisions in Git.
  • Preserve legacy YAML as the original import snapshot; it is not maintained as a current export.
  • Project identity follows the canonical main-checkout path. Repository relocation needs a later stable-ID migration.
  • Delivery retry records, handoff files, session logs, event replay, and backup/restore UI retain their existing scope or remain follow-up work.
  • Local execution/delivery YAML changes are excluded from this PR.

Test plan

Verified after integrating the handoff implementation from merged PR #112:

  • cargo test --lib -- --test-threads=1 — 768 passed, 9 ignored.
  • cargo fmt --check.
  • cargo clippy -- -D warnings.
  • npm run build.
  • npm run test:frontend — 36 passed.
  • Recovery tests use real temporary Git worktrees/databases and a fake Codex transport.
  • Manual: interrupt and restart a live Claude/Codex queued run, raise its budget, and confirm continuation preserves edits and completed phases.

Live-provider tests were not run. Rust test compilation reports existing unused-result warnings in agents.rs; production Clippy passes.

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