From bb3b04f45e5e89013bd0580c6709e07ff3148774 Mon Sep 17 00:00:00 2001 From: Jiang Bohan Date: Thu, 30 Apr 2026 14:53:07 +0800 Subject: [PATCH] fix(repos): drop Description residue surfaced after rebase on #1929 Project-resource github_repo lift path (#1929) and registerTaskRepos both still constructed RepoData{...Description: ...} after the rebase. Two test sites in daemon_test.go and execenv_test.go also reintroduced the field. Strip them so the Description-removal change builds and tests pass with the latest main. --- server/internal/daemon/daemon.go | 2 +- server/internal/daemon/daemon_test.go | 2 +- server/internal/daemon/execenv/execenv_test.go | 2 +- server/internal/handler/daemon.go | 6 +----- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/server/internal/daemon/daemon.go b/server/internal/daemon/daemon.go index df4224c845..4dc77d7526 100644 --- a/server/internal/daemon/daemon.go +++ b/server/internal/daemon/daemon.go @@ -441,7 +441,7 @@ func (d *Daemon) registerTaskRepos(workspaceID string, repos []RepoData) { continue } ws.taskRepoURLs[url] = struct{}{} - toSync = append(toSync, RepoData{URL: url, Description: repo.Description}) + toSync = append(toSync, RepoData{URL: url}) } d.mu.Unlock() diff --git a/server/internal/daemon/daemon_test.go b/server/internal/daemon/daemon_test.go index fd7c7d3d48..b8f451c6ca 100644 --- a/server/internal/daemon/daemon_test.go +++ b/server/internal/daemon/daemon_test.go @@ -677,7 +677,7 @@ func TestRegisterTaskReposAllowsProjectOnlyURL(t *testing.T) { // the only repo URL the agent should be able to check out. d.workspaces["ws-1"] = newWorkspaceState("ws-1", nil, "", nil, nil) - d.registerTaskRepos("ws-1", []RepoData{{URL: sourceRepo, Description: "project repo"}}) + d.registerTaskRepos("ws-1", []RepoData{{URL: sourceRepo}}) // The async clone goroutine in registerTaskRepos may not have finished; // poll briefly until the cache is populated so the test isn't racy. diff --git a/server/internal/daemon/execenv/execenv_test.go b/server/internal/daemon/execenv/execenv_test.go index 821d8bd0f2..06baad289c 100644 --- a/server/internal/daemon/execenv/execenv_test.go +++ b/server/internal/daemon/execenv/execenv_test.go @@ -217,7 +217,7 @@ func TestProjectReposReplaceWorkspaceReposInMetaSkill(t *testing.T) { ProjectID: "22222222-3333-4444-5555-666666666666", ProjectTitle: "Project A", Repos: []RepoContextForEnv{ - {URL: "https://github.com/org/project-repo", Description: ""}, + {URL: "https://github.com/org/project-repo"}, }, ProjectResources: []ProjectResourceForEnv{ { diff --git a/server/internal/handler/daemon.go b/server/internal/handler/daemon.go index 0a5c59423b..4f38601e2e 100644 --- a/server/internal/handler/daemon.go +++ b/server/internal/handler/daemon.go @@ -911,11 +911,7 @@ func (h *Handler) ClaimTaskByRuntime(w http.ResponseWriter, r *http.Request) { URL string `json:"url"` } if json.Unmarshal(row.ResourceRef, &payload) == nil && payload.URL != "" { - desc := "" - if row.Label.Valid { - desc = row.Label.String - } - projectRepos = append(projectRepos, RepoData{URL: payload.URL, Description: desc}) + projectRepos = append(projectRepos, RepoData{URL: payload.URL}) } } }