From 5c9bfddcf63685c3b1b33cc57b4f8a1120275e4e Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer A (Kimi)" Date: Mon, 1 Jun 2026 00:30:57 +0000 Subject: [PATCH 1/2] fix(secrets): log rows.Scan error in restartAllAffectedByGlobalKey Previously a scan failure in the affected-workspace query was silently dropped, meaning the workspace would not be auto-restarted and the operator would never know. Now the error is logged so DB schema drift or corrupted rows surface in the logs. Co-Authored-By: Claude Opus 4.7 --- workspace-server/internal/handlers/secrets.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workspace-server/internal/handlers/secrets.go b/workspace-server/internal/handlers/secrets.go index f53130829..3108eb5a7 100644 --- a/workspace-server/internal/handlers/secrets.go +++ b/workspace-server/internal/handlers/secrets.go @@ -411,9 +411,11 @@ func (h *SecretsHandler) restartAllAffectedByGlobalKey(key string) { var ids []string for rows.Next() { var id string - if err := rows.Scan(&id); err == nil { - ids = append(ids, id) + if err := rows.Scan(&id); err != nil { + log.Printf("Global secret %s: scan error listing affected workspace: %v", key, err) + continue } + ids = append(ids, id) } if err := rows.Err(); err != nil { log.Printf("restartAllAffectedByGlobalKey: iteration error: %v", err) -- 2.52.0 From 923ccdf881cb020c0728031db9598d6d1c82a44d Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer A (Kimi)" Date: Mon, 1 Jun 2026 12:36:44 +0000 Subject: [PATCH 2/2] ci: remove unused canvasUserMessage type to fix lint on staging internal/handlers/a2a_proxy_helpers.go:412 had an unused struct that causes golangci-lint `unused` failure on every PR targeting staging. Co-Authored-By: Claude Opus 4.7 --- workspace-server/internal/handlers/a2a_proxy_helpers.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/workspace-server/internal/handlers/a2a_proxy_helpers.go b/workspace-server/internal/handlers/a2a_proxy_helpers.go index 98c51bb7d..11916e6b1 100644 --- a/workspace-server/internal/handlers/a2a_proxy_helpers.go +++ b/workspace-server/internal/handlers/a2a_proxy_helpers.go @@ -407,15 +407,6 @@ func validateCallerToken(ctx context.Context, c *gin.Context, callerID string) e // matching (the wsauth errors are typed for the invalid case). var errInvalidCallerToken = errors.New("missing caller auth token") -// canvasUserMessage holds the extracted user message extracted from an -// A2A canvas request body for broadcasting to other sessions. -type canvasUserMessage struct { - Message string `json:"message,omitempty"` - Parts []map[string]interface{} `json:"parts,omitempty"` - MessageID string `json:"messageId,omitempty"` - Attachments []map[string]interface{} `json:"attachments,omitempty"` -} - // extractCanvasUserMessage parses an A2A JSON-RPC request body and extracts // the user-authored text and attachments from a canvas-initiated message/send. // Returns nil when the body is not a canvas user message (empty, malformed, -- 2.52.0