feat(work): make agent execution recovery durable
CI / test (push) Failing after 33s
CI / test (pull_request) Failing after 42s

This commit is contained in:
m
2026-08-23 13:10:18 +03:00
parent f9b9765100
commit 284ea88553
14 changed files with 214 additions and 13 deletions
+2
View File
@@ -2,6 +2,7 @@ package ports
import (
"context"
"time"
"git.cin.su/m/Assistant/contracts/work"
)
@@ -13,5 +14,6 @@ type AgentExecutor interface {
type ExecutionStore interface {
SaveDispatchIntent(context.Context, work.AgentDispatchIntent) error
SaveAgentLease(context.Context, work.AgentLease) error
RenewAgentLease(context.Context, work.AgentLease, time.Time) error
AcceptAgentCallback(context.Context, work.AgentCallback) error
}
+2
View File
@@ -3,6 +3,7 @@ package ports
import (
"context"
"errors"
"time"
"git.cin.su/m/Assistant/contracts/work"
)
@@ -14,5 +15,6 @@ type WorkerStore interface {
LoadDispatchIntent(context.Context, string) (work.AgentDispatchIntent, error)
ClaimNextDispatch(context.Context, string, int64) (work.AgentDispatchQueueItem, error)
CompleteDispatch(context.Context, string, string, work.AgentDispatchQueueState, int64) error
RetryDispatch(context.Context, string, string, int64, time.Duration) error
RecoverStaleClaims(context.Context, int64, int64) (int64, error)
}