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.
This commit is contained in:
Jiang Bohan
2026-04-30 14:53:07 +08:00
parent 957eada7df
commit bb3b04f45e
4 changed files with 4 additions and 8 deletions

View File

@@ -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()

View File

@@ -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.

View File

@@ -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{
{

View File

@@ -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})
}
}
}