Part of #5118 (compliance wave growth), epic #5110.
ActivityCorrelationCompliance (wave 3) pins session-scoped correlation/causation. Nothing yet pins the rest of the IEvent contract, which is entirely shared — Id, Version, Sequence, StreamId, StreamKey, TenantId, Timestamp, EventTypeName, DotNetTypeName, Headers, CorrelationId, CausationId, IsArchived — and is exactly the kind of surface where two independent implementations quietly disagree (which clock stamps Timestamp, whether Sequence is global or per-stream, whether headers survive a round trip).
IEvent is a JasperFx type and every accessor is on it, so this is portable with no seam addition beyond the already-present ComplianceStoreConfig.EnableCorrelationTracking. A header-enable flag may be needed on the config (Marten Events.MetadataConfig.HeadersEnabled, Polecat's equivalent) — one boolean, same pattern as EnableCorrelationTracking.
What each store tests today
| Marten |
Polecat |
flexible_event_metadata.cs |
Events/event_metadata_tests.cs |
fetch_a_single_event_with_metadata.cs |
Metadata/event_metadata_filter_tests.cs |
EventSourcingTests/Metadata/* |
Events/event_append_counter_tests.cs |
event_wrapper_must_be_serializable.cs |
|
Scope
New EventMetadataCompliance suite:
- Every
IEvent member populated as documented after a round trip through FetchStreamAsync
Version is per-stream and 1-based; Sequence is store-global and monotonic across streams
Timestamp is server-assigned and non-default, and ordering by Timestamp agrees with ordering by Sequence for a single stream
EventTypeName / DotNetTypeName match what IEventRegistry.EventMappingFor(Type) reports (already the zero-IVT assertion path the library uses)
- Custom headers set on the session survive the round trip; headers are absent (not empty-throwing) when the feature is off
TenantId is the default tenant in a single-tenant store
IEvent<T>.Data typing via LoadAsync<T>
Acceptance
- Suite enrolled in both stores; any config flag added follows the
EnableCorrelationTracking precedent (fixture-owned, not registrar-routed)
- Originals retired in both repos
Part of #5118 (compliance wave growth), epic #5110.
ActivityCorrelationCompliance(wave 3) pins session-scoped correlation/causation. Nothing yet pins the rest of theIEventcontract, which is entirely shared —Id,Version,Sequence,StreamId,StreamKey,TenantId,Timestamp,EventTypeName,DotNetTypeName,Headers,CorrelationId,CausationId,IsArchived— and is exactly the kind of surface where two independent implementations quietly disagree (which clock stampsTimestamp, whetherSequenceis global or per-stream, whether headers survive a round trip).IEventis a JasperFx type and every accessor is on it, so this is portable with no seam addition beyond the already-presentComplianceStoreConfig.EnableCorrelationTracking. A header-enable flag may be needed on the config (MartenEvents.MetadataConfig.HeadersEnabled, Polecat's equivalent) — one boolean, same pattern asEnableCorrelationTracking.What each store tests today
flexible_event_metadata.csEvents/event_metadata_tests.csfetch_a_single_event_with_metadata.csMetadata/event_metadata_filter_tests.csEventSourcingTests/Metadata/*Events/event_append_counter_tests.csevent_wrapper_must_be_serializable.csScope
New
EventMetadataCompliancesuite:IEventmember populated as documented after a round trip throughFetchStreamAsyncVersionis per-stream and 1-based;Sequenceis store-global and monotonic across streamsTimestampis server-assigned and non-default, and ordering byTimestampagrees with ordering bySequencefor a single streamEventTypeName/DotNetTypeNamematch whatIEventRegistry.EventMappingFor(Type)reports (already the zero-IVT assertion path the library uses)TenantIdis the default tenant in a single-tenant storeIEvent<T>.Datatyping viaLoadAsync<T>Acceptance
EnableCorrelationTrackingprecedent (fixture-owned, not registrar-routed)