From a6644c20cd0e0018e337a013a847f5da7ceacdaa Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Mon, 16 Nov 2026 00:44:02 +1100 Subject: [PATCH] fix(connectors): accepting a connector writes an empty tool list, not NULL Since the MCP migration made accepted.tools NOT NULL, the connector and secret engine accept path never set it, so re-accepting any connector failed with a not-null violation. --- modules/connectors/module.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/connectors/module.go b/modules/connectors/module.go index f157bf863..73554cfbf 100644 --- a/modules/connectors/module.go +++ b/modules/connectors/module.go @@ -3,6 +3,7 @@ package connectors import ( "cmp" "context" + "encoding/json/jsontext" json "encoding/json/v2" "errors" "fmt" @@ -230,6 +231,9 @@ func (m *Module) acceptAs(w http.ResponseWriter, r *http.Request, contract strin a := store.Accepted{ OrgID: m.orgID, Name: name, Path: req.Path, SHA256: req.SHA256, Egress: req.Egress, Env: req.Env, Settings: settings, Contract: contract, Credentials: slots, + // Only an MCP server declares its tools at acceptance; the column + // holds a list either way. + Tools: jsontext.Value(`[]`), } if err := m.store.Upsert(r.Context(), a); err != nil { httpjson.Error(w, http.StatusInternalServerError, err.Error())