From 24fdaa3bad5e33cb5a0f1e60670571a68daf7c56 Mon Sep 17 00:00:00 2001 From: Snider Date: Sun, 22 Mar 2026 15:20:42 +0000 Subject: [PATCH] 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 --- pkg/agentic/prep.go | 8 ++++++++ pkg/lib/workspace/default/go.work.tmpl | 2 +- pkg/lib/workspace/default/src/.gitkeep | 0 3 files changed, 9 insertions(+), 1 deletion(-) delete mode 100644 pkg/lib/workspace/default/src/.gitkeep diff --git a/pkg/agentic/prep.go b/pkg/agentic/prep.go index 6ba1566..7c025f8 100644 --- a/pkg/agentic/prep.go +++ b/pkg/agentic/prep.go @@ -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) diff --git a/pkg/lib/workspace/default/go.work.tmpl b/pkg/lib/workspace/default/go.work.tmpl index 3ed003a..e69b5f9 100644 --- a/pkg/lib/workspace/default/go.work.tmpl +++ b/pkg/lib/workspace/default/go.work.tmpl @@ -1,3 +1,3 @@ go 1.26.0 -use ./src +use ./repo diff --git a/pkg/lib/workspace/default/src/.gitkeep b/pkg/lib/workspace/default/src/.gitkeep deleted file mode 100644 index e69de29..0000000