Commit d3a2674
Add periodic checkpoint coordinator state machine
Adds the Idle -> Due -> InFlight -> Idle scheduling loop (with
Finalizing -> Stopped reachable from any state) that will drive
periodic workspace-handoff checkpoints, per REMOTE-2111 Phase 3.
- checkpoint_coordinator.rs: CheckpointCoordinatorHandle spawns the
loop and exposes finalize() for graceful shutdown. The timer only
ever moves Idle to Due; Due polls a safe-boundary predicate
(conversation not mid-turn) before entering InFlight, which runs
exactly one attempt via snapshot::run_checkpoint_from_declarations_file
on a background task so a racing finalize() can bound how long it
waits without ever stranding the attempt. finalize() starts at most
one more attempt (skipped below the gather/upload timeout floor) or
awaits an already-in-flight one -- never both -- bounded end to end
by its budget.
- terminal/view.rs: add TerminalView::ai_action_model(), which
is_safe_boundary uses to check for unfinished actions on the
conversation.
This module has no production caller yet -- AgentDriver wires
CheckpointCoordinatorHandle::new into its spawn/finalize lifecycle in a
follow-up, stacked PR -- so it is marked allow(dead_code) at the module
level with a comment explaining why; removable once that PR merges on
top of this one.
Co-Authored-By: Oz <oz-agent@warp.dev>1 parent d23c0ae commit d3a2674
4 files changed
Lines changed: 1064 additions & 0 deletions
File tree
- app/src
- ai/agent_sdk
- driver
- terminal
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
0 commit comments