Skip to content

Adopt compliance wave 3: retire the last two Marten-ported event sourcing tests - #406

Closed
jeremydmiller wants to merge 1 commit into
mainfrom
compliance-wave-3-399
Closed

Adopt compliance wave 3: retire the last two Marten-ported event sourcing tests#406
jeremydmiller wants to merge 1 commit into
mainfrom
compliance-wave-3-399

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Closes #399. Companion to jasperfx#613 (epic marten#5110, marten#5118).

What moved

Retired Replaced by
Events/activity_correlation_tests.cs (4) ActivityCorrelationCompliance
Projections/single_stream_projection_with_string_identity_tests.cs (6) StringIdentitySingleStreamCompliance

Ten 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.Tests duplicates a Marten test except
Linq/additional_linq_operator_tests.cs, and the shared library cannot absorb it: 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. 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. One
    file 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 / EnableCorrelationTracking handling in
    BuildStoreAsync, plus CorrelationIdFor, CausationIdFor, SetCorrelationId.
  • A fourth global alias. 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, because 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 name the suite that owns each type.
  • New ComplianceSourceDir dev loop: build with
    -p:ComplianceSourceDir=$HOME/code/jasperfx/src/JasperFx.Events.ComplianceTests to compile a
    working 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

…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.
@jeremydmiller

Copy link
Copy Markdown
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 Directory.Packages.props was not worth it, so #407 does both and is green: compliance namespace 65/65, full suite 1660 with 0 failures against a freshly created container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compliance wave 3+: the three remaining Marten-ported test files

1 participant