Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

refactor(daemon): rename repoCache interface, relax /health test timeout (#2270)

Bohan Jiang97df9b90f531
diff --git a/server/internal/daemon/daemon.go b/server/internal/daemon/daemon.go
index bee242f9eb..70f3b553a4 100644
--- a/server/internal/daemon/daemon.go
+++ b/server/internal/daemon/daemon.go
@@ -50,7 +50,7 @@ type workspaceState struct {
repoRefreshMu sync.Mutex
}
-type repoCache interface {
+type repoCacheBackend interface {
Lookup(workspaceID, url string) string
Sync(workspaceID string, repos []repocache.RepoInfo) error
CreateWorktree(params repocache.WorktreeParams) (*repocache.WorktreeResult, error)
@@ -60,7 +60,7 @@ type repoCache interface {
type Daemon struct {
cfg Config
client *Client
- repoCache repoCache
+ repoCache repoCacheBackend
logger *slog.Logger
mu sync.Mutex
diff --git a/server/internal/daemon/health_test.go b/server/internal/daemon/health_test.go
index 06c491bbf9..470d637992 100644
--- a/server/internal/daemon/health_test.go
+++ b/server/internal/daemon/health_test.go
@@ -171,7 +171,7 @@ func TestHealthHandlerRespondsWhileTaskRepoLookupWaits(t *testing.T) {
if rec.Code != http.StatusOK {
t.Fatalf("expected 200, got %d", rec.Code)
}
- case <-time.After(200 * time.Millisecond):
+ case <-time.After(time.Second):
t.Fatal("/health blocked behind task repo cache lookup")
}