Files
pad/internal
xarmian 341cbd373d fix(artifact): normalize import field map so json fields validate (BUG-1883) (#759)
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
2026-06-22 13:31:45 -04:00
..
2026-03-26 01:52:36 +00:00