fix(child-workflow-error-spans): pass trace-spans accurately in block logs#3054
Merged
icecrasher321 merged 5 commits intostagingfrom Jan 28, 2026
Merged
fix(child-workflow-error-spans): pass trace-spans accurately in block logs#3054icecrasher321 merged 5 commits intostagingfrom
icecrasher321 merged 5 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryThis PR refactors trace span handling for nested child workflows to separate display concerns from execution tracking data. The key improvements are:
The changes maintain backward compatibility by checking both Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant WH as WorkflowHandler
participant BE as BlockExecutor
participant WF as Child Workflow
participant TS as TraceSpans Builder
participant UI as Log Details UI
Note over WH,UI: Success Path - Child Workflow Execution
WH->>WF: Execute child workflow
WF->>WH: Return execution result
WH->>WH: captureChildWorkflowLogs(result)
WH->>TS: buildTraceSpans(result)
TS->>WH: Return trace spans
WH->>WH: Transform spans with metadata
WH->>BE: Return output with childTraceSpans
BE->>BE: Extract childTraceSpans from output
BE->>BE: Store childTraceSpans separately in blockLog
BE->>BE: filterOutputForLog (removes childTraceSpans)
Note over BE: Output is clean for display
Note over WH,UI: Error Path - Nested Workflow Failure
WH->>WF: Execute child workflow
WF-->>WH: Throw error with result
WH->>WH: captureChildWorkflowLogs(error.executionResult)
WH->>TS: buildTraceSpans(result)
TS->>WH: Return trace spans
WH->>WH: parseNestedWorkflowError(error)
WH->>WH: buildNestedWorkflowErrorMessage()
Note over WH: Format: "workflow" failed: error<br/>or Workflow chain: A → B | error
WH-->>BE: Throw ChildWorkflowError with childTraceSpans
BE->>BE: Extract childTraceSpans from error
BE->>BE: Store childTraceSpans in blockLog
BE->>BE: filterOutputForLog (removes childTraceSpans)
Note over WH,UI: Trace Span Processing
UI->>TS: Request trace spans from logs
TS->>TS: Check log.childTraceSpans (preferred)
TS->>TS: Fallback to log.output.childTraceSpans
TS->>TS: flattenWorkflowChildren(spans)
TS->>TS: Clean childTraceSpans from output
TS->>UI: Return processed spans
UI->>UI: filterHiddenOutputKeys(finalOutput)
Note over UI: Display clean output without childTraceSpans
|
Collaborator
Author
|
@cursor review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Tested manually
Checklist