Repository navigation
Conversation
Commands issued inside EventGroup.run, and from signal and update handlers, carry the active groups. Promise continuations do not capture that scope.
mjameswh
force-pushed
the
event-groups-scopes
branch
from
November 18, 2026 14:23
c018f14 to
4fb7280
Compare
mjameswh
marked this pull request as ready for review
November 18, 2026 14:56
This branch has not been deployed
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.
What was changed
Add experimental support for implicit Event Groups and scope-based propagation. This follows #3197, which added direct assignment.
EventGroup.runattaches the group to commands issued inside the callback. Nested scopes compose, and the earliest label for an id wins.addEventGroupsand the active scope are additive.Async.functionorAsync.procedurekeeps the scope that was active when it was started.Promise continuations (
thenApply,handle,thenCompose,exceptionally) do not capture the scope. They run on the thread that completes the promise, which is howCancellationScopeandWorkflowThreadLocalalready behave. Adopting a different behavior only for Event Groups would be inconsistent with other existing APIs. Extending context propagation on all APIs to also propagate to Promise continuations seems a desirable thing on the long term, but it is outside the scope of this PR, and would be a breaking behavior changes for existing workflows; we instead propose to delay this until the Java v2 SDK.