-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(multi-trigger): resolution paths for triggers #3002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR fixes multi-trigger path resolution by ensuring block output schemas are correctly resolved for all blocks (not just executed ones) and that external triggers properly handle structured input formats. Key Changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Executor as Executor
participant BlockData as collectBlockData
participant GetBlockSchema as getBlockSchema
participant ToolUtils as getTool
participant BlockResolver as BlockResolver
participant StartBlock as buildStartBlockOutput
participant IntegrationTrigger as buildIntegrationTriggerOutput
Note over Executor,IntegrationTrigger: Multi-Trigger Resolution Flow
Executor->>BlockData: collectBlockData(ctx)
activate BlockData
loop For each blockState
BlockData->>BlockData: Collect output data
end
Note over BlockData: NEW: Iterate ALL workflow blocks<br/>(not just executed blocks)
loop For each workflow block
BlockData->>BlockData: Map block names
BlockData->>ToolUtils: getTool(block.config.tool)
ToolUtils-->>BlockData: toolConfig
BlockData->>GetBlockSchema: getBlockSchema(block, toolConfig)
activate GetBlockSchema
alt block.outputs exists
GetBlockSchema-->>BlockData: block.outputs
else toolConfig.outputs exists
GetBlockSchema-->>BlockData: toolConfig.outputs
else
GetBlockSchema-->>BlockData: undefined
end
deactivate GetBlockSchema
BlockData->>BlockData: Store schema for block
end
BlockData-->>Executor: {blockData, blockNameMapping, blockOutputSchemas}
deactivate BlockData
Executor->>BlockResolver: resolve(reference, context)
activate BlockResolver
BlockResolver->>ToolUtils: getTool(toolId)
ToolUtils-->>BlockResolver: toolConfig
BlockResolver->>GetBlockSchema: getBlockSchema(block, toolConfig)
GetBlockSchema-->>BlockResolver: outputSchema
BlockResolver-->>Executor: resolved value
deactivate BlockResolver
Executor->>StartBlock: buildStartBlockOutput(options)
activate StartBlock
alt path === EXTERNAL_TRIGGER
StartBlock->>IntegrationTrigger: buildIntegrationTriggerOutput(input, structured, hasStructured)
activate IntegrationTrigger
alt hasStructured === true
Note over IntegrationTrigger: NEW: Return structured input<br/>for trigger mode blocks
IntegrationTrigger-->>StartBlock: {...structuredInput}
else
IntegrationTrigger-->>StartBlock: workflowInput as object or {}
end
deactivate IntegrationTrigger
else other paths
StartBlock->>StartBlock: Build output per path
end
StartBlock-->>Executor: NormalizedBlockOutput
deactivate StartBlock
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No files reviewed, no comments
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Summary
Resolution for multi-trigger paths needs to account for trigger mode + block mapping should have all blocks not just execution path.
Type of Change
Testing
Tested manually
Checklist