Background
Three configuration-contract shapes are structural twins between Marten and Polecat, blocked only on a store-typed parameter → resolvable with generics. Part of the Critter Stack 2026 dedupe pillar.
What to lift (generic over the store / options type)
-
IInitialData<TStore> — Marten src/Marten/Schema/IInitialData.cs (Task Populate(IDocumentStore, CancellationToken)) vs Polecat src/Polecat/IInitialData.cs (identical signature + a richer InitialDataCollection : List<IInitialData> with a lambda overload Marten lacks). Both activators invoke it the same way (PolecatActivator.cs:28, MartenActivator.cs:95). Lift as IInitialData<TStore>; carry Polecat's InitialDataCollection convenience.
-
IConfigureStore<TOptions> (+ async sibling) — Marten IConfigureMarten / IAsyncConfigureMarten (MartenServiceCollectionExtensions.cs:976, void Configure(IServiceProvider, StoreOptions)) vs Polecat IConfigurePolecat (same shape). Both consumed in the AddX() factory. Lift as IConfigureStore<TOptions> + IAsyncConfigureStore<TOptions>.
-
ConfigureResilience / ExtendResilience API shape (borderline) — Marten StoreOptions.cs:195-212 + ResilientPipelineBuilderExtensions.AddMartenDefaults vs Polecat StoreOptions.cs:202-219 + PolecatResilienceDefaults.AddPolecatDefaults. The public method bodies (new ResiliencePipelineBuilder() → configure → Build(); extend-variant prepends defaults) are structurally identical; only the default predicate set is dialect-bound (Marten handles NpgsqlException/MartenCommandException; Polecat's default is an empty stub today). Lift the API shape with a virtual ApplyDefaults hook. Honest note: borderline wash while Polecat's defaults are empty — include only if the generic-contracts work is already opening this surface.
Home: JasperFx core for items 1–2; item 3 also JasperFx core (or skip).
Acceptance
Refs
Parent: #214 · Master: #217 (net-new finds in pass N)
Background
Three configuration-contract shapes are structural twins between Marten and Polecat, blocked only on a store-typed parameter → resolvable with generics. Part of the Critter Stack 2026 dedupe pillar.
What to lift (generic over the store / options type)
IInitialData<TStore>— Martensrc/Marten/Schema/IInitialData.cs(Task Populate(IDocumentStore, CancellationToken)) vs Polecatsrc/Polecat/IInitialData.cs(identical signature + a richerInitialDataCollection : List<IInitialData>with a lambda overload Marten lacks). Both activators invoke it the same way (PolecatActivator.cs:28,MartenActivator.cs:95). Lift asIInitialData<TStore>; carry Polecat'sInitialDataCollectionconvenience.IConfigureStore<TOptions>(+ async sibling) — MartenIConfigureMarten/IAsyncConfigureMarten(MartenServiceCollectionExtensions.cs:976,void Configure(IServiceProvider, StoreOptions)) vs PolecatIConfigurePolecat(same shape). Both consumed in theAddX()factory. Lift asIConfigureStore<TOptions>+IAsyncConfigureStore<TOptions>.ConfigureResilience/ExtendResilienceAPI shape (borderline) — MartenStoreOptions.cs:195-212+ResilientPipelineBuilderExtensions.AddMartenDefaultsvs PolecatStoreOptions.cs:202-219+PolecatResilienceDefaults.AddPolecatDefaults. The public method bodies (new ResiliencePipelineBuilder()→ configure →Build(); extend-variant prepends defaults) are structurally identical; only the default predicate set is dialect-bound (Marten handlesNpgsqlException/MartenCommandException; Polecat's default is an empty stub today). Lift the API shape with avirtual ApplyDefaultshook. Honest note: borderline wash while Polecat's defaults are empty — include only if the generic-contracts work is already opening this surface.Home: JasperFx core for items 1–2; item 3 also JasperFx core (or skip).
Acceptance
JasperFx.IInitialData<TStore>(+InitialDataCollection<TStore>) added; both stores consumeJasperFx.IConfigureStore<TOptions>+ async sibling added; both stores'AddX()factories consumevirtual ApplyDefaultshookRefs
Parent: #214 · Master: #217 (net-new finds in pass N)