Polecat IDocumentSession scope priming (GH-3001, Polecat slice)#3004
Merged
jeremydmiller merged 1 commit intoJun 1, 2026
Merged
Conversation
Mirrors the Marten slice for Polecat: when a handler falls back to service location, a service-located Polecat IDocumentSession / IQuerySession now resolves to the SAME outbox-enrolled session the handler is using, not a separate un-enrolled one. - ScopedDocumentSessionHolder + PrimeScopedDocumentSessionFrame (Polecat.IDocumentSession), registered via the WolverineOptions.ScopingFrameSources seam in PolecatIntegration. - IntegrateWithWolverine decorates Polecat's IDocumentSession / IQuerySession scoped registrations to prefer the primed session, delegating to Polecat's original factory for non-handler scopes. No core changes — purely reuses the ScopingFrameSources registry. New PolecatTests.service_location_document_session proves one IDocumentSession through a service-located graph (ReferenceEquals, SQL Server). 70 Polecat aggregate/outbox tests and wolverine.slnx pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The Polecat slice of #3001, mirroring the Marten slice (#3003). When a handler falls back to service location, a service-located Polecat
IDocumentSession/IQuerySessionnow resolves to the same outbox-enrolled session the handler is using — not a separate, un-enrolled one.How it works (mirror of #3003)
ScopedDocumentSessionHolder+PrimeScopedDocumentSessionFramefor Polecat'sIDocumentSession, registered via theWolverineOptions.ScopingFrameSourcesseam (from Marten IDocumentSession scope priming (GH-3001, Marten slice) #3003) inPolecatIntegration.IntegrateWithWolverinedecorates Polecat's ownIDocumentSession/IQuerySessionscoped registrations to prefer the primed session, delegating to Polecat's original factory for non-handler scopes.No core changes — this slice purely reuses the registry introduced in #3003.
Verification
PolecatTests.service_location_document_sessionproves oneIDocumentSessionflows through a service-located object graph (ReferenceEquals, SQL Server).dotnet build wolverine.slnx -c Releaseclean.Based on
feat-3001-marten-scope-priming(#3003) because it depends on theScopingFrameSourcesregistry that lives there. Merge #3002 → #3003 → this, in order, to avoid the registry being absent. Once #3003 merges to main, this PR retargets to main.Remaining follow-ups
HTTP + gRPC chains; the ancillary-store matrix.
🤖 Generated with Claude Code