You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6b87cf8
Browse filesBrowse the repository at this point in the historyBrowse files
feat(logs): record which deployment version of a child workflow ran (#10383)
* feat(logs): record which deployment version of a child workflow ran
A deployed run calls each child workflow's active version, and the handler
already loads that version id to authorize the call, but the parent trace
only kept the child's snapshot id. Snapshot ids are not a stable graph
identity: orphaned-snapshot cleanup and block migrations can mint a new id
with no redeploy.
Spans now carry an optional childDeploymentVersionId:
- on a workflow block's span, on success and failure, for deployed children
- on a workflow_executor Agent tool span after a successful call
It is taken only from workflow blocks and that tool, so another block or tool
returning the same key records nothing. Draft children and custom blocks never
get one. The v2 log contract documents the field.
* chore(sim-cli): regenerate v2 API types for childDeploymentVersionId
* fix(logs): keep child versions honest across tools, workspaces and the CLI
- A custom tool titled workflow_executor loses its custom_ prefix before the
span factory sees it, so its result could claim a child version. The Agent
drops the key from custom tool results where the prefix is stripped.
- The version is recorded only after the child passes the same-workspace
check, so that refusal never names another workspace's version.
- `sim logs get --trace` text output shows the child version.
* fix(agent): only drop the child version from a custom tool named like the workflow tool
Copy file name to clipboardExpand all lines: apps/docs/openapi-v2-logs.json
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1395,6 +1395,10 @@
1395
1395
"type": "string",
1396
1396
"description": "Workflow block associated with the span."
1397
1397
},
1398
+
"childDeploymentVersionId": {
1399
+
"type": "string",
1400
+
"description": "Deployment version of the child workflow this call ran, on a workflow block span or a workflow Agent tool span. Match it to the child workflow's versions list. Absent for draft children, custom blocks, failed Agent tool calls, and runs recorded before this field existed."
1401
+
},
1398
1402
"input": {
1399
1403
"description": "Input captured for the traced operation."
blockId: z.string().describe('Workflow block associated with the span.').optional(),
248
+
childDeploymentVersionId: z
249
+
.string()
250
+
.describe(
251
+
"Deployment version of the child workflow this call ran, on a workflow block span or a workflow Agent tool span. Match it to the child workflow's versions list. Absent for draft children, custom blocks, failed Agent tool calls, and runs recorded before this field existed."
252
+
)
253
+
.optional(),
247
254
input: z.unknown().describe('Input captured for the traced operation.').optional(),
248
255
output: z.unknown().describe('Output captured for the traced operation.').optional(),
0 commit comments