Preserve leases needing recovery

This commit is contained in:
kami
2026-07-30 14:37:34 +04:00
parent f6ee0e3060
commit 8174400b1a
12 changed files with 106 additions and 39 deletions
+7 -4
View File
@@ -29,10 +29,13 @@ released agent, or reject a valid completion.
## P1 — autonomy and recovery
- **Recovery:** `TaskBlocked` destroys the worker session needed for late
completion; aggregate-version changes also stale the lease. Use a separate
lease epoch and a recoverable `needs_attention` state that retains ownership
until explicit release, expiry, or reconciled completion.
- **Recovery:** **Closed 2026-07-30.** Launch/recovery faults now emit
`TaskNeedsAttention`, retaining the durable harness owner and lease epoch.
Renew, release, expiry, and a late reconciled completion accept that same
fenced lease; worker state advances its expected aggregate version without
dropping the live session. `TaskBlocked` remains terminal for an explicit
operator block. `TestNeedsAttentionRetainsFencedLeaseForLateCompletion`
covers the durable recovery path.
- **Retries:** expiry bypasses `Router.HandleEvent`; attempts/backoff are
in-memory and unsynchronised. Project durable `attempt`, `next_retry_at`,
and failure class; route every reclaim through one transition.