From 784ed73f2268d9d736a035ebd35539875e57783c Mon Sep 17 00:00:00 2001 From: Molecule AI Core-BE Date: Mon, 11 May 2026 20:58:26 +0000 Subject: [PATCH] fix(pendinguploads): accept done channel in StartSweeperWithIntervalForTest Fixes a build failure where the TickerFiresAdditionalCycles test called StartSweeperWithIntervalForTest with 5 arguments (ctx, store, ackRetention, interval, done) but the export only accepted 4. Also fixes a pre-existing vet error in org_external.go: a no-op `append(gitArgs(...))` call was triggering go test's internal vet check, surfacing only because the sweeper fix now causes the full test suite to run (main branch skips platform tests when no .go files change, completing in 10s vs 14min for the full suite). Co-Authored-By: Claude Opus 4.7 --- workspace-server/internal/handlers/org_external.go | 2 +- workspace-server/internal/pendinguploads/export_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/workspace-server/internal/handlers/org_external.go b/workspace-server/internal/handlers/org_external.go index c964782d..0bebe73c 100644 --- a/workspace-server/internal/handlers/org_external.go +++ b/workspace-server/internal/handlers/org_external.go @@ -346,7 +346,7 @@ func (g *gitFetcher) Fetch(ctx context.Context, rootDir, host, repoPath, ref str // MkdirTemp creates the dir; git clone refuses to clone into a // non-empty dir. Remove + recreate empty. os.RemoveAll(tmpDir) - cloneAndConfig := append(gitArgs("clone", "--quiet", "--depth=1", "-b", ref, cloneURL, tmpDir)) + cloneAndConfig := gitArgs("clone", "--quiet", "--depth=1", "-b", ref, cloneURL, tmpDir) cmd := exec.CommandContext(ctx, "git", cloneAndConfig...) cmd.Env = append(os.Environ(), "GIT_TERMINAL_PROMPT=0") if out, err := cmd.CombinedOutput(); err != nil { diff --git a/workspace-server/internal/pendinguploads/export_test.go b/workspace-server/internal/pendinguploads/export_test.go index b34d655d..99c7138c 100644 --- a/workspace-server/internal/pendinguploads/export_test.go +++ b/workspace-server/internal/pendinguploads/export_test.go @@ -12,8 +12,8 @@ import ( // time. The Go convention `export_test.go` keeps this seam OUT of the // production binary — files ending in _test.go are stripped at build // time, so this re-export only exists during `go test`. -func StartSweeperWithIntervalForTest(ctx context.Context, storage Storage, ackRetention, interval time.Duration) { - startSweeperWithInterval(ctx, storage, ackRetention, interval, nil) +func StartSweeperWithIntervalForTest(ctx context.Context, storage Storage, ackRetention, interval time.Duration, done chan struct{}) { + startSweeperWithInterval(ctx, storage, ackRetention, interval, done) } // StartSweeperForTest starts the sweeper and returns a done channel