Add CosmosDB control queue transport for node agent communication#2312
Merged
Conversation
Introduces a CosmosDB-based control transport that enables node-to-node communication using the existing wolverine container with partition-based message routing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…uments Fixes CosmosDB 400/1001 (partition key mismatch) errors when the CosmosClient is configured with System.Text.Json instead of Newtonsoft.Json. All document types now carry both [JsonProperty] and [JsonPropertyName] attributes so property names serialize to camelCase regardless of which serializer is active. Adds serialization tests verifying both serializers produce identical property names for all CosmosDB document types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move the LeadershipElectionCompliance tests from CosmosDbTests into a dedicated CosmosDbTests.LeaderElection project under LeaderElection/, matching the pattern used by PostgreSQL, SQL Server, MySQL, and RavenDb leadership election tests. This prevents flaky leadership tests from affecting the core CosmosDb compliance test suite. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 17, 2026
This was referenced Mar 29, 2026
This was referenced Apr 5, 2026
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.
Closes #2311
Summary
cosmoscontrol://protocol) for direct node-to-node agent communication, mirroring the existingDatabaseControlTransportpattern used by RDBMS persistencewolverinecontainer using partition keys ofcontrol-{nodeId}for efficient single-partition pollingCosmosDbMessageStore.Initialize()when running inDurabilityMode.Balanced[JsonProperty]and[JsonPropertyName]attributes to CosmosDB document types for STJ/Newtonsoft compatibilityLeadershipElectionCompliancetests in a dedicatedCosmosDbTests.LeaderElectionprojectImplementation
CosmosDbControlTransport—ITransportimplementation managing per-node endpointsCosmosDbControlEndpoint—Endpointsubclass creating listeners/senders per nodeCosmosDbControlListener—IListenerpolling CosmosDb every 1 second for control messagesCosmosDbControlSender—ISenderwriting control message documents with 30-second TTLControlMessage— Document model stored in the sharedwolverinecontainerTest plan
LeadershipElectionCompliancetests pass individually (10/12 pass, 2 are timing-sensitive and pass on retry)CosmosDbTests.LeaderElectionproject to avoid flakiness affecting core tests🤖 Generated with Claude Code