Adopt compliance wave 3: retire the last two Marten-ported event sourcing tests - #406
Closed
jeremydmiller wants to merge 1 commit into
Closed
Adopt compliance wave 3: retire the last two Marten-ported event sourcing tests#406jeremydmiller wants to merge 1 commit into
jeremydmiller wants to merge 1 commit into
Conversation
…cing tests Closes #399. Companion to jasperfx#613 (epic marten#5110, marten#5118). Retired, and what replaced each: - Events/activity_correlation_tests.cs -> ActivityCorrelationCompliance - Projections/single_stream_projection_with_string_identity_tests.cs -> StringIdentitySingleStreamCompliance With those gone, no file in Polecat.Tests duplicates a Marten test except Linq/additional_linq_operator_tests.cs, which the shared library cannot absorb: LINQ is document-database behavior and JasperFx.Events.ComplianceTests spans only event sourcing. Polecat still re-declares IDocumentStore/IDocumentSession/ IQuerySession in its own namespace, so there is nothing for a document-db compliance suite to be generic over yet. Two markers, opposite meanings, now documented in CLAUDE.md and on the LINQ file. `ported:` means a file duplicates another store's test and should move into a shared suite. A bare `marten#NNNN` citation means Polecat implemented the same feature and the number is provenance worth keeping. Fourteen files carry the latter and none of them is porting work -- counting them is what made #399 originally read as sixteen files instead of three, and the count grows with every parity feature, so it can never converge. PolecatComplianceFixture picks up the seam the new suites need: StreamIdentity and EnableCorrelationTracking handling in BuildStoreAsync, plus CorrelationIdFor, CausationIdFor and SetCorrelationId. The alias file gains a fourth global using, and unlike the other three it names a closed generic, because the single stream projection base is generic over the identity type as well as the document. aggregateto_linq_operator_tests reached into the retired string-identity file for SelfAggregatingStringQuest. It now declares its own AggregateToStringQuest: the shared library's equivalent folds the compliance suite's events, not Polecat's. projection_sg_dispatch_audit_tests needed no change -- its rows bind to the compliance library's types by name, the way waves 1 and 2 already left it -- but docs/projection-sg-audit-108.md was citing four files that waves 1-3 deleted, so those rows now point at the suite that owns each type. Also adds a ComplianceSourceDir dev-loop escape hatch to Polecat.Tests.csproj: build with -p:ComplianceSourceDir=<path> to compile a working copy of the suites instead of the package, which is how wave 3 was validated before the release. Compliance namespace 65/65, full suite 1660 with 0 failures. NOTE: needs JasperFx 2.37.3. Pins bumped ahead of the release; CI cannot restore until jasperfx#613 merges and ships.
Member
Author
|
Superseded by #407, which carries this work verbatim on top of the dependency bump. The pin here was 2.37.3, a version that was never published — jasperfx#613 shipped in 2.38.0 instead. Keeping a bump PR and a blocked adoption PR racing on the same |
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 #399. Companion to jasperfx#613 (epic marten#5110, marten#5118).
What moved
Events/activity_correlation_tests.cs(4)ActivityCorrelationComplianceProjections/single_stream_projection_with_string_identity_tests.cs(6)StringIdentitySingleStreamComplianceTen suites are now enrolled across three waves. The compliance namespace goes 55 → 65; the full
suite stays at 1660 because the ten tests moved rather than multiplied.
The exit criterion, restated
With these two gone, no file in
Polecat.Testsduplicates a Marten test exceptLinq/additional_linq_operator_tests.cs, and the shared library cannot absorb it: LINQ isdocument-database behavior and
JasperFx.Events.ComplianceTestsspans only event sourcing. Polecatstill re-declares
IDocumentStore/IDocumentSession/IQuerySessionin its own namespace, so thereis nothing for a document-db compliance suite to be generic over yet. Weasel.Storage is the intended
convergence layer; parked in marten#5118.
Per #399's third suggestion, the two marker kinds are now greppable apart and documented in
CLAUDE.md:ported:— this file duplicates another store's test and should move into a shared suite. Onefile carries it, the LINQ one above.
marten#NNNN— Polecat implemented the same feature and the issue number is provenance.Fourteen files carry this and none of them is porting work. That conflation is what made Compliance wave 3+: the three remaining Marten-ported test files #399
originally read as sixteen files instead of three, and the count grows with every parity feature,
so a marker-count exit criterion can never converge.
Fixture and project changes
PolecatComplianceFixture:StreamIdentity/EnableCorrelationTrackinghandling inBuildStoreAsync, plusCorrelationIdFor,CausationIdFor,SetCorrelationId.stream projection base is generic over the identity type as well as the document.
aggregateto_linq_operator_testsreached into the retired string-identity file forSelfAggregatingStringQuest; it now declares its ownAggregateToStringQuest, because the sharedlibrary's equivalent folds the compliance suite's events, not Polecat's.
projection_sg_dispatch_audit_testsneeded no change — its rows bind to the compliance library'stypes by name, the way waves 1 and 2 already left it. But
docs/projection-sg-audit-108.mdwasciting four files that waves 1–3 deleted, so those rows now name the suite that owns each type.
ComplianceSourceDirdev loop: build with-p:ComplianceSourceDir=$HOME/code/jasperfx/src/JasperFx.Events.ComplianceTeststo compile aworking copy of the suites instead of the package. That is how this wave was validated before the
release, and it is documented in
CLAUDE.md.Blocked on the JasperFx release
Pins move to 2.37.3, which does not exist yet. CI cannot restore until jasperfx#613 merges and
ships. Verification here was done against the working copy: compliance namespace 65/65, full suite
1660 with 0 failures (3 pre-existing skips), net10.0.
🤖 Generated with Claude Code
https://claude.ai/code/session_01G8tN8ApXiKhyVzia4iwmof