From cf8071af1a1043c1bfa82bd5e43586cdbcb17637 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sun, 18 Oct 2026 00:29:14 +1100 Subject: [PATCH] fix(postgres): run stored workflows that name the root identity as the seeded agent --- .../migrations/0053_workflow_identity_root.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 internal/infrastructure/postgres/migrations/0053_workflow_identity_root.sql diff --git a/internal/infrastructure/postgres/migrations/0053_workflow_identity_root.sql b/internal/infrastructure/postgres/migrations/0053_workflow_identity_root.sql new file mode 100644 index 000000000..d918f2048 --- /dev/null +++ b/internal/infrastructure/postgres/migrations/0053_workflow_identity_root.sql @@ -0,0 +1,12 @@ +-- Workflow definitions stored before the shipped ones named the seeded agent +-- still say "identity: root", which no identity carries. They run as the agent. + +-- +goose Up +UPDATE resources +SET value = convert_to( + regexp_replace(convert_from(value, 'UTF8'), 'identity: root(?=\\n|")', 'identity: 6f129e29-0e26-5246-99bd-74cb4496203b', 'g'), + 'UTF8') +WHERE kind = 'workflow-definitions'; + +-- +goose Down +SELECT 1;