Add canonical canvas edits, identity migration and idempotent resource/AI operations #19

Merged
Zayden-Jung merged 49 commits from codex/headless-canvas-v1 into main 2026-11-11 14:53:34 +00:00
Showing only changes of commit d6690c3764 - Show all commits
@@ -522,4 +522,15 @@ func TestCanonicalAIAdmissionAndLifecycle(t *testing.T) {
t.Fatal("deleting a moved target failed to revoke its old job")
}
revoked := start(root, imageID, "image", 1)
mutate(func(model *canvasModel) { model.Elements[imageID]["ownerCanvasId"] = child })
beforeRevoked := executions.Load()
if _, e = db.ExecContext(ctx, `UPDATE workspace_members SET role='viewer' WHERE project=$1 AND workspace_id=$2 AND account_id=$3`, project, workspace, account); e != nil {
t.Fatal(e)
}
execute(revoked["run_id"].(string))
if result := call("GET", base(root)+"/ai/runs/"+revoked["run_id"].(string), nil, 200, 0, ""); result["status"] != "failed" || executions.Load() != beforeRevoked {
t.Fatal("moved target executed after write permission was revoked")
}
}