Repository navigation
Honor shared JasperFx.IdentityAttribute in Polecat aggregate id resolution (closes #3117) - #3118
Merged
Merged
Conversation
…ution (closes #3117) Wolverine.Polecat's aggregate-handler codegen only recognized its own Wolverine.Polecat.IdentityAttribute when resolving the aggregate stream id member. Because the file's bare `IdentityAttribute` resolves to the Polecat-local type, the shared JasperFx.IdentityAttribute used by the rest of the Critter Stack (and honored by Wolverine.Marten) was ignored, breaking store-agnostic command/aggregate models meant to codegen against both stores. DetermineAggregateIdMember now recognizes both attributes, matching Marten's behavior so a single shared source can target Marten and Polecat without a per-store attribute alias. The error message also names both attributes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gate identity Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 16, 2026
Merged
This was referenced Jul 20, 2026
This was referenced Jul 27, 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.
Problem
Wolverine.Polecat's aggregate-handler codegen only recognized its ownWolverine.Polecat.IdentityAttributewhen resolving which command member is the aggregate stream id. Because the bareIdentityAttributereference inAggregateHandling.csresolves to the Polecat-local type (the file lives in theWolverine.Polecatnamespace), the sharedJasperFx.IdentityAttributeused across the rest of the Critter Stack — and honored byWolverine.Marten— was ignored.This broke store-agnostic command/aggregate models meant to compile and codegen against both Marten and Polecat from a single shared source, throwing:
The identical model codegens fine under Marten, whose resolver picks up
JasperFx.IdentityAttribute(Marten has no namespace-localIdentityAttribute, sousing JasperFx;wins).Fix
AggregateHandling.DetermineAggregateIdMembernow recognizes bothWolverine.Polecat.IdentityAttributeand the sharedJasperFx.IdentityAttribute, matching Marten's behavior. A single shared[Identity]source now codegens against both stores without the per-projectglobal using IdentityAttribute = Wolverine.Polecat.IdentityAttribute;alias workaround. The "unable to determine" error message also names both attributes.Tests
Added
determine_aggregate_id_with_shared_jasperfx_identity_attributetoPolecatTests.AggregateHandlerWorkflow.AggregateHandlerAttributeTests, using a command record decorated with the fully-qualified[property: JasperFx.Identity]attribute. All 15 tests in the suite pass.Closes #3117
🤖 Generated with Claude Code