Skip to content

feature(subscription): scope wait callbacks at runtime - #63

Merged
Galfurian merged 1 commit into
devfrom
feature/scoped-wait-subscriptions
May 11, 2026
Merged

feature(subscription): scope wait callbacks at runtime#63
Galfurian merged 1 commit into
devfrom
feature/scoped-wait-subscriptions

Conversation

@Galfurian

Copy link
Copy Markdown
Member

What this PR does

Adds support for scoping subscription callbacks to the active execution context, so wait conditions and runtime subscriptions use the correct listener instead of sharing callback state across executions.

Why

Previously, subscription callbacks were effectively global to the variable node, which made nested or concurrent executions brittle. The missing piece was keeping the callback tied to the active context that created the subscription.

Main changes

  • Added context-scoped callback storage on ExecutionContext.
  • Threaded the active callback through wait-condition subscription setup.
  • Updated composite method execution to carry the scoped callback into child subscriptions.
  • Added a shared SubscriptionCallback type alias to avoid repeating the callback signature.
  • Added/updated tests to cover scoped wait-subscription behavior.
  • Added a small subscription example showing multiple listeners and clear notification flow.

Validation

  • Focused behavior/composite test suites pass after the change.
  • The subscription example runs and shows the expected callback sequence clearly.

@Galfurian Galfurian linked an issue May 11, 2026 that may be closed by this pull request
@Galfurian
Galfurian merged commit 186a8ed into dev May 11, 2026
4 checks passed
@Galfurian
Galfurian deleted the feature/scoped-wait-subscriptions branch May 11, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade: Variable Node Subscription

1 participant