From 83e4f8b907c993120d777c67098cfda5db465b7e Mon Sep 17 00:00:00 2001 From: viettranx Date: Fri, 17 Apr 2026 19:50:11 +0700 Subject: [PATCH] fix(tests): add ResetStuckSummoning stub to agent store mocks Add missing ResetStuckSummoning method stub to mock AgentStore implementations in test files. Follows from recent agent recovery feature (d7342fbd) which added this method to the AgentStore interface but missed updating these 4 test mock implementations. --- internal/bootstrap/seed_store_test.go | 1 + internal/gateway/methods/agents_create_owner_test.go | 3 +++ internal/tools/context_file_interceptor_test.go | 1 + internal/tools/delegate_tool_hooks_test.go | 1 + 4 files changed, 6 insertions(+) diff --git a/internal/bootstrap/seed_store_test.go b/internal/bootstrap/seed_store_test.go index 925be560..5fcb8a30 100644 --- a/internal/bootstrap/seed_store_test.go +++ b/internal/bootstrap/seed_store_test.go @@ -83,6 +83,7 @@ func (s *seedStubStore) Update(_ context.Context, _ uuid.UUID, _ map[string]any) func (s *seedStubStore) Delete(_ context.Context, _ uuid.UUID) error { return nil } func (s *seedStubStore) List(_ context.Context, _ string) ([]store.AgentData, error) { return nil, nil } func (s *seedStubStore) GetDefault(_ context.Context) (*store.AgentData, error) { return nil, nil } +func (s *seedStubStore) ResetStuckSummoning(_ context.Context) (int64, error) { return 0, nil } func (s *seedStubStore) ShareAgent(_ context.Context, _ uuid.UUID, _, _, _ string) error { return nil } func (s *seedStubStore) RevokeShare(_ context.Context, _ uuid.UUID, _ string) error { return nil } func (s *seedStubStore) ListShares(_ context.Context, _ uuid.UUID) ([]store.AgentShareData, error) { diff --git a/internal/gateway/methods/agents_create_owner_test.go b/internal/gateway/methods/agents_create_owner_test.go index aa9b313f..a7286101 100644 --- a/internal/gateway/methods/agents_create_owner_test.go +++ b/internal/gateway/methods/agents_create_owner_test.go @@ -50,6 +50,9 @@ func (s *createCaptureStore) List(_ context.Context, _ string) ([]store.AgentDat func (s *createCaptureStore) GetDefault(_ context.Context) (*store.AgentData, error) { return nil, nil } +func (s *createCaptureStore) ResetStuckSummoning(_ context.Context) (int64, error) { + return 0, nil +} func (s *createCaptureStore) ShareAgent(_ context.Context, _ uuid.UUID, _, _, _ string) error { return nil } diff --git a/internal/tools/context_file_interceptor_test.go b/internal/tools/context_file_interceptor_test.go index be0c8afd..9cc165d2 100644 --- a/internal/tools/context_file_interceptor_test.go +++ b/internal/tools/context_file_interceptor_test.go @@ -66,6 +66,7 @@ func (s *stubAgentStore) GetByIDs(_ context.Context, _ []uuid.UUID) ([]store.Age return nil, nil } func (s *stubAgentStore) GetDefault(_ context.Context) (*store.AgentData, error) { return nil, nil } +func (s *stubAgentStore) ResetStuckSummoning(_ context.Context) (int64, error) { return 0, nil } func (s *stubAgentStore) Update(_ context.Context, _ uuid.UUID, _ map[string]any) error { return nil } func (s *stubAgentStore) Delete(_ context.Context, _ uuid.UUID) error { return nil } func (s *stubAgentStore) List(_ context.Context, _ string) ([]store.AgentData, error) { diff --git a/internal/tools/delegate_tool_hooks_test.go b/internal/tools/delegate_tool_hooks_test.go index dafb3fc3..757cd299 100644 --- a/internal/tools/delegate_tool_hooks_test.go +++ b/internal/tools/delegate_tool_hooks_test.go @@ -84,6 +84,7 @@ func (n noopAgentCRUD) Update(_ context.Context, _ uuid.UUID, _ map[string]any) func (n noopAgentCRUD) Delete(_ context.Context, _ uuid.UUID) error { return nil } func (n noopAgentCRUD) List(_ context.Context, _ string) ([]store.AgentData, error) { return nil, nil } func (n noopAgentCRUD) GetDefault(_ context.Context) (*store.AgentData, error) { return nil, nil } +func (n noopAgentCRUD) ResetStuckSummoning(_ context.Context) (int64, error) { return 0, nil } // --- helpers ---