-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(resolver): consolidate reference resolution #2941
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 SummaryExtracted duplicate block reference resolution logic into a new Key improvements:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Handler as Block Handler
participant Collector as collectBlockData
participant Executor as Function Execute API
participant Resolver as resolveBlockReference
participant Schema as Output Schema
Handler->>Collector: collectBlockData(ctx)
Collector->>Schema: getBlockOutputs(blockType)
Schema-->>Collector: outputSchema
Collector-->>Handler: {blockData, blockNameMapping, blockOutputSchemas}
Handler->>Executor: executeTool with schemas
Executor->>Executor: resolveTagVariables()
Executor->>Resolver: resolveBlockReference(blockName, fieldPath, context)
Resolver->>Resolver: normalize blockName
Resolver->>Resolver: lookup blockId from mapping
alt Schema exists
Resolver->>Resolver: isPathInSchema(schema, pathParts)
alt Path invalid
Resolver-->>Executor: throw InvalidFieldError
else Path valid
Resolver->>Resolver: navigatePath(blockOutput, pathParts)
Resolver-->>Executor: {value, blockId}
end
else No schema
Resolver->>Resolver: navigatePath(blockOutput, pathParts)
Resolver-->>Executor: {value, blockId}
end
Executor->>Executor: Replace tag with safe variable
Executor-->>Handler: Execution result
|
|
@cursor review |
|
@cursor review |
|
@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
…lution consolidation, helm updates (#2946) * improvement(workflow-item): stabilize avatar layout and fix name truncation (#2939) * improvement(workflow-item): stabilize avatar layout and fix name truncation * fix(avatars): revert overflow bg to hardcoded color for contrast * fix(executor): stop parallel execution when block errors (#2940) * improvement(helm): add per-deployment extraVolumes support (#2942) * fix(gmail): expose messageId field in read email block (#2943) * fix(resolver): consolidate reference resolution (#2941) * fix(resolver): consolidate code to resolve references * fix edge cases * use already formatted error * fix multi index * fix backwards compat reachability * handle backwards compatibility accurately * use shared constant correctly * feat(router): expose reasoning output in router v2 block (#2945) * fix(copilot): always allow, credential masking (#2947) * Fix always allow, credential validation * Credential masking * Autoload * fix(executor): handle condition dead-end branches in loops (#2944) --------- Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Summary
Standard system in block resolver class extracted and reused.
Function / Code resolution bugs fixed.
Other edge cases like single letter block names, and _ collisions handled.
Type of Change
Testing
Added tests + tested manually
Checklist