Part of #5118 (compliance wave growth), epic #5110. Cross-repo: the first half targets jasperfx.
Stream compacting is implemented in both products with the same signature over the same shared request type, but declared on each product's own operations interface rather than on JasperFx's:
|
Declaration |
| shared today |
JasperFx.Events/Protected/StreamCompactingRequest.cs:71 — StreamCompactingRequest<T> is already a JasperFx type |
| Marten |
Marten.Events.IEventStoreOperations.CompactStreamAsync<T>(Guid|string, Action<StreamCompactingRequest<T>>?) (Marten/Events/EventStore.StreamCompacting.cs:35) |
| Polecat |
Polecat.Events.IEventOperations.CompactStreamAsync<T>(Guid|string, Action<StreamCompactingRequest<T>>?) (Polecat/Events/IEventOperations.cs:61) |
JasperFx.Events.IEventStore.CompactStreamAsync(Guid\|string, CancellationToken) exists but is the store-level, non-generic, no-configuration form — and on Marten both overloads reflect back onto the generic method rather than being the real entry point. It is not what the tests exercise.
Part 1 (jasperfx): lift the generic method
Declare CompactStreamAsync<T>(Guid id, Action<StreamCompactingRequest<T>>? configure = null) and the string overload on the shared JasperFx.Events.IEventStoreOperations. Both products already have the exact signature, so adoption is deleting a declaration, not writing an implementation. Confirm this is additive on both sides before shipping — it is a source-breaking change if either product's method differs in optionality or return type.
Part 2 (compliance): the suite
Once the method is shared, StreamCompactingCompliance is portable with no fixture change.
| Marten tests today |
Polecat tests today |
Aggregation/stream_compacting.cs |
Events/stream_compacting_tests.cs |
- Compacting collapses events below the compaction point into a snapshot event and leaves the aggregate's folded state unchanged
AggregateStreamAsync after compaction equals the pre-compaction result
FetchStreamAsync returns the compacted shape; FetchStreamStateAsync still reports the true version
- Compacting an already-compacted stream
- Compacting a stream with an inline snapshot registered keeps the document consistent
- Guid and string stream identity
Acceptance
- jasperfx: method lifted,
JasperFxVersion bumped in the same PR (the --skip-duplicate publish trap), both products adopt
- Suite enrolled in both stores; originals retired in both repos
Part of #5118 (compliance wave growth), epic #5110. Cross-repo: the first half targets jasperfx.
Stream compacting is implemented in both products with the same signature over the same shared request type, but declared on each product's own operations interface rather than on JasperFx's:
JasperFx.Events/Protected/StreamCompactingRequest.cs:71—StreamCompactingRequest<T>is already a JasperFx typeMarten.Events.IEventStoreOperations.CompactStreamAsync<T>(Guid|string, Action<StreamCompactingRequest<T>>?)(Marten/Events/EventStore.StreamCompacting.cs:35)Polecat.Events.IEventOperations.CompactStreamAsync<T>(Guid|string, Action<StreamCompactingRequest<T>>?)(Polecat/Events/IEventOperations.cs:61)JasperFx.Events.IEventStore.CompactStreamAsync(Guid\|string, CancellationToken)exists but is the store-level, non-generic, no-configuration form — and on Marten both overloads reflect back onto the generic method rather than being the real entry point. It is not what the tests exercise.Part 1 (jasperfx): lift the generic method
Declare
CompactStreamAsync<T>(Guid id, Action<StreamCompactingRequest<T>>? configure = null)and the string overload on the sharedJasperFx.Events.IEventStoreOperations. Both products already have the exact signature, so adoption is deleting a declaration, not writing an implementation. Confirm this is additive on both sides before shipping — it is a source-breaking change if either product's method differs in optionality or return type.Part 2 (compliance): the suite
Once the method is shared,
StreamCompactingComplianceis portable with no fixture change.Aggregation/stream_compacting.csEvents/stream_compacting_tests.csAggregateStreamAsyncafter compaction equals the pre-compaction resultFetchStreamAsyncreturns the compacted shape;FetchStreamStateAsyncstill reports the true versionAcceptance
JasperFxVersionbumped in the same PR (the--skip-duplicatepublish trap), both products adopt