Skip to content

Refactored variable resolvers.#27

Merged
lextatic merged 3 commits into
mainfrom
feature/refactor-variables
May 10, 2026
Merged

Refactored variable resolvers.#27
lextatic merged 3 commits into
mainfrom
feature/refactor-variables

Conversation

@lextatic

Copy link
Copy Markdown
Contributor

Changed

  • Merged VariableResolver and SharedVariableResolver with a scope parameter.
  • Refactored and a added shared variables support for ArrayVariableResolver.

@lextatic lextatic added the changed Changes in existing functionality label May 10, 2026
@lextatic lextatic requested a review from Copilot May 10, 2026 20:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 VariableResolver and SharedVariableResolver into a single VariableResolver(..., scope) API.
  • Refactored ArrayVariableResolver to resolve array variables from graph or shared Variables via IArrayPropertyResolver.
  • 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.

Comment thread Forge/Statescript/Properties/VariableResolver.cs Outdated
Comment thread Forge/Statescript/Properties/ArrayVariableResolver.cs Outdated
@lextatic lextatic merged commit b65306c into main May 10, 2026
1 check passed
@lextatic lextatic deleted the feature/refactor-variables branch May 10, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changed Changes in existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants