fix: extract default workspace template for go.work

QA gate failed because cloned repos weren't in a Go workspace.
Extract default template (including go.work with use ./repo)
into workspace dir before cloning. Fixes go test isolation.

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-03-22 15:20:42 +00:00
parent 4bcc04d890
commit 24fdaa3bad
3 changed files with 9 additions and 1 deletions

View file

@ -220,6 +220,14 @@ func (s *PrepSubsystem) prepWorkspace(ctx context.Context, _ *mcp.CallToolReques
resumed := fs.IsDir(core.JoinPath(repoDir, ".git"))
out.Resumed = resumed
// Extract default workspace template (go.work etc.)
lib.ExtractWorkspace("default", wsDir, &lib.WorkspaceData{
Repo: input.Repo,
Branch: "",
Task: input.Task,
Agent: input.Agent,
})
if !resumed {
// Clone repo into repo/
cloneCmd := exec.CommandContext(ctx, "git", "clone", repoPath, repoDir)

View file

@ -1,3 +1,3 @@
go 1.26.0
use ./src
use ./repo