fix: require namespace for workflow operations, return 400 if missing
CI / CI (push) Failing after 7m51s

Temporal handler was defaulting to 'default' namespace when not provided.
CI test expects 400 for missing namespace. Validate before forwarding.
This commit is contained in:
Admin Bot
2026-09-15 21:27:05 +09:00
parent 7237e47854
commit 3c6c855761
+7 -2
View File
@@ -134,8 +134,13 @@ func (wa *WorkflowAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// Inject action into body for temporal handler
payload["action"] = action
if _, ok := payload["namespace"]; !ok {
payload["namespace"] = "default"
// namespace is required for all workflow operations
if ns, ok := payload["namespace"].(string); !ok || ns == "" {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusBadRequest)
fmt.Fprintf(w, `{"error":"namespace is required"}`)
return
}
newBody, _ := json.Marshal(payload)