Refactored variable resolvers.#27
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates graph-local and shared-variable resolution by introducing a VariableScope parameter to variable resolvers, removing the dedicated SharedVariableResolver, and updating array variable resolution to support shared scope as well.
Changes:
- Merged
VariableResolverandSharedVariableResolverinto a singleVariableResolver(..., scope)API. - Refactored
ArrayVariableResolverto resolve array variables from graph or sharedVariablesviaIArrayPropertyResolver. - Updated tests and documentation to reflect the new scope-aware resolver approach and removed shared-resolver artifacts.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Forge/Statescript/Properties/VariableResolver.cs | Adds VariableScope support to read from graph-local or shared variables. |
| Forge/Statescript/Properties/SharedVariableResolver.cs | Removes deprecated resolver in favor of scoped VariableResolver. |
| Forge/Statescript/Properties/ArrayVariableResolver.cs | Refactors to scope-aware array resolution via IArrayPropertyResolver. |
| Forge/Statescript/GraphProcessor.cs | Updates XML docs to reference scope-aware resolvers. |
| Forge.Tests/Statescript/Resolvers/VariableResolverTests.cs | Adds coverage for shared-scope reads and null shared variables. |
| Forge.Tests/Statescript/Resolvers/SharedVariableResolverTests.cs | Removes tests for the deleted resolver. |
| Forge.Tests/Statescript/Resolvers/ArrayResolverTests.cs | Updates tests for new array resolver behavior and shared-scope support. |
| docs/statescript/variables.md | Updates guidance/examples to use scope-aware resolvers for shared variables. |
| docs/statescript/resolvers/variable-resolver.md | Documents new scope parameter and shared-scope usage. |
| docs/statescript/resolvers/shared-variable-resolver.md | Removes docs for deleted resolver. |
| docs/statescript/resolvers/README.md | Updates resolver overview to remove SharedVariableResolver and clarify array resolver interfaces. |
| docs/statescript/resolvers/array-resolver.md | Updates ArrayVariableResolver docs to reflect variable-name + scope-based resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Changed