From 0fd702cf69d9af6a50490c1ad23afedaa749adcc Mon Sep 17 00:00:00 2001 From: Molecule AI Backend Engineer Date: Sun, 19 Apr 2026 21:46:36 +0000 Subject: [PATCH] fix(bundle/exporter): add rows.Err() after child workspace enumeration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Silent data loss on mid-cursor DB errors — partial sub-workspace bundles returned instead of surfacing the iteration error. Adds rows.Err() check after the SELECT id FROM workspaces query in Export(), mirroring the pattern already used in scheduler.go and handlers with similar recursion patterns. Closes: R1 MISSING-ROWS-ERR findings (bundle/exporter.go) Co-Authored-By: Claude Opus 4.7 --- workspace-server/internal/bundle/exporter.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/workspace-server/internal/bundle/exporter.go b/workspace-server/internal/bundle/exporter.go index 770a1691..412ecc49 100644 --- a/workspace-server/internal/bundle/exporter.go +++ b/workspace-server/internal/bundle/exporter.go @@ -92,6 +92,9 @@ func Export(ctx context.Context, workspaceID, configsDir string, dockerCli *clie } } } + if err := rows.Err(); err != nil { + return nil, fmt.Errorf("export sub-workspaces: %w", err) + } } return b, nil