mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-09-24 11:26:34 +00:00
341cbd373d
Importing a playbook artifact with an `arguments` array failed: field "arguments" must be a JSON object, array, or null artifact.Decode normalizes arguments to []map[string]any, but ValidateFields' json case only accepts map[string]any/[]any/nil. handleCreateItem never hits this because its field map comes from JSON-unmarshalling the request body. Fix: round-trip the import field map through JSON (marshal→unmarshal) before createItemChecked, yielding canonical []any/map[string]any — matches the wire create path, no per-field special-casing. Regression test round-trips a playbook with arguments through import. Claude-Session: https://claude.ai/code/session_01KmxkPxLksjf1pmrZDpsnTJ