:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(workflows): wire add_action edges and coerce output_variable to worker shape (#72576)
Harley Alexander97a95cb38a3a
diff --git a/nodejs/src/cdp/schema/hogflow.test.ts b/nodejs/src/cdp/schema/hogflow.test.tsindex 4ed0d598d14f..9b3a252971ed 100644--- a/nodejs/src/cdp/schema/hogflow.test.ts+++ b/nodejs/src/cdp/schema/hogflow.test.ts@@ -39,6 +39,22 @@ describe('hogflow schema', () => {})})+ describe('output_variable legacy string normalization', () => {+ it.each([+ ['bare string', 'greeting', { key: 'greeting' }],+ ['string in a list', ['greeting', { key: 'other' }], [{ key: 'greeting' }, { key: 'other' }]],+ ['canonical object', { key: 'greeting', result_path: 'r' }, { key: 'greeting', result_path: 'r' }],+ ])('parses %s to the canonical shape', (_name, stored, expected) => {+ const parsed = HogFlowActionSchema.parse({+ ...commonActionFields,+ type: 'delay',+ config: { delay_duration: '5m' },+ output_variable: stored,+ })+ expect(parsed.output_variable).toEqual(expected)+ })+ })+describe('conversion events', () => {const baseHogFlow = {id: 'flow-1',diff --git a/nodejs/src/cdp/schema/hogflow.ts b/nodejs/src/cdp/schema/hogflow.tsindex 8dbda3a14d46..7e96591cd958 100644--- a/nodejs/src/cdp/schema/hogflow.ts+++ b/nodejs/src/cdp/schema/hogflow.ts@@ -2,6 +2,18 @@ import { z } from 'zod'import { CyclotronInputMappingSchema, CyclotronInputSchema, CyclotronJobInputSchemaTypeSchema } from './cyclotron'+const HogFlowOutputVariableSchema = z.object({+ key: z.string(),+ result_path: z.string().optional().nullable(), // The path within the action result to store, e.g. 'response.user.id'+ spread: z.boolean().optional().nullable(), // When true, spread object result into multiple variables as {key}_{property}+ label: z.string().optional().nullable(), // Display label for the auto-created workflow variable+})++// Rows written before the API coerced bare key strings — normalize at read so one legacy value+// can't make the whole flow row unparseable. The annotated return type keeps the union's output+// type identical to the object schema's, so downstream field access still narrows.+const legacyStringOutputVariable = z.string().transform((key): z.infer<typeof HogFlowOutputVariableSchema> => ({ key }))+const _commonActionFields = {id: z.string(),name: z.string(),@@ -12,20 +24,9 @@ const _commonActionFields = {filters: z.any(), // TODO: Correct to the right typeoutput_variable: z // The Hogflow-level variable to store the output of this action into.union([- z.object({- key: z.string(),- result_path: z.string().optional().nullable(), // The path within the action result to store, e.g. 'response.user.id'- spread: z.boolean().optional().nullable(), // When true, spread object result into multiple variables as {key}_{property}- label: z.string().optional().nullable(), // Display label for the auto-created workflow variable- }),- z.array(- z.object({- key: z.string(),- result_path: z.string().optional().nullable(),- spread: z.boolean().optional().nullable(),- label: z.string().optional().nullable(),- })- ),+ HogFlowOutputVariableSchema,+ z.array(z.union([HogFlowOutputVariableSchema, legacyStringOutputVariable])),+ legacyStringOutputVariable,]).optional().nullable(),diff --git a/products/workflows/backend/api/graph_operations.py b/products/workflows/backend/api/graph_operations.pyindex 897b948e981c..f5f5e78e996e 100644--- a/products/workflows/backend/api/graph_operations.py+++ b/products/workflows/backend/api/graph_operations.py@@ -65,6 +65,8 @@ def apply_graph_operations(_fail(f"add_action: action id '{new_id}' already exists")actions.append(new_action)actions_by_id[new_id] = new_action+ for edge in op.get("edges") or []:+ edges.append(dict(edge))elif kind == "remove_action":target_id = op["id"]diff --git a/products/workflows/backend/api/hog_flow.py b/products/workflows/backend/api/hog_flow.pyindex 8043591602c7..ee3d5be900b9 100644--- a/products/workflows/backend/api/hog_flow.py+++ b/products/workflows/backend/api/hog_flow.py@@ -416,8 +416,31 @@ class HogFlowActionSerializer(serializers.Serializer):),)output_variable = serializers.JSONField(- required=False, allow_null=True, help_text="Output variable definition for downstream actions."- )+ required=False,+ allow_null=True,+ help_text="Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those.",+ )++ def validate_output_variable(self, value):+ # The worker only parses {key, ...} objects; anything else stored here makes the whole flow+ # row unparseable for the worker. Coerce a bare key string to the canonical shape and reject+ # the rest at write time.+ if value is None:+ return value++ def coerce(entry: Any) -> dict:+ if isinstance(entry, str) and entry:+ return {"key": entry}+ if isinstance(entry, dict) and isinstance(entry.get("key"), str) and entry["key"]:+ return entry+ raise serializers.ValidationError(+ "output_variable must be an object with a non-empty string 'key' (or a list of those); "+ "a bare string is accepted as the key."+ )++ if isinstance(value, list):+ return [coerce(entry) for entry in value]+ return coerce(value)def to_internal_value(self, data):# Weirdly nested serializers don't get this set...@@ -1299,9 +1322,10 @@ class HogFlowGraphOperationSerializer(serializers.Serializer):choices=GRAPH_OPERATION_TYPES,help_text=("Graph edit. update_action {id, patch}: deep-merge patch into the action's fields (a null leaf "- "deletes that key) — the surgical path for tweaking one config value. add_action {action}: append "- "a full action node. remove_action {id}: delete a node and reconnect its incoming edges to its "- "first outgoer. add_edge {edge} / remove_edge {edge}: add or delete one edge. "+ "deletes that key) — the surgical path for tweaking one config value. add_action {action, edges?}: "+ "append a full action node, optionally wiring its edges in the same op. remove_action {id}: delete "+ "a node and reconnect its incoming edges to its first outgoer. add_edge {edge} / remove_edge "+ "{edge}: add or delete one edge. ""replace_action_edges {id, edges}: replace this action's outgoing edges with the given set ""(use when adding/removing branch conditions); incoming edges are left intact."),@@ -1326,7 +1350,10 @@ class HogFlowGraphOperationSerializer(serializers.Serializer):edges = serializers.ListField(child=HogFlowEdgeSerializer(),required=False,- help_text="replace_action_edges only. The complete set of the action's outgoing edges; incoming edges are preserved.",+ help_text=(+ "replace_action_edges: the complete set of the action's outgoing edges (incoming edges are "+ "preserved). add_action: optional edges to wire the new node in the same op."+ ),)def validate(self, data):diff --git a/products/workflows/backend/api/test/test_graph_validation.py b/products/workflows/backend/api/test/test_graph_validation.pyindex 2a5dd99b87dd..4b3015fc6519 100644--- a/products/workflows/backend/api/test/test_graph_validation.py+++ b/products/workflows/backend/api/test/test_graph_validation.py@@ -147,6 +147,12 @@ class TestApplyGraphOperations(TestCase):new_actions, _ = apply_graph_operations([TRIGGER], [], [{"op": "add_action", "action": _fn("a")}])assert [x["id"] for x in new_actions] == ["t", "a"]+ def test_add_action_with_edges_wires_them(self):+ ops = [{"op": "add_action", "action": _fn("a"), "edges": [_edge("t", "a"), _edge("a", "x")]}]+ new_actions, new_edges = apply_graph_operations([TRIGGER, EXIT], [], ops)+ assert [x["id"] for x in new_actions] == ["t", "x", "a"]+ assert new_edges == [_edge("t", "a"), _edge("a", "x")]+def test_add_action_duplicate_id_raises(self):with pytest.raises(serializers.ValidationError) as exc:apply_graph_operations([TRIGGER, _fn("a")], [], [{"op": "add_action", "action": _fn("a")}])diff --git a/products/workflows/backend/api/test/test_hog_flow.py b/products/workflows/backend/api/test/test_hog_flow.pyindex ce801ea9e4ab..fd94dc18d154 100644--- a/products/workflows/backend/api/test/test_hog_flow.py+++ b/products/workflows/backend/api/test/test_hog_flow.py@@ -297,6 +297,37 @@ class TestHogFlowAPI(APIBaseTest):)assert response.status_code == 201, response.json()+ @parameterized.expand(+ [+ ("bare_string", "greeting", {"key": "greeting"}),+ ("string_list", ["a", "b"], [{"key": "a"}, {"key": "b"}]),+ ("already_object", {"key": "greeting", "result_path": "r"}, {"key": "greeting", "result_path": "r"}),+ ]+ )+ def test_output_variable_coerced_to_worker_shape(self, _name, sent, stored):+ # The worker's schema only parses {key, ...} objects; a bare string stored as-is makes the+ # whole flow row unparseable for the worker.+ flow = self._make_delay_flow({"delay_duration": "5m"})+ flow["actions"][1]["output_variable"] = sent+ response = self.client.post(f"/api/projects/{self.team.id}/hog_flows", flow)+ assert response.status_code == 201, response.json()+ assert response.json()["actions"][1]["output_variable"] == stored++ @parameterized.expand(+ [+ ("number", 42),+ ("empty_string", ""),+ ("dict_without_key", {"result_path": "r"}),+ ("list_with_invalid_entry", ["a", 42]),+ ]+ )+ def test_output_variable_invalid_shapes_rejected(self, _name, sent):+ flow = self._make_delay_flow({"delay_duration": "5m"})+ flow["actions"][1]["output_variable"] = sent+ response = self.client.post(f"/api/projects/{self.team.id}/hog_flows", flow)+ assert response.status_code == 400, response.json()+ assert "output_variable" in str(response.json())+def test_hog_flow_delay_validation_lenient_for_drafts(self):# status omitted defaults to draft; draft mode lets users save WIP with invalid configsresponse = self.client.post(diff --git a/products/workflows/frontend/generated/api.schemas.ts b/products/workflows/frontend/generated/api.schemas.tsindex 2ce1a3d603c8..6871b0a7642d 100644--- a/products/workflows/frontend/generated/api.schemas.ts+++ b/products/workflows/frontend/generated/api.schemas.ts@@ -438,7 +438,7 @@ export interface HogFlowActionApi {type: string/** Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}. */config: HogFlowActionApiConfig- /** Output variable definition for downstream actions. */+ /** Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those. */output_variable?: unknown}@@ -715,7 +715,7 @@ export const HogFlowGraphOperationOpEnumApi = {} as constexport interface HogFlowGraphOperationApi {- /** Graph edit. update_action {id, patch}: deep-merge patch into the action's fields (a null leaf deletes that key) — the surgical path for tweaking one config value. add_action {action}: append a full action node. remove_action {id}: delete a node and reconnect its incoming edges to its first outgoer. add_edge {edge} / remove_edge {edge}: add or delete one edge. replace_action_edges {id, edges}: replace this action's outgoing edges with the given set (use when adding/removing branch conditions); incoming edges are left intact.+ /** Graph edit. update_action {id, patch}: deep-merge patch into the action's fields (a null leaf deletes that key) — the surgical path for tweaking one config value. add_action {action, edges?}: append a full action node, optionally wiring its edges in the same op. remove_action {id}: delete a node and reconnect its incoming edges to its first outgoer. add_edge {edge} / remove_edge {edge}: add or delete one edge. replace_action_edges {id, edges}: replace this action's outgoing edges with the given set (use when adding/removing branch conditions); incoming edges are left intact.** * `update_action` - update_action* * `add_action` - add_action@@ -732,7 +732,7 @@ export interface HogFlowGraphOperationApi {action?: unknown/** add_edge / remove_edge only. The edge {from, to, type, index?}. */edge?: HogFlowEdgeApi- /** replace_action_edges only. The complete set of the action's outgoing edges; incoming edges are preserved. */+ /** replace_action_edges: the complete set of the action's outgoing edges (incoming edges are preserved). add_action: optional edges to wire the new node in the same op. */edges?: HogFlowEdgeApi[]}diff --git a/products/workflows/frontend/generated/api.zod.ts b/products/workflows/frontend/generated/api.zod.tsindex b6f9468983d1..f8049069d242 100644--- a/products/workflows/frontend/generated/api.zod.ts+++ b/products/workflows/frontend/generated/api.zod.ts@@ -697,7 +697,9 @@ export const HogFlowsCreateBody = /* @__PURE__ */ zodoutput_variable: zod.unknown().optional()- .describe('Output variable definition for downstream actions.'),+ .describe(+ 'Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those.'+ ),})).describe("Ordered action nodes. Exactly one type='trigger' required. Typically one type='exit' too."),@@ -1027,7 +1029,9 @@ export const HogFlowsUpdateBody = /* @__PURE__ */ zodoutput_variable: zod.unknown().optional()- .describe('Output variable definition for downstream actions.'),+ .describe(+ 'Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those.'+ ),})).describe("Ordered action nodes. Exactly one type='trigger' required. Typically one type='exit' too."),@@ -1362,7 +1366,9 @@ export const HogFlowsPartialUpdateBody = /* @__PURE__ */ zodoutput_variable: zod.unknown().optional()- .describe('Output variable definition for downstream actions.'),+ .describe(+ 'Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those.'+ ),})).optional()@@ -1413,7 +1419,7 @@ export const HogFlowsGraphPartialUpdateBody = /* @__PURE__ */ zod.object({'\* `update_action` - update_action\n\* `add_action` - add_action\n\* `remove_action` - remove_action\n\* `add_edge` - add_edge\n\* `remove_edge` - remove_edge\n\* `replace_action_edges` - replace_action_edges').describe(- "Graph edit. update_action {id, patch}: deep-merge patch into the action's fields (a null leaf deletes that key) — the surgical path for tweaking one config value. add_action {action}: append a full action node. remove_action {id}: delete a node and reconnect its incoming edges to its first outgoer. add_edge {edge} \/ remove_edge {edge}: add or delete one edge. replace_action_edges {id, edges}: replace this action's outgoing edges with the given set (use when adding\/removing branch conditions); incoming edges are left intact.\n\n\* `update_action` - update_action\n\* `add_action` - add_action\n\* `remove_action` - remove_action\n\* `add_edge` - add_edge\n\* `remove_edge` - remove_edge\n\* `replace_action_edges` - replace_action_edges"+ "Graph edit. update_action {id, patch}: deep-merge patch into the action's fields (a null leaf deletes that key) — the surgical path for tweaking one config value. add_action {action, edges?}: append a full action node, optionally wiring its edges in the same op. remove_action {id}: delete a node and reconnect its incoming edges to its first outgoer. add_edge {edge} \/ remove_edge {edge}: add or delete one edge. replace_action_edges {id, edges}: replace this action's outgoing edges with the given set (use when adding\/removing branch conditions); incoming edges are left intact.\n\n\* `update_action` - update_action\n\* `add_action` - add_action\n\* `remove_action` - remove_action\n\* `add_edge` - add_edge\n\* `remove_edge` - remove_edge\n\* `replace_action_edges` - replace_action_edges"),id: zod.string()@@ -1471,7 +1477,7 @@ export const HogFlowsGraphPartialUpdateBody = /* @__PURE__ */ zod.object({).optional().describe(- "replace_action_edges only. The complete set of the action's outgoing edges; incoming edges are preserved."+ "replace_action_edges: the complete set of the action's outgoing edges (incoming edges are preserved). add_action: optional edges to wire the new node in the same op."),}))@@ -1875,7 +1881,9 @@ export const HogFlowsInvocationsCreateBody = /* @__PURE__ */ zod.object({output_variable: zod.unknown().optional()- .describe('Output variable definition for downstream actions.'),+ .describe(+ 'Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those.'+ ),})).describe("Ordered action nodes. Exactly one type='trigger' required. Typically one type='exit' too."),@@ -2420,7 +2428,9 @@ export const HogFlowsBulkDeleteCreateBody = /* @__PURE__ */ zodoutput_variable: zod.unknown().optional()- .describe('Output variable definition for downstream actions.'),+ .describe(+ 'Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those.'+ ),})).describe("Ordered action nodes. Exactly one type='trigger' required. Typically one type='exit' too."),diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 4c3c7e028cc4..832c04af238a 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -32399,7 +32399,7 @@ export namespace Schemas {type: string;/** Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}. */config: HogFlowActionConfig;- /** Output variable definition for downstream actions. */+ /** Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those. */output_variable?: unknown;}@@ -32573,7 +32573,7 @@ export namespace Schemas {} as const;export interface HogFlowGraphOperation {- /** Graph edit. update_action {id, patch}: deep-merge patch into the action's fields (a null leaf deletes that key) — the surgical path for tweaking one config value. add_action {action}: append a full action node. remove_action {id}: delete a node and reconnect its incoming edges to its first outgoer. add_edge {edge} / remove_edge {edge}: add or delete one edge. replace_action_edges {id, edges}: replace this action's outgoing edges with the given set (use when adding/removing branch conditions); incoming edges are left intact.+ /** Graph edit. update_action {id, patch}: deep-merge patch into the action's fields (a null leaf deletes that key) — the surgical path for tweaking one config value. add_action {action, edges?}: append a full action node, optionally wiring its edges in the same op. remove_action {id}: delete a node and reconnect its incoming edges to its first outgoer. add_edge {edge} / remove_edge {edge}: add or delete one edge. replace_action_edges {id, edges}: replace this action's outgoing edges with the given set (use when adding/removing branch conditions); incoming edges are left intact.** * `update_action` - update_action* * `add_action` - add_action@@ -32590,7 +32590,7 @@ export namespace Schemas {action?: unknown;/** add_edge / remove_edge only. The edge {from, to, type, index?}. */edge?: HogFlowEdge;- /** replace_action_edges only. The complete set of the action's outgoing edges; incoming edges are preserved. */+ /** replace_action_edges: the complete set of the action's outgoing edges (incoming edges are preserved). add_action: optional edges to wire the new node in the same op. */edges?: HogFlowEdge[];}diff --git a/services/mcp/src/generated/workflows/api.ts b/services/mcp/src/generated/workflows/api.tsindex f56da1026818..d42cf56b4ae7 100644--- a/services/mcp/src/generated/workflows/api.ts+++ b/services/mcp/src/generated/workflows/api.ts@@ -352,7 +352,9 @@ export const HogFlowsCreateBody = /* @__PURE__ */ zodoutput_variable: zod.unknown().optional()- .describe('Output variable definition for downstream actions.'),+ .describe(+ 'Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those.'+ ),})).describe("Ordered action nodes. Exactly one type='trigger' required. Typically one type='exit' too."),@@ -694,7 +696,9 @@ export const HogFlowsPartialUpdateBody = /* @__PURE__ */ zodoutput_variable: zod.unknown().optional()- .describe('Output variable definition for downstream actions.'),+ .describe(+ 'Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those.'+ ),})).optional()@@ -754,7 +758,7 @@ export const HogFlowsGraphPartialUpdateBody = /* @__PURE__ */ zod.object({'* `update_action` - update_action\n* `add_action` - add_action\n* `remove_action` - remove_action\n* `add_edge` - add_edge\n* `remove_edge` - remove_edge\n* `replace_action_edges` - replace_action_edges').describe(- "Graph edit. update_action {id, patch}: deep-merge patch into the action's fields (a null leaf deletes that key) — the surgical path for tweaking one config value. add_action {action}: append a full action node. remove_action {id}: delete a node and reconnect its incoming edges to its first outgoer. add_edge {edge} / remove_edge {edge}: add or delete one edge. replace_action_edges {id, edges}: replace this action's outgoing edges with the given set (use when adding/removing branch conditions); incoming edges are left intact.\n\n* `update_action` - update_action\n* `add_action` - add_action\n* `remove_action` - remove_action\n* `add_edge` - add_edge\n* `remove_edge` - remove_edge\n* `replace_action_edges` - replace_action_edges"+ "Graph edit. update_action {id, patch}: deep-merge patch into the action's fields (a null leaf deletes that key) — the surgical path for tweaking one config value. add_action {action, edges?}: append a full action node, optionally wiring its edges in the same op. remove_action {id}: delete a node and reconnect its incoming edges to its first outgoer. add_edge {edge} / remove_edge {edge}: add or delete one edge. replace_action_edges {id, edges}: replace this action's outgoing edges with the given set (use when adding/removing branch conditions); incoming edges are left intact.\n\n* `update_action` - update_action\n* `add_action` - add_action\n* `remove_action` - remove_action\n* `add_edge` - add_edge\n* `remove_edge` - remove_edge\n* `replace_action_edges` - replace_action_edges"),id: zod.string()@@ -812,7 +816,7 @@ export const HogFlowsGraphPartialUpdateBody = /* @__PURE__ */ zod.object({).optional().describe(- "replace_action_edges only. The complete set of the action's outgoing edges; incoming edges are preserved."+ "replace_action_edges: the complete set of the action's outgoing edges (incoming edges are preserved). add_action: optional edges to wire the new node in the same op."),}))diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.jsonindex 72b340a500ca..1d3005deac3f 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.json@@ -295,7 +295,7 @@"description": "On failure: continue (skip the action and proceed) or abort (stop the run).\n\n* `continue` - continue\n* `abort` - abort"},"output_variable": {- "description": "Output variable definition for downstream actions."+ "description": "Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those."},"type": {"description": "trigger | function | function_email | function_sms | delay | conditional_branch | wait_until_condition | wait_until_time_window | random_cohort_branch | exit.",diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-update.jsonindex 9b9ea7ea2ba5..45270262b279 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-update.json@@ -294,7 +294,7 @@"description": "On failure: continue (skip the action and proceed) or abort (stop the run).\n\n* `continue` - continue\n* `abort` - abort"},"output_variable": {- "description": "Output variable definition for downstream actions."+ "description": "Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those."},"type": {"description": "trigger | function | function_email | function_sms | delay | conditional_branch | wait_until_condition | wait_until_time_window | random_cohort_branch | exit.",