Repository navigation
feat(logs): record which deployment version of a child workflow ran - #10383
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed across 11 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
[Medium impact] No separate new issue blocks merging this revision. SummaryThe PR records child deployment versions in traces and shows them in CLI text output.
Reviews (3) · Last reviewed commit: "fix(agent): only drop the child version ..." · Reviewed by Greptile |
…e 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.
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 15 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/executor/handlers/agent/handler.ts">
<violation number="1" location="apps/sim/executor/handlers/agent/handler.ts:3248">
P3: This removes `childDeploymentVersionId` from every custom tool result, so an ordinary custom tool returning that field loses user data even though only `workflow_executor` should promote it to a span field. Restrict the omission to the normalized `workflow_executor` name.</violation>
</file>
… the workflow tool
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
deploymentVersionIdto authorize the call, but the parent trace kept onlychildWorkflowSnapshotId, and that id can change with no redeploy (orphaned-snapshot cleanup, block migrations applied before hashing)childDeploymentVersionId:workflow_executorAgent tool span after a successful callsim logs get <runId> --traceagainstsim workflows versions list <workflowId>Limits
Test plan
workflow_executortool span gets it in both span builders; another tool returning the key does notcheck:openapipasses