Skip to content

Added per operation cue changes mechanism. - #68

Merged
lextatic merged 3 commits into
mainfrom
bugfix/per-operation-cue-changes
Sep 19, 2026
Merged

lextatic merged 3 commits into
mainfrom
bugfix/per-operation-cue-changes

Conversation

@lextatic

Copy link
Copy Markdown
Contributor

Ensure cues tally attribute changes per individual operation so effects, rebuilds after a set change, and outer pending deltas don't leak into each other- modifier-success check so AttributeChange and RequireModifierSuccessToTriggerCue judge only the effect's own operation.

Cues and the modifier-success check read a change set scoped to the operation, so nested effects, rebuilds after a set change and outer pending deltas no longer leak into each other.
AttributeValueChange and RequireModifierSuccessToTriggerCue now judge the effect's own operation only.
@lextatic lextatic added the added New features label Sep 19, 2026
@lextatic
lextatic requested a balanced review from Copilot September 19, 2026 14:27

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.

Copilot review overview

🟡 Changes recommended

Cue magnitudes can still leak across callbacks, and removed or replaced attributes lose their recorded deltas.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

Adds per-operation attribute change tracking so cues only observe changes from their originating effect operation.

Changes:

  • Introduces pooled AttributeChangeSet scopes.
  • Integrates change sets into effect application, execution, rebuilding, and cue evaluation.
  • Adds reentrancy tests and updates cue documentation.
File Description
Forge/​Effects/​EffectsManager.cs Tracks changes during application and rebuilding.
Forge/​Effects/​Effect.cs Tracks execution-specific changes.
Forge/​Effects/​ActiveEffect.cs Tracks reapplication and stacking changes.
Forge/​Cues/​CuesManager.cs Evaluates cues from operation change sets.
Forge/​Core/​EntityAttributes.cs Manages change scopes and pooling.
Forge/​Attributes/​EntityAttribute.cs Records value deltas in its container.
Forge/​Attributes/​AttributeChangeSet.cs Implements operation-level delta storage.
Forge.Tests/​Cues/​CueMagnitudeReentrancyTests.cs Tests nested operations and rebuild behavior.
docs/​effects/​README.md Clarifies modifier-success semantics.
docs/​cues.md Documents operation-specific cue magnitudes.

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

Comment thread Forge/Cues/CuesManager.cs Outdated
Comment thread Forge/Cues/CuesManager.cs Outdated
Comment thread Forge/Effects/EffectsManager.cs
All cue magnitudes are read once, right after the operation writes, and dispatched after its hooks; deltas are looked up by attribute key so a departed or swapped attribute keeps its change.
@lextatic
lextatic merged commit de9be79 into main Sep 19, 2026
2 checks passed
@lextatic
lextatic deleted the bugfix/per-operation-cue-changes branch September 19, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants