Part of #5118 (compliance wave growth), epic #5110.
JasperFx.Events.IEventStoreInstrumentation is a shared interface (JasperFx.Events/IEventStoreInstrumentation.cs) that both products implement and register — Marten hangs the append observer off EventGraph (Marten/Events/EventGraph.cs:248), Polecat registers it in DI (PolecatServiceCollectionExtensions.cs:86-94, its #177). It exists specifically so external tooling (CritterWatch) can observe appends without knowing which store it is talking to.
That makes it a contract with an out-of-repo consumer and no cross-store test — the same argument that makes the explorer surface worth pinning.
Seam additions required
ComplianceStoreConfig.Instrumentation — an IEventStoreInstrumentation instance the fixture wires in at store-build time. Fixture-owned property (the registration point differs: options object vs DI), same precedent as MaxConcurrentRebuildsPerDatabase.
Everything asserted is on the shared interface.
What each store tests today
| Marten |
Polecat |
CoreTests/Events/EventGraph_IEventStoreInstrumentation.cs |
Events/event_store_instrumentation_tests.cs |
EventSourcingTests/event_append_observation.cs |
Events/event_store_instrumentation_di_tests.cs |
EventSourcingTests/get_committed_events_from_listener_Tests.cs |
Events/event_append_observer_tests.cs, Events/event_append_counter_tests.cs |
|
Events/advanced_tracking_propagation_tests.cs |
Scope
New EventStoreInstrumentationCompliance suite:
- The append observer is invoked once per committed append, with the committed events and their assigned sequences/versions
- It is not invoked when
SaveChangesAsync rolls back or when there is no outstanding work
- Ordering relative to the inline projection write
- Counts across multiple streams in one unit of work
- Whatever
advanced_tracking_propagation_tests pins on the Polecat side that Marten's advanced_async_tracking.cs also pins — reconcile the pair and take the stronger
Acceptance
- One config property added; suite enrolled in both stores
- Originals retired for the absorbed behavior in both repos
- Any behavioral difference found here is triaged against CritterWatch's expectations before either side is changed
Part of #5118 (compliance wave growth), epic #5110.
JasperFx.Events.IEventStoreInstrumentationis a shared interface (JasperFx.Events/IEventStoreInstrumentation.cs) that both products implement and register — Marten hangs the append observer offEventGraph(Marten/Events/EventGraph.cs:248), Polecat registers it in DI (PolecatServiceCollectionExtensions.cs:86-94, its #177). It exists specifically so external tooling (CritterWatch) can observe appends without knowing which store it is talking to.That makes it a contract with an out-of-repo consumer and no cross-store test — the same argument that makes the explorer surface worth pinning.
Seam additions required
ComplianceStoreConfig.Instrumentation— anIEventStoreInstrumentationinstance the fixture wires in at store-build time. Fixture-owned property (the registration point differs: options object vs DI), same precedent asMaxConcurrentRebuildsPerDatabase.Everything asserted is on the shared interface.
What each store tests today
CoreTests/Events/EventGraph_IEventStoreInstrumentation.csEvents/event_store_instrumentation_tests.csEventSourcingTests/event_append_observation.csEvents/event_store_instrumentation_di_tests.csEventSourcingTests/get_committed_events_from_listener_Tests.csEvents/event_append_observer_tests.cs,Events/event_append_counter_tests.csEvents/advanced_tracking_propagation_tests.csScope
New
EventStoreInstrumentationCompliancesuite:SaveChangesAsyncrolls back or when there is no outstanding workadvanced_tracking_propagation_testspins on the Polecat side that Marten'sadvanced_async_tracking.csalso pins — reconcile the pair and take the strongerAcceptance