refactor(runtime): start grain activation synchronously - #19
Closed
ReubenBond wants to merge 1 commit into
Closed
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 408b1948-f836-4328-9b59-c1a6d9504551
Owner
Author
|
Superseded by dotnet#10569. |
ReubenBond
added a commit
that referenced
this pull request
Aug 18, 2026
…tandardized error responses - Added SendError(string errorCode, string message, bool isRetriable) method to IInboxHandlerContext interface - Added SendError(Exception exception, bool isRetriable) overload for exception-based error responses - Implemented both methods in InboxHandlerContext with automatic reply routing - Reply route key derived from request route (e.g., 'payment/authorize' → 'payment/reply') - Preserves correlation key from original request for hierarchical workflows - Safe no-op behavior when envelope has no ReplyTo address (one-way messages) - ConvertToErrorCode helper converts exception types to error codes (e.g., InvalidOperationException → INVALID_OPERATION) - GetReplyRouteKey helper determines reply route from request route pattern - Comprehensive XML documentation with examples for validation errors, transient errors, and permanent errors - All 445 Orleans.Journaling tests pass Completes Features #19 and #20 from feature-list.json
ReubenBond
added a commit
that referenced
this pull request
Aug 21, 2026
…tandardized error responses - Added SendError(string errorCode, string message, bool isRetriable) method to IInboxHandlerContext interface - Added SendError(Exception exception, bool isRetriable) overload for exception-based error responses - Implemented both methods in InboxHandlerContext with automatic reply routing - Reply route key derived from request route (e.g., 'payment/authorize' → 'payment/reply') - Preserves correlation key from original request for hierarchical workflows - Safe no-op behavior when envelope has no ReplyTo address (one-way messages) - ConvertToErrorCode helper converts exception types to error codes (e.g., InvalidOperationException → INVALID_OPERATION) - GetReplyRouteKey helper determines reply route from request route pattern - Comprehensive XML documentation with examples for validation errors, transient errors, and permanent errors - All 445 Orleans.Journaling tests pass Completes Features #19 and #20 from feature-list.json
ReubenBond
added a commit
that referenced
this pull request
Aug 22, 2026
…tandardized error responses - Added SendError(string errorCode, string message, bool isRetriable) method to IInboxHandlerContext interface - Added SendError(Exception exception, bool isRetriable) overload for exception-based error responses - Implemented both methods in InboxHandlerContext with automatic reply routing - Reply route key derived from request route (e.g., 'payment/authorize' → 'payment/reply') - Preserves correlation key from original request for hierarchical workflows - Safe no-op behavior when envelope has no ReplyTo address (one-way messages) - ConvertToErrorCode helper converts exception types to error codes (e.g., InvalidOperationException → INVALID_OPERATION) - GetReplyRouteKey helper determines reply route from request route pattern - Comprehensive XML documentation with examples for validation errors, transient errors, and permanent errors - All 445 Orleans.Journaling tests pass Completes Features #19 and #20 from feature-list.json
ReubenBond
added a commit
that referenced
this pull request
Aug 23, 2026
…tandardized error responses - Added SendError(string errorCode, string message, bool isRetriable) method to IInboxHandlerContext interface - Added SendError(Exception exception, bool isRetriable) overload for exception-based error responses - Implemented both methods in InboxHandlerContext with automatic reply routing - Reply route key derived from request route (e.g., 'payment/authorize' → 'payment/reply') - Preserves correlation key from original request for hierarchical workflows - Safe no-op behavior when envelope has no ReplyTo address (one-way messages) - ConvertToErrorCode helper converts exception types to error codes (e.g., InvalidOperationException → INVALID_OPERATION) - GetReplyRouteKey helper determines reply route from request route pattern - Comprehensive XML documentation with examples for validation errors, transient errors, and permanent errors - All 445 Orleans.Journaling tests pass Completes Features #19 and #20 from feature-list.json
ReubenBond
added a commit
that referenced
this pull request
Aug 24, 2026
…tandardized error responses - Added SendError(string errorCode, string message, bool isRetriable) method to IInboxHandlerContext interface - Added SendError(Exception exception, bool isRetriable) overload for exception-based error responses - Implemented both methods in InboxHandlerContext with automatic reply routing - Reply route key derived from request route (e.g., 'payment/authorize' → 'payment/reply') - Preserves correlation key from original request for hierarchical workflows - Safe no-op behavior when envelope has no ReplyTo address (one-way messages) - ConvertToErrorCode helper converts exception types to error codes (e.g., InvalidOperationException → INVALID_OPERATION) - GetReplyRouteKey helper determines reply route from request route pattern - Comprehensive XML documentation with examples for validation errors, transient errors, and permanent errors - All 445 Orleans.Journaling tests pass Completes Features #19 and #20 from feature-list.json
ReubenBond
added a commit
that referenced
this pull request
Aug 24, 2026
…tandardized error responses - Added SendError(string errorCode, string message, bool isRetriable) method to IInboxHandlerContext interface - Added SendError(Exception exception, bool isRetriable) overload for exception-based error responses - Implemented both methods in InboxHandlerContext with automatic reply routing - Reply route key derived from request route (e.g., 'payment/authorize' → 'payment/reply') - Preserves correlation key from original request for hierarchical workflows - Safe no-op behavior when envelope has no ReplyTo address (one-way messages) - ConvertToErrorCode helper converts exception types to error codes (e.g., InvalidOperationException → INVALID_OPERATION) - GetReplyRouteKey helper determines reply route from request route pattern - Comprehensive XML documentation with examples for validation errors, transient errors, and permanent errors - All 445 Orleans.Journaling tests pass Completes Features #19 and #20 from feature-list.json
ReubenBond
added a commit
that referenced
this pull request
Aug 25, 2026
…tandardized error responses - Added SendError(string errorCode, string message, bool isRetriable) method to IInboxHandlerContext interface - Added SendError(Exception exception, bool isRetriable) overload for exception-based error responses - Implemented both methods in InboxHandlerContext with automatic reply routing - Reply route key derived from request route (e.g., 'payment/authorize' → 'payment/reply') - Preserves correlation key from original request for hierarchical workflows - Safe no-op behavior when envelope has no ReplyTo address (one-way messages) - ConvertToErrorCode helper converts exception types to error codes (e.g., InvalidOperationException → INVALID_OPERATION) - GetReplyRouteKey helper determines reply route from request route pattern - Comprehensive XML documentation with examples for validation errors, transient errors, and permanent errors - All 445 Orleans.Journaling tests pass Completes Features #19 and #20 from feature-list.json
ReubenBond
added a commit
that referenced
this pull request
Aug 26, 2026
…tandardized error responses - Added SendError(string errorCode, string message, bool isRetriable) method to IInboxHandlerContext interface - Added SendError(Exception exception, bool isRetriable) overload for exception-based error responses - Implemented both methods in InboxHandlerContext with automatic reply routing - Reply route key derived from request route (e.g., 'payment/authorize' → 'payment/reply') - Preserves correlation key from original request for hierarchical workflows - Safe no-op behavior when envelope has no ReplyTo address (one-way messages) - ConvertToErrorCode helper converts exception types to error codes (e.g., InvalidOperationException → INVALID_OPERATION) - GetReplyRouteKey helper determines reply route from request route pattern - Comprehensive XML documentation with examples for validation errors, transient errors, and permanent errors - All 445 Orleans.Journaling tests pass Completes Features #19 and #20 from feature-list.json
ReubenBond
added a commit
that referenced
this pull request
Aug 28, 2026
…tandardized error responses - Added SendError(string errorCode, string message, bool isRetriable) method to IInboxHandlerContext interface - Added SendError(Exception exception, bool isRetriable) overload for exception-based error responses - Implemented both methods in InboxHandlerContext with automatic reply routing - Reply route key derived from request route (e.g., 'payment/authorize' → 'payment/reply') - Preserves correlation key from original request for hierarchical workflows - Safe no-op behavior when envelope has no ReplyTo address (one-way messages) - ConvertToErrorCode helper converts exception types to error codes (e.g., InvalidOperationException → INVALID_OPERATION) - GetReplyRouteKey helper determines reply route from request route pattern - Comprehensive XML documentation with examples for validation errors, transient errors, and permanent errors - All 445 Orleans.Journaling tests pass Completes Features #19 and #20 from feature-list.json
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.
Follow-up to dotnet#10565 and part of the fix for dotnet#10556. This PR depends on the grain-context configuration contract introduced by dotnet#10565.
Grain activation now starts synchronously on the activation scheduler using
Task.RunSynchronously, with the activation installed explicitly as the currentRuntimeContext. This ensures construction and activation begin beforeCreateContextreturns while retaining scheduler affinity.The synchronous transition must run under a clean
ExecutionContext; otherwise ambient state such as request or transactionAsyncLocalvalues can leak into activation.DefaultExecutionContextaccesses CoreCLR's internalExecutionContext.DefaultusingUnsafeAccessor, with a portable fallback which captures an execution context while flow is suppressed. Focused tests verify both the runtime-default and fallback paths isolate ambient state.Focused validation passed on both
net8.0andnet10.0: the default execution-context and grain-context activator tests (3 per framework), grain activator tests (3 per framework), and transaction attribution test (1 per framework).