Failing Test for GH-678 - #679
Merged
Merged
Conversation
Member
|
@ericgreenmix On it now. |
jeremydmiller
added a commit
that referenced
this pull request
Feb 20, 2017
jeremydmiller
added a commit
that referenced
this pull request
Aug 18, 2026
Bumps the JasperFx line to 2.52.0 and adopts IDocumentCommitListener /
IDocumentChangeSet / IDocumentDeletion, the store-agnostic post-commit
SESSION hook, so a listener written once works on Marten, Polecat and
Fisher alike.
Adopted as an ADAPTER rather than by widening Marten's own types, and that
is forced by the compiler rather than chosen:
* IChangeSet.Inserted/Updated are IEnumerable<object>, which does not
satisfy the contract's IReadOnlyList<object>
* IChangeSet.Deleted is IEnumerable<Weasel.Storage.IDeletion>, which
does not satisfy IReadOnlyList<IDocumentDeletion>
* DocumentSessionListenerBase.AfterCommitAsync differs from the
contract's signature in three of its four positions
Putting IDocumentChangeSet on IChangeSet would therefore be a breaking
change to every existing Marten listener, and putting it on
ISessionWorkTracker would additionally rope in ProjectionUpdateBatch,
whose Inserted/Updated/Deleted all throw NotSupportedException.
MartenDocumentChangeSet materialises the three collections in its
constructor. That is load-bearing, not defensive: Marten's IChangeSet IS
the session's live UnitOfWork, its members are lazy LINQ chains over
_operations, and SaveChangesAsync resets it immediately after the listener
loop. Proven by a negative control -- a lazy forward fails four of the ten
compliance facts.
Registration mirrors IInitialData exactly. AddMarten() sweeps
IDocumentCommitListener out of the container onto the MAIN store only;
ancillary stores opt in with
ConfigureMarten<T>(opts => opts.AddCommitListener(listener)). A bare sweep
cannot tell which store a registration was meant for, so applying it to
every AddMartenStore<T> would attach every listener to every store with no
way to opt one out.
Pinned by DocumentCommitListenerCompliance (10/10) plus five Marten-side
DI facts, which cover what the compliance fixture structurally cannot: it
builds a bare StoreOptions with no container, so the AddMarten sweep is
exercised by nothing over there.
Claude-Session: https://claude.ai/code/session_011mpctjngqnraWVnDaqWtYf
Co-authored-by: Claude Opus 5 (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.
No description provided.