You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(durable-messaging): add hierarchical command and subject contracts - #11282
Durable messaging needs a stable application-defined command identity and an explicit protocol subject. This foundation supplies required HierarchicalKey MessageId, sender/receiver identities, ordinal Subject, and an ordinary GC-owned byte[] Payload. The readonly key uses literal-segment construction, canonical parsing/navigation, value equality, and cached hashing. Admission validates external metadata and non-null payloads before mutation.
The envelope is an ordinary non-disposable generated-serializer value. Struct assignment shares its array under the immutable-publication contract: application code keeps command bytes unchanged after direct Send or Deliver. Ordinary Orleans RPC deep copying and deserialization produce independent payload arrays. Serialization, shared dead-letter copying, and mutable-array isolation are verified without custom ownership codecs or RPC argument cleanup.
IInboxHandler.HandleAsync remains non-generic. The context exposes the envelope and explicit synchronous Complete(). From the first shared mutation through method return, handlers perform no awaits; the runtime owns actual journal persistence and acknowledgement. IDurableOutbox.SenderId exposes its owner for upper-layer typed send/reply helpers.
The foundation preserves main's ReadOnlySequence journal storage contract, V1 marker and V0/V1 readers, configured-format fallback, and the merged snapshot policy's 100-append/1 MiB defaults (#11471). The merged general Arc correctness changes (#11474) are preserved exactly from main. Its only included unmerged prerequisites are the current narrowed journal hooks (#11465 at 095bdb4eeb47bc61c7214f68a9df99501b0a8d64) and timer feature (#11464 at 79d7fba537f24fc6e8cce38c9328dd24170d9017). Every journal owner provides the mandatory IJournaledStateManager.Hooks getter and invokes its registered callbacks at the documented operation boundaries. Delegating owners forward the inner list. The standard manager rejects registration changes while persistence is queued or running and preserves actual operation outcomes. Hook implementations complete without awaiting initialization, persistence, or disposal on their own owner, whose work is serialized behind the current callback. Distinct pre-commit and post-commit exception types preserve the cause and outcome; their operation remains in the diagnostic message. The approved implementer-contract break has exactly two package-scoped CP0006 Hooks-property suppressions, one per target framework; the public delegate adapter is removed. Timer ticks use one Idle/Busy/Disposed phase, an eagerly created provider timer, and an explicit context-free message-construction path.
Abandoned RPC and dictionary value ownership work (#11468, #11469) is absent from implementation, generated APIs, and tests. Independent Arc codecs (#11463), dependency caches (#11467), and the narrowed pool-only improvement (#11470) are outside this layer. The closed format extraction (#11466) is excluded. Obsolete pool-budget and hook-adapter snippets are removed, while main's snapshot configuration and interface-based hook registration remain current.
Layer 1 of 4. Rebased onto main 42682376d80e1176a952ba13aa2de25a307b576e; published head ef6a16b0ead84f52a53896cece8e90ff168fe6c5. Review this layer. Receiver processing follows in #11284, outgoing delivery in #11285, and typed helpers/hosting/docs/samples in #10693.
Adds observer registration. Finding: moderate (1 vote) — null observers are not validated before the compatibility default throws NotSupportedException.
The current-main baseline is commit 42682376d8 and uses the same reviewed coverage matrix.
Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities.
The comparison remains report-only while normal line and branch variance is calibrated.
The comment uses “an segment separator”, which is grammatically incorrect and makes the validation explanation less clear; change it to “a segment separator”.
// A queued or running callback keeps its turn; changes schedule work after it completes.
if(_state==TimerState.Idle)
{
queueTick=ScheduleNextTick();
This branch has not been deployed
No deployments
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
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.
Durable messaging needs a stable application-defined command identity and an explicit protocol subject. This foundation supplies required
HierarchicalKey MessageId, sender/receiver identities, ordinalSubject, and an ordinary GC-ownedbyte[] Payload. The readonly key uses literal-segment construction, canonical parsing/navigation, value equality, and cached hashing. Admission validates external metadata and non-null payloads before mutation.The envelope is an ordinary non-disposable generated-serializer value. Struct assignment shares its array under the immutable-publication contract: application code keeps command bytes unchanged after direct Send or Deliver. Ordinary Orleans RPC deep copying and deserialization produce independent payload arrays. Serialization, shared dead-letter copying, and mutable-array isolation are verified without custom ownership codecs or RPC argument cleanup.
IInboxHandler.HandleAsyncremains non-generic. The context exposes the envelope and explicit synchronousComplete(). From the first shared mutation through method return, handlers perform no awaits; the runtime owns actual journal persistence and acknowledgement.IDurableOutbox.SenderIdexposes its owner for upper-layer typed send/reply helpers.The foundation preserves main's ReadOnlySequence journal storage contract, V1 marker and V0/V1 readers, configured-format fallback, and the merged snapshot policy's 100-append/1 MiB defaults (#11471). The merged general Arc correctness changes (#11474) are preserved exactly from main. Its only included unmerged prerequisites are the current narrowed journal hooks (#11465 at
095bdb4eeb47bc61c7214f68a9df99501b0a8d64) and timer feature (#11464 at79d7fba537f24fc6e8cce38c9328dd24170d9017). Every journal owner provides the mandatoryIJournaledStateManager.Hooksgetter and invokes its registered callbacks at the documented operation boundaries. Delegating owners forward the inner list. The standard manager rejects registration changes while persistence is queued or running and preserves actual operation outcomes. Hook implementations complete without awaiting initialization, persistence, or disposal on their own owner, whose work is serialized behind the current callback. Distinct pre-commit and post-commit exception types preserve the cause and outcome; their operation remains in the diagnostic message. The approved implementer-contract break has exactly two package-scoped CP0006 Hooks-property suppressions, one per target framework; the public delegate adapter is removed. Timer ticks use one Idle/Busy/Disposed phase, an eagerly created provider timer, and an explicit context-free message-construction path.Abandoned RPC and dictionary value ownership work (#11468, #11469) is absent from implementation, generated APIs, and tests. Independent Arc codecs (#11463), dependency caches (#11467), and the narrowed pool-only improvement (#11470) are outside this layer. The closed format extraction (#11466) is excluded. Obsolete pool-budget and hook-adapter snippets are removed, while main's snapshot configuration and interface-based hook registration remain current.
Layer 1 of 4. Rebased onto main
42682376d80e1176a952ba13aa2de25a307b576e; published headef6a16b0ead84f52a53896cece8e90ff168fe6c5. Review this layer. Receiver processing follows in #11284, outgoing delivery in #11285, and typed helpers/hosting/docs/samples in #10693.