Adopt compliance wave 2: retire four more mirrored Marten test pairs - #400
Merged
Conversation
Companion to marten#5118 (epic marten#5110). Moves four Polecat test files onto the shared JasperFx.Events.ComplianceTests suites (2.37.2) and deletes them here, the same trade #393 made for the first four. Retired, and what replaced each: - Events/auto_discover_aggregate_types.cs -> AutoDiscoveredAggregateCompliance - Projections/event_projection_should_register_document_types.cs -> EventProjectionRegistrationCompliance - Projections/event_projection_enrichment_tests.cs -> EventProjectionEnrichmentCompliance - rebuild_concurrency_cap_resolution.cs -> RebuildConcurrencyCapCompliance Coverage went up on both sides of the port. Polecat's registration test asserted only PublishedTypes() and Marten's asserted only its own known-document-types list; the shared suite asserts both routes and adds an end-to-end append proving the store really provisioned storage for a document type nobody registered, which is the actual point of marten#4166. Polecat's rebuild-cap test was a pure unit test against a dummy connection string; the shared one builds a real store. PolecatComplianceFixture picks up the seam members the new suites need: StoreDocument, EventStore, AllAggregateTypes, an AddProjection registrar member, and connection-string / DaemonSettings handling for the rebuild-cap knobs. The alias file gains ComplianceOperations and ComplianceEventProjection beside the existing ComplianceQuerySession, because the EventProjection suites declare projection types at file scope and cannot reach the suite's generics. Also documents in CLAUDE.md that Polecat test runs must never overlap. The suite isolates by DatabaseSchemaName inside one shared master database, so a second concurrent run -- including one left alive after its parent shell was killed -- produces a large, scattered failure set across unrelated areas that reads like a real regression. That cost real time in this session. Compliance namespace: 55/55, no capability gates. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VpDCvJcBDZerieJB4JEHde
This was referenced Aug 2, 2026
Merged
jeremydmiller
added a commit
that referenced
this pull request
Aug 3, 2026
Minor rather than patch: 5.9.1's line added public surface (IEventBinarySerializer, EventStoreOptions.AddEventType/AddEventTypes) and moved the whole JasperFx/Weasel matrix forward. Since 5.9.1: - feat: pluggable binary event serialization via IEventBinarySerializer (#388/#402) - feat: EventStoreOptions.AddEventType / AddEventTypes (#395/#396) - fix: escape interpolated identifiers and literals in constructed SQL (#390/#403) - fix: throw a lone DcbConcurrencyException unwrapped from SaveChangesAsync (#394/#397) - deps: JasperFx 2.37.2 -> 2.38.0, Weasel 9.23.0 -> 9.23.2 (#405, #407) - Polecat's ProjectionScenario is now a thin subclass of the lifted JasperFx.Events.TestSupport harness rather than a seven-file copy of Marten's (#404/#408, jasperfx#616) -- a behavior change for anyone already using it, see the release notes - test infrastructure: compliance waves 1-3 (#393, #400, #407), parallel-safe test suite (#389), IntegrationContext.StoreOptions document cleaning (#398/#401)
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.
Polecat's half of compliance wave 2. Companion to marten#5118 / marten#5123 (merged), on
JasperFx.Events.ComplianceTests2.37.2 (JasperFx/jasperfx#608, published). Same trade #393 made for the first four pairs.Retired here
Events/auto_discover_aggregate_types.csAutoDiscoveredAggregateComplianceProjections/event_projection_should_register_document_types.csEventProjectionRegistrationComplianceProjections/event_projection_enrichment_tests.csEventProjectionEnrichmentCompliancerebuild_concurrency_cap_resolution.csRebuildConcurrencyCapComplianceCoverage went up on both sides of the port
PublishedTypes(); Marten's asserted only its own known-document-types list. The shared suite asserts both routes and adds an end-to-end append proving the store really provisioned storage for a document type nobody registered — the actual point of marten#4166.SqlConnectionStringBuilderround trip.Fixture additions
PolecatComplianceFixturegains the seam members the new suites need —StoreDocument,EventStore,AllAggregateTypes, anAddProjectionregistrar member, and connection-string /DaemonSettingshandling for the rebuild-cap knobs. The alias file gainsComplianceOperationsandComplianceEventProjectionbeside the existingComplianceQuerySession, because the EventProjection suites declare projection types at file scope and cannot reach the suite's generics.CLAUDE.md
Documents that Polecat test runs must never overlap. The suite isolates by
DatabaseSchemaNameinside one sharedmasterdatabase, so a second concurrent run — including one left alive after its parent shell was killed — produces a large, scattered failure set across unrelated areas that reads exactly like a real regression. That cost real time while preparing this PR.Results, stated honestly
The single failure is not from this change, and it was a different test on each of two consecutive clean runs:
single_tenant_has_no_tenant_id_column_tests.full_lifecycle_works_without_tenant_id_column— the pre-existing isolation defect filed as IntegrationContext.StoreOptions leaves documents behind, so some tests only pass on a fresh database #398 (IntegrationContext.StoreOptionsnever deletes data, so the schema accumulates rows across runs). Cleared the residue and it passed.operation_dependency_tests.store_multiple_types_with_events_all_committed—events1.Count should be 2 but was 0on freshly-generated stream ids. Passes 4/4 when its class runs alone.Two consecutive full runs, each with exactly one failure, in different untouched classes, both green in isolation. I do not have a cause. My first guess was intra-suite parallelism, and that is wrong —
src/Polecat.Tests/xunit.runner.jsonsetsparallelizeTestCollections: false, so collections are serialized and nothing inside the run is concurrent. That rules out the obvious explanation forFetchStreamAsyncreturning 0 events for a stream written in the same test, and leaves this genuinely unexplained.Worth its own investigation; I did not chase it here because it is orthogonal to this change. CI runs on a fresh instance and should be green.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VpDCvJcBDZerieJB4JEHde