fix(block-resolver): path lookup check#2869
Merged
icecrasher321 merged 2 commits intostagingfrom Jan 17, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryAdded schema-based validation to block output path resolution to catch typos early. When a path is not found in runtime data, the resolver now checks if the path exists in the block's output schema - throwing an error for invalid paths (likely typos) while returning Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant BlockResolver
participant Schema as Output Schema
participant Data as Runtime Data
User->>BlockResolver: resolve("<block.field>")
BlockResolver->>BlockResolver: Parse reference path
BlockResolver->>Data: Look up block output
alt Data contains path
BlockResolver->>User: Return value
else Data missing path
BlockResolver->>BlockResolver: Check backwards compatibility
alt Backwards compat matches
BlockResolver->>User: Return adjusted value
else No compat match
BlockResolver->>Schema: Check if path exists in schema
alt Path NOT in schema
BlockResolver->>User: Throw error (typo detected)
else Path in schema
BlockResolver->>User: Return undefined (optional field)
end
end
end
|
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
Path lookup should fail on invalid output.
We already have O(1) resolution lookup, so just uses that.
Type of Change
Testing
Tested manually
Checklist