Skip to content

Improved IsValid resolver understand types that track their own validity. - #64

Merged
lextatic merged 2 commits into
mainfrom
feature/isvalid-validatable
Aug 22, 2026
Merged

Improved IsValid resolver understand types that track their own validity.#64
lextatic merged 2 commits into
mainfrom
feature/isvalid-validatable

Conversation

@lextatic

Copy link
Copy Markdown
Contributor

Description

Is Valid only checked for null. Several types here stay non-null after they stop referring to anything - an ActiveEffectHandle whose effect was removed, an AbilityHandle whose ability was revoked, an empty Tag - so the resolver called them valid and everything downstream acted on nothing. That is the opposite of what the resolver is for.

…n validity

Is Valid only checked for null. Several types here stay non-null after
they stop referring to anything - an ActiveEffectHandle whose effect was
removed, an AbilityHandle whose ability was revoked, an empty Tag - so
the resolver called them valid and everything downstream acted on
nothing. That is the opposite of what the resolver is for.
@lextatic lextatic added the changed Changes in existing functionality label Aug 22, 2026
@lextatic
lextatic requested a balanced review from Copilot August 22, 2026 16:33

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

Extends validity checks beyond nullability to types tracking their own usability.

Changes:

  • Adds the IValidatable contract.
  • Implements it for tags and effect/ability handles.
  • Updates IsValidResolver and tests for invalidated values.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Forge/Core/IValidatable.cs Defines the validity contract.
Forge/Tags/Tag.cs Exposes tag validity through the contract.
Forge/Effects/ActiveEffectHandle.cs Exposes active-effect handle validity.
Forge/Abilities/AbilityHandle.cs Exposes granted-ability handle validity.
Forge/Abilities/AbilityInstanceHandle.cs Exposes ability-instance handle validity.
Forge/Statescript/Properties/IsValidResolver.cs Evaluates IValidatable.IsValid.
Forge.Tests/Statescript/Resolvers/IsValidResolverTests.cs Tests validity-aware resolution.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Forge/Statescript/Properties/IsValidResolver.cs
@lextatic
lextatic merged commit e68dbad into main Aug 22, 2026
2 checks passed
@lextatic
lextatic deleted the feature/isvalid-validatable branch August 22, 2026 17:12
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