Make EventSubscriptionAgentFamily.DatabaseKeyOf and TenantNeutralKeyOf public (GH-3819) - #3829
Merged
Merged
Conversation
…f public (GH-3819) DatabaseKeyOf is the key group affinity distributes event-subscription agents on, so anything reasoning about agent placement per database -- an admin view, a readiness probe, a test asserting co-location -- needs it. Being internal, the only way to get it from outside Wolverine was to re-implement the agent URI grammar and hope the copy kept matching. That drift risk is not hypothetical: MartenTests' blue_green_version_bump_assignment already carried a verbatim copy while its siblings (sharded_two_databases_affine_colocation, durability_projection_affinity_real_stores) called the internal directly. A copy asserting co-location can quietly stop matching the key the distribution really groups on, and the test would keep passing while proving nothing. That copy is deleted here and now delegates. TenantNeutralKeyOf goes public in the same pass, as the issue suggests: it is the supersession relation's key, it already carried full XML documentation written as if it were public, and CoreTests reaches for it too. Consistent with the existing position that consumers should not hand-build event-subscription agent URIs but call the public helpers -- this is the read side of the same rule. Raised from marten#5170, whose reporter runs a 512-shard-database deployment. CoreTests event_subscription_family: 24 passed. MartenTests blue_green_version_bump_assignment: 2 passed. Full wolverine.slnx Release build clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHAuhdWS3XeAk16swV9G8m
This was referenced Aug 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 #3819.
EventSubscriptionAgentFamily.DatabaseKeyOfis the key group affinity distributes event-subscription agents on. It wasinternal, so anything outside Wolverine that wants to reason about agent placement per database — an admin view, a readiness probe, a test asserting co-location — had to re-implement the agent URI grammar.The drift risk is already real inside this repo
MartenTests/MultiTenancy/blue_green_version_bump_assignment.cscarried a verbatim copy:…while its siblings (
sharded_two_databases_affine_colocation.cs,durability_projection_affinity_real_stores.cs) call the real thing. That is the failure mode worth naming: a copy asserting co-location can silently stop matching the key the distribution actually groups on, and the test would keep passing while proving nothing. The copy is deleted here and delegates to the real method.Changes
DatabaseKeyOf→public, with XML docs replacing the//comment (matchingDatabaseIdOfright above it).TenantNeutralKeyOf→public, as the issue suggests in the same pass: it is the supersession relation's key, it already carried full XML documentation written as if it were public, andCoreTestsreaches for it too.blue_green_version_bump_assignment.csnow calls the public method.Consistent with the existing position that consumers should not hand-build event-subscription agent URIs but call the public helpers — this is the read side of the same rule.
Verification
CoreTestsevent_subscription_family*: 24 passedMartenTestsblue_green_version_bump_assignment: 2 passed — and since the deleted copy was byte-identical to the real implementation, that confirms no behaviour changewolverine.slnxRelease build clean, 0 warningsRaised from marten#5170, whose reporter runs a 512-shard-database deployment.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WHAuhdWS3XeAk16swV9G8m