Preserve leases needing recovery
This commit is contained in:
@@ -154,7 +154,7 @@ func TestEndToEndIngestRouteLeaseRotateAndComplete(t *testing.T) {
|
||||
// handoff. Once TaskLeased carries a real handoff_ref, pickup correctly
|
||||
// refuses it instead of silently continuing (the valid pickup contract is
|
||||
// covered by the orchestrator continuity tests).
|
||||
if got.State != domain.StateBlocked || got.Version != 5 {
|
||||
if got.State != domain.StateNeedsAttention || got.Lease == nil || got.Version != 5 {
|
||||
t.Fatalf("invalid pickup state=%s version=%d", got.State, got.Version)
|
||||
}
|
||||
ref, err = s.PutArtifact([]byte("report"))
|
||||
@@ -162,8 +162,11 @@ func TestEndToEndIngestRouteLeaseRotateAndComplete(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := s.Append(domain.Event{ID: domain.NewID(), Type: "TaskCompleted", TaskID: task.ID, Version: got.Version + 1, Surface: string(authz.System), Payload: mustJSON(map[string]any{
|
||||
"report_ref": ref,
|
||||
"receipt": map[string]any{"harness_id": "h1", "consumed": 1},
|
||||
"report_ref": ref,
|
||||
"receipt": map[string]any{"harness_id": "h1", "consumed": 1},
|
||||
"harness_id": got.Lease.HarnessID,
|
||||
"lease_epoch": got.Lease.Epoch,
|
||||
"expected_version": got.Version,
|
||||
})}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user