NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet, #1352 most downloaded on NuGet
Foundational helpers and command line support used by JasperFx and the Critter Stack projects
Latest stable
2.102.0
Last release 11 days ago
09 Nov 2026
Ships on a steady schedule
a new release about every 8 days
Most releases are documented
notes for 52 of the last 60 stable releases
3 versions withdrawn
withdrawn after publishing
127 years old
276 releases · first in 1900
Drag across the ruler to compare, or tap a release to open it.
Partial descriptors are the intended shape — Merge folds several sources' slices together by name, and a source (Wolverine's host-side event-model exp
Fix release.
#807 — a partial EventModelDescriptor could not round-trip. System.Text.Json leaves any constructor parameter the JSON does not carry at its default, so an EventModelSliceDescriptor sent without emittedEvents / projectionTypes / readModelTypes arrived with those three null despite being declared non-nullable, and buildGraph() threw ArgumentNullException on the way back out, through the computed Elements getter.
Partial descriptors are the intended shape — Merge folds several sources' slices together by name, and a source (Wolverine's host-side event-model export, or a Bobcat spec assembly) is by definition partial. These members are now normalized at construction the way the init-only collections already default. The same trap was fixed on EventModelDescriptor.Slices, AggregateDescriptor.AppliedEvents, SpecificationDescriptor.ResolvedTypes and HandlerRelationshipDescriptor.EmittedEvents.
Source- and binary-compatible: the wire shape, the positional constructors and record equality are unchanged.
Full changelog: V2.67.0...V2.67.1
Event query tags, made composable — plus two consistency fixes found by store-parity work.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Event query tags, made composable — plus two consistency fixes found by store-parity work.
EventQuery can now AND a tag filter with everything else (#801)EventQuery composed every filter it carried with AND — event types, time and sequence windows, stream id, tenant — except tags. The dictionary form of a tag query lived only on the non-composable IEventStore.QueryByTagsAsync(IReadOnlyDictionary<string,string>, …), so a caller filtered by tags or by everything else, never both. Taking that path also gave up paging and TotalCount.
New EventQuery.TagValues (Dictionary<string,string>) sits beside the rich TagConditions:
TagConditions, whose conditions OR.PagedEvents path, so a tag query keeps paging and a truthful TotalCount of distinct matching events.EventQueryFilters.TagValues bit, so the guard rail refuses it by name on a store that hasn't implemented it.ArgumentException from the new EventQuery.AssertIsWellFormed(), which AssertFiltersAreSupported now calls first thing.Tag names are contract now, not an implementation detail. New TagTypeRegistrationExtensions.FindByTagName / RequireByTagName match a name against the tag type's CLR simple name ("StudentId") or its registered table suffix ("student"), case-insensitively, refusing an unknown name loudly rather than answering empty. This moved into the abstraction because the stores had already drifted — Marten matched only the CLR name and compared values case-sensitively while Polecat accepted either spelling case-insensitively — under a surface with no compliance coverage at all. A caller holding a store descriptor cannot discover which spelling an engine takes.
event-query --tags was broken for every namespaced tag type (#803)The flag turned each JSON property into a condition whose TypeDescriptor.FullName was the bare property name. EventTagQuerySpec.ResolverFor matches on full name and nothing else, so the lookup missed for any tag type in a namespace and the flag threw UnknownTagQueryTypeException against every real store. It was wrong twice over: even with resolution, the documented '{"StudentId":"s-1"}' could not deserialize into a wrapper record, because a tag value is serialized under its runtime type and a record id round-trips as {"Value":"s-1"}.
Both failures are the same mistake — a name is not a type — so --tags now builds TagValues, where the store resolves the name against its own graph. Consequently entries AND rather than OR (what an operator naming two tags means), and a composite JSON value is refused rather than stringified into something that matches nothing.
ResolverFor's doc comment claimed a simple-name fallback the code never had; it now describes the exact match it performs and why guessing would be worse.
CompactStreamAsync<T> refusal said "Use Marten or Polecat" — stale in both directions, since Fisher implements compacting and Polecat implements the typed overload while refusing the untyped one. Support is per-overload, so no store list is safe; the message now names the capability.T (Marten refused, Fisher inferred the fold and got it right). The compliance suite pinned neither, so the same policy declaration worked on one store and was refused on another, invisibly until runtime. The suite now states inference: the typed overload names T outright, and requiring a registration on top would mean a compaction policy could only ever target an aggregate the application already snapshots.EventQueryCompliance gains a TagValues section — both name spellings, case-insensitive names and values, AND-across-entries with no duplication of a doubly-tagged event, composition with type and sequence windows, paging with interleaved noise, the empty/refused/malformed cases, a kitchen-sink query whose decoy fails only the second tag entry, and an end-to-end fact running the event-query command's own output through the store. StreamCompactingCompliance gains the inference fact, asserting the whole round trip rather than that the call didn't throw.
EventQueryFilters.TagValues joined EventQueryFilters.All. A store that declares All and takes this upgrade silently claims support for a filter it has not written — the exact failure the guard rail exists to prevent. Implement it, or subtract it (EventQueryFilters.All & ~EventQueryFilters.TagValues) until you do.
Tracking issues: marten#5365, marten#5366, polecat#575, fisher#230.
Full changelog: V2.66.1...V2.67.0
This is for several previous releases. JsperFx is churning very hard because of downstream work including the storage compliance tests, CritterWatch,
This is for several previous releases. JsperFx is churning very hard because of downstream work including the storage compliance tests, CritterWatch, Bobcat event modeling, and Stoat code generation
Full Changelog: V2.63.2...v2.66.1
This is for several previous releases. JsperFx is churning very hard because of downstream work including the storage compliance tests, CritterWatch, Bobcat event modeling, and Stoat code generation
Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.63.2...v2.66.1
Nothing published for this version
Nothing published for this version
Nothing published for this version
Two fixes since 2.63.1, both in the Native AOT chain that wolverine#4232 and wolverine#4287 reported:
Two fixes since 2.63.1, both in the Native AOT chain that wolverine#4232 and
wolverine#4287 reported:
Co-authored-by: Claude Opus 5 noreply@anthropic.com
Co-authored-by: Claude Fable 5 noreply@anthropic.com
Co-authored-by: Claude Fable 5 noreply@anthropic.com
Nothing published for this version
Nothing published for this version
A self-aggregating type may declare its Create handler as an event-shaped constructor, public Foo(FooCreated e) , instead of a named static Create . T
#733 — a self-aggregating type's constructor-based Create was dropped when ShouldDelete was present. (#735)
A self-aggregating type may declare its Create handler as an event-shaped constructor, public Foo(FooCreated e), instead of a named static Create. That worked on its own. Adding a ShouldDelete method to the same aggregate switched the source generator to a different emitter — one that built its dispatch switch from named conventional methods only — so the constructor's event type got no case arm at all.
Nothing failed loudly. The generated code compiled, the constructor never ran, and the next Apply-only event built the aggregate through RuntimeHelpers.GetUninitializedObject, skipping every field initializer. The reporter saw an ApplyEventException wrapping a NullReferenceException out of an Apply that appended to a collection property; the quieter symptom is a silently blank aggregate.
Both workarounds from the issue — converting the constructor to a static Create, or registering the delete through DeleteEvent<T>() instead of ShouldDelete — are unnecessary on this release.
The same omission was also in the generated EventTypes property on every self-aggregating path, including the ones whose dispatch was already correct. An aggregate with a constructor Create and no ShouldDelete gains its creating event in that list here too.
Verified end-to-end against Marten (JasperFx/marten#5322): the reporter's shape fails on 2.60.x across inline, async and live aggregation, and passes on 2.61.0, with EventSourcingTests (2002) and DaemonTests (319) green.
Thanks to @bugs-wkettlitz for an unusually complete report — root cause, emitted code, and a minimal repro.
gh-728 : a projection-run CLI command by @jeremydmiller in #729
Full Changelog: v2.59.0...V2.60.0
Full Changelog: https://github.com/JasperFx/jasperfx/compare/v2.59.0...V2.60.0
Closes the tenancy-slicing gap opened by 2.58.0, and adds two opt-in compliance suites.
Closes the tenancy-slicing gap opened by 2.58.0, and adds two opt-in compliance suites.
Nothing here changes behavior for a store that does nothing. The fix ships inert — it activates only when a store adopts a new one-line seam — and both new suites are opt-in, so neither runs until a store enrolls it.
JasperFxSingleStreamProjectionBase now resolves ForceSingleTenancy itself (#723), plus SingleTenantedEventSlicingCompliance (#724) and CompositeProjectionCompliance (#725).2.58.0 made ForceSingleTenancy take effect on the async daemon for the first time. Only Marten ever set it, by overriding BuildSlicer; Polecat's and Fisher's SingleStreamProjection<TDoc,TId> are empty class bodies. So 2.58.0 fixed wolverine#2053 / marten#4085 on one store out of three and left the other two carrying a live async-projection correctness bug.
The base now resolves it from a new IEventTenancySource on the session — the only thing BuildSlicer is handed. A session that does not implement it yields false, exactly the previous behavior, so upgrading changes nothing until a store opts in:
public TenancyStyle EventTenancyStyle => Options.Events.TenancyStyle;The member is EventTenancyStyle rather than TenancyStyle on purpose: all three stores already declare a TenancyStyle somewhere in their options graph (Marten on EventGraph, Polecat and Fisher on EventStoreOptions), so the shorter name would bind implicitly on some and not others — silently correct in one store and silently absent in the next, which is the failure mode being ended.
Adopting this is what closes polecat#526 and fisher#139. Once adopted, Marten's own BuildSlicer override is redundant.
SingleTenantedEventSlicingCompliance (#724) — on a single-tenanted store, events whose tenant_id values disagree must still fold into one aggregate. Drives the async daemon, since that is the only path the bug ever reached. It guards its own precondition: if a store normalizes the stamped tenant ids away on write, the fact skips with a message rather than passing vacuously.
CompositeProjectionCompliance (#725) — composite staging, one-shard identity, and member teardown on rebuild. Needs the new IComplianceStoreRegistrar.AddCompositeProjection seam, because a composite cannot be constructed by a suite: every product keeps its subclass's constructor internal. Implementations are a forward plus a small adapter, roughly three lines. Its rebuild fact is the load-bearing one, and members are additive so a store that replayed over surviving rows instead of tearing them down reads back exactly doubled.
Both are documented in the package README, along with the new seam.
Minor bump: two of the three changes are things a consumer will notice on upgrade.
Minor bump: two of the three changes are things a consumer will notice on upgrade.
VariableSource.Existing, a lookup that never manufactures (wolverine#4198). New API, additive.TenantedEventSlicer.SliceAsync(EventRange) now honors ForceSingleTenancy (#721). Behavior change.[BoundaryAggregate] (#718).#722 changes async projection grouping on Marten. ForceSingleTenancy was honored by SliceAsync(IReadOnlyList<IEvent>) but ignored by SliceAsync(EventRange) — and the async daemon reaches only the latter. Marten has been setting the flag since the wolverine#2053 / marten#4085 fix, so on this bump that fix takes effect on the daemon for the first time.
Concretely: on a single-tenanted store whose event rows carry mixed tenant_id values, an async single-stream projection now folds the stream into one aggregate instead of several partial ones. Conjoined stores are unaffected, and single-tenanted stores with clean rows already produced a single group. See marten#5305 for the Marten-side follow-up.
Polecat and Fisher do not pick this up — their SingleStreamProjection<TDoc,TId> subclasses are empty class bodies and never set the flag (polecat#526, fisher#139). #723 tracks hoisting the determination into the shared base so all three stores get it.
#720 adds two compliance facts that fold an identity-less [BoundaryAggregate] with events present — coverage that did not exist because every DCB aggregate in the suite happened to carry an Id, so a store could require a single-stream identity for a boundary aggregate and pass the whole suite. Both stores that had that bug have since fixed it — Fisher in 1.0.5 (fisher#135) and Polecat in 5.21.0 (polecat#521) — so on current versions these facts should pass everywhere. They are a regression guard, not a new demand.
wolverine#4167: a Block never runs its action on the publisher's thread by @jeremydmiller in #714
Full Changelog: V2.56.0...V2.57.2
Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.56.0...V2.57.2
Nothing published for this version
Nothing published for this version
GitHub Actions pins moved off the deprecated Node 20 runtime ( #699 ).
An async-daemon reliability release, plus provenance for the Event Model.
EventModelDescriptor.Merge no longer resolves competing claims by registration order. Sources now sit on a three-rung ladder of authority and the higher rung wins:
Declared < Derived (from code) < Observed (in production)
This inverts the previous arrangement, where WolverineEventModelSource was registered at index 0 specifically so derived roles would beat overlays. Registration order is now only a tie-breaker between sources on the same rung.
Nothing breaks on upgrade. IEventModelDefinitionSource.Provenance is a default interface member returning Declared, so every existing source ties, every tie still resolves on order, and an application that has not stamped its sources merges exactly as it did on 2.55.0. To adopt the ladder, a source overrides Provenance — one line.
Precedence is per claimed role, not wholesale: a role is claimed when a slice carries a value for it, and a source that does not claim a role never overrides one that does. Slice names, domains, trigger labels and specification links therefore keep coming from declarations and keep winning by default, because nothing else claims them.
A tenant agent seeded below its own committed position no longer dies permanently (#702, thanks @erdtsieck). SubscriptionAgent.Apply's Start branch threw on LastCommitted > HighWaterMark, which funnelled into ReportCriticalFailureAsync → Paused — and nothing restarts a paused agent under a node-distributed daemon, so one momentarily missing ceiling took a tenant's projection out until the next deployment. The seed is now clamped to the committed position with a warning. Nothing is replayed or skipped: loading only ever starts above LastCommitted, so the agent idles until the real mark is routed to it. PolledTenantSet also gained a reference-counted Pin/Unpin that a wholesale SetTenants cannot drop, held across an agent start's priming poll.
High water is primed exactly once, and concurrent starts wait for it (#709). HighWaterAgent.IsRunning was set before the Detect() it exists to gate, so a second concurrent StartAgentAsync skipped the priming and read Tracker.HighWaterMark while it was still 0. The flag now means "detection has completed", a failed detection leaves the agent not running instead of permanently claiming otherwise, and both start paths go through a single-flight rendezvous — so 25-way parallel agent starts prime once rather than launching 25 concurrent max(seq_id) scans. This was reachable on plain non-tenanted stores, not only under sharded tenancy.
Per-tenant catch-up and rebuild hold their tenants across the priming poll (#710). Both still used Activate, which a concurrent reconciliation could drop — leaving catch-up to skip that tenant's work in total silence. Catch-up now also distinguishes "never polled" (logged) from "polled, no events yet" (the benign skip), and PolledTenantSet.Deactivate no longer removes a pinned tenant.
EventModelProvenance, EventModelRole, per-role attribution via EventModelSliceDescriptor.ProvenanceFor(role) and ClaimedBy, the same answer stamped onto every rendered EventModelElement, and IEventModelDefinitionSource.Provenance so a source declares its rung once. A higher rung replaces a list rather than unioning with it — unioning derived {A, C} with observed {A, B} invents a slice emitting three events nobody claimed.HotspotOrigin.SourceDisagreement, recorded whenever both sides claim a role and the merged answer drops one of them, naming the role, both claims and the rung each came from via Role / WinningClaim / LosingClaim. New semantics on shipped machinery — HotspotDescriptor already renders in both viewers. Purely additive: nothing is recorded when nothing is lost, so a model with no disagreements is identical to one produced on 2.55.0.RetryBlock<T>.ShouldRetry and OnTerminalFailure (#701). A caller can now classify a failure as terminal instead of swallowing an exception inside its own handler purely to stop the retry loop. OnTerminalFailure is the capability swallowing cannot provide — the block's owner can meter or dead-letter a give-up that is not a success. Both default to null, so existing blocks are unchanged.EventStoreExplorerCompliance now requires the usage descriptor to describe registered projections (#700). It previously asserted on usage.Events and nothing else, so a store could fill that one list and leave every other slot on EventStoreUsage empty while passing — which is exactly what happened for several releases in JasperFx/fisher#120.
⚠️ This is a new requirement on every store that runs the suite, covering an Inline registration specifically. It will go red anywhere TryCreateUsage returns a usage without calling Projections.Describe. Marten and Polecat both call it.
Full changelog: V2.55.0...V2.56.0
One additive feature completing the Event Modeling hotspot story, one defect fix in application-assembly detection, and the first documentation for th
One additive feature completing the Event Modeling hotspot story, one defect fix in application-assembly detection, and the first documentation for the Event Model. Minor rather than patch because the overlay and EventModelDescriptor both gain public surface; nothing is removed, renamed or obsoleted, and every existing constructor and JSON payload round-trips unchanged.
HotspotOrigin.Prose has existed since #687 as a reserved form — a hotspot a source could emit but nobody could author. #689 made a pending specification is a hotspot the primary mechanism and deliberately deferred this one; this adds the authoring surface.
EventModelSliceBuilder.Hotspot(text) attaches a HotspotDescriptor.Prose to that slice. It renders as a Hotspot element in the wireframe lane in the canonical magenta, exactly like a pending-spec hotspot — and a slice that is nothing but a hotspot still renders one element, which is the point for a slice you have thought about but not built.EventModelBuilder.Hotspot(text) attaches to the model instead, for a question that is not about any one slice, through a new additive EventModelDescriptor.Hotspots.Both fold the way everything else in the model does: unioned across sources, deduplicated on origin plus text, order preserved. Prose and a pending specification that happen to share a string stay two distinct hotspots, because they mean two different things.
Prose is the escape valve, not the default, and the XML docs on both methods say so. A pending-specification hotspot is evidence: it appears because a real spec is failing or unbound, and it retires itself the day that stops being true. Prose has no lifecycle — nothing retires it but you. Once a question is sharp enough to name a scenario, write the pending spec instead.
Ports the one fix from JasperFx/wolverine#4024 that JasperFx needed.
DetermineCallingAssembly skipped System* / Microsoft* / test runners / Critter Stack assemblies and nothing else. But AssemblyGenerator names its output with Path.GetRandomFileName() and loads it from a stream, so runtime-compiled assemblies carry a random 8.3-style name and an empty Location — and a walk running during code generation would find one sitting immediately outside the JasperFx frames and adopt it.
The noisy symptom is a false ApplicationAssemblyReuseWarning: instrumenting a fully green 2495-test Wolverine suite produced 44 of them, 41 blamed on generated assemblies, and every one a false positive. The serious symptom is silent — the same walk picks the assembly used for type discovery, so adopting a generated assembly means scanning one that holds none of the application's types, and the only evidence is a handler, document or projection mysteriously not being found.
The walk now skips IsDynamic and empty-Location assemblies. The Location half is switched off under a single-file publish, where every bundled assembly reports an empty Location including the real application assembly; there the walk falls through to Assembly.GetEntryAssembly(), which is the correct answer for a single-file app anyway.
The other two fixes in that Wolverine PR were checked and do not apply here: AddJasperFx already captures the registration assembly eagerly before deferring into optionsBuilder.Configure, and establishApplicationAssembly already runs the divergence check on the branch that adopts RememberedApplicationAssembly. That matters beyond this release — #697 was the stated blocker for consolidating Wolverine onto the shared JasperFxOptions.ApplicationAssemblyReuseWarning, and it is now clear.
The semantic model shipped across #687, #689 and #690 with nothing but XML docs behind it. There is now a documentation section — overview, the overlay API, hotspots, and the wire descriptors — modelling Wolverine's IncidentService sample end to end.
Every snippet is compile-checked out of DocSamples, which had silently stopped compiling: it used Microsoft.NET.Sdk.Web, whose OutputType defaults to Exe, and there is no Program.Main in it. It is back on Microsoft.NET.Sdk and now in jasperfx.slnx, so the samples are built on every CI run and a sample that drifts from the API fails the build.
JasperFx, JasperFx.Events, JasperFx.Events.ComplianceTests, JasperFx.Events.SourceGenerator, JasperFx.SourceGenerator and JasperFx.Aspire go to 2.55.0. JasperFx.RuntimeCompiler is on its own version track and is unchanged at 5.0.0.
Two additive features for the Spec Driven Development track (master: JasperFx/stoat#9 ). Minor rather than patch because both add public surface; noth
Two additive features for the Spec Driven Development track (master: JasperFx/stoat#9). Minor rather than patch because both add public surface; nothing existing is removed, renamed or obsoleted, and every existing constructor and JSON payload round-trips unchanged.
JasperFx.Events.EventModeling is now the one slice vocabulary every source writes into and every viewer reads from:
EventModelSliceDescriptor keeps its positional shape and gains Pattern (SlicePattern: Command / View / Automation / Translation), TriggerKind (Http / Grpc / MessageHandler / JobScheduler / Human / External), TriggerOrigin, AggregateTypes (a list — one handler may load several projected models), PublishedMessages, ExternalSystems, Hotspots, Specifications (typed: {Feature}/{Scenario} identity + resolved types, stamped by sources), Domain, plus the computed rendering contract Elements (stable id, kind → canonical colour, lane) and Edges (directed, by id), and Merge(other).EventModelDescriptor gains Aggregates and a static Merge(name, descriptors).HandlerRelationshipDescriptor.ToSliceDescriptor() folds the older handler-relationship vocabulary into a slice.EventModelDefinition / EventModelBuilder / EventModelSliceBuilder name, group (InDomain), annotate (TriggeredBy(label)) and link (LinksToSpecification) — roles are derived by the sources that can see them. The role-declaring methods live behind one documented escape hatch, ForFlowNotOwnedHere(...).EventModelDefinitionSource, services.AddEventModel<T>() / AddEventModel(type | instance | name, lambda) / AddEventModelsFromAssembly / AddEventModelSource, and EventModelDiscovery.DiscoverAsync / AssembleAsync. IEventModelDefinitionSource finally has implementations.HotspotDescriptor.PendingSpecification(specIdentity) — a pending specification renders as a hotspot on the slice it binds to.ProjectionScenario exposes its plan and observes each step (#688 — PR #692)ProjectionScenario<TOperations, TQuerySession> gains PlannedSteps (number, kind, description — readable before ExecuteAsync) and an Observer (IProjectionScenarioObserver: StepStarted / StepSucceeded / StepFailed / StepSkipped), numbered as the exception report numbers them. Marten, Polecat and Fisher subclasses need no change.
One fix and one documentation change. Minor rather than patch because the fix adds a member to a public interface — additive, with a default, so nothi
One fix and one documentation change. Minor rather than patch because the fix adds a member to a public interface — additive, with a default, so nothing has to change to keep compiling.
IProjectionStorage.IsThreadSafe (#683, #685)AggregationRunner applies every slice in a range through a fixed 10-wide block, and every one of them gets the same IProjectionStorage instance. That is what the products' own document storage is built for. It is not what an EF Core storage can take: it wraps one DbContext per tenant/batch, and a DbContext is not thread-safe. A multi-stream projection with custom grouping fans one event out into many slices, so up to ten concurrently call Entry() / FindAsync and mutate the same change tracker — surfacing as InvalidOperationException out of Dictionary.TryInsert and NullReferenceException out of ChangeDetector.DetectChanges (JasperFx/marten#5266).
A storage can now say it cannot take that:
public bool IsThreadSafe => false;and the runner applies its slices one at a time. Resolved per tenant group, so a store may answer differently per tenant.
Defaults to true, so no existing storage changes. The declaration is on the storage rather than on AsyncOptions because the storage is the thing that is or is not safe and it already knows — a parallelism knob would work, but it would make correctness a configuration problem a user has to know they have.
⚠️ Serializing calls inside a storage implementation is not a substitute. A lock around each member still leaves the aggregation on one thread mutating entities while another thread's Entry() runs change detection over them, which is exactly the reported ChangeDetector failure. The fan-out itself has to stop, and nothing reachable from inside the storage can stop it.
Both routes run the same handler and collect into the same exception list, so MarkSliceAction, the single-vs-aggregate throw and ApplyPendingCacheUpdates are unchanged. The exception collector is now a ConcurrentQueue — it had one unguarded writer already, and the serial route adds a second.
Adopters: Marten JasperFx/marten#5266, Polecat JasperFx/polecat#489, Fisher JasperFx/fisher#108 — each returns false from its EF Core projection storage.
One trap worth knowing if you write tests around this: NSubstitute proxies a default interface member rather than inheriting it, so Substitute.For<IProjectionStorage<,>>().IsThreadSafe is false and silently takes the serial route. Harmless, since serial is always correct, but a substitute cannot exercise the concurrent route and cannot be trusted to report what a real storage would.
Documentation only, no behavior change.
JasperFxSingleStreamProjectionBase and JasperFxEventProjectionBase are the shared implementations behind each store's own SingleStreamProjection<TDoc,TId> / EventProjection — and deriving from them directly is not the same as deriving from the store's subclass. Nothing about it fails at compile time.
As of Marten 9.23, Marten.Events.Aggregation.SingleStreamProjection<TDoc,TId> adds two behaviors the base omits:
BuildSlicer returns a TenantedEventSlicer with ForceSingleTenancy from the store's TenancyStyle — the fix for JasperFx/wolverine#2053ConfigureAggregateMapping sets UseVersionFromMatchingStream = true, which changes how an aggregate's version metadata is persistedTake the base instead and you get a projection that builds, runs, and slices or versions differently. Polecat's subclass is an empty class body, so the divergence is Marten-shaped today — which is what makes it a trap: checking one store tells you nothing.
The XML docs now say this on the types themselves, and record the two routes that do work for a projection meant to compile against several stores: a per-flavour alias bound to each store's own subclass, or — where the document owns its stream — a self-aggregating document registered with Snapshot<T>(), which sidesteps it entirely because the store then constructs its own subclass.
This is the cheap half of #649. Closing the gap properly — hoisting the behavior into the base, or a seam each store fills in — is still open.
Full Changelog: V2.52.1...V2.53.0
A single fix. Patch release — no API additions, no behavior change for anything that was not already broken.
A single fix. Patch release — no API additions, no behavior change for anything that was not already broken.
ShardState.Mode now reports a rebuild (#681, #682)ShardMode.rebuilding had no writer anywhere in the tree. Every ShardState a SubscriptionAgent published went out with the property's default of continuous — including the ones published during a replay — so a subscriber watching ShardStateTracker could not tell a projection catching up under a rebuild from one running normally. That is the only distinction the enum exists to draw.
The agent already knew which it was; it just knew it on a different enum (ShardExecutionMode) that was never copied onto what it published. So this is propagation, not new state.
What you can now key on. An IObserver<ShardState> sees Mode == ShardMode.rebuilding for every state a shard publishes while replaying — the start, per-batch progress, and a failure — and ShardMode.continuous otherwise. That is enough to tell an operator "this projection is rebuilding, so the sequence you are watching is catch-up progress toward the rebuild's ceiling, not lag".
ShardExecutionMode.CatchUp deliberately maps to continuous. A shard behind the high water mark under normal operation is still continuous: the number being watched is lag either way, and only a rebuild changes what it means.
A finished replay drops back to continuous before its teardown, so the Stopped state disposal publishes does not still claim to be rebuilding — otherwise a consumer tracking the last state it saw would latch on "rebuilding" permanently, from a rebuild that ended cleanly.
ShardMode is now documented, which it was not, because an enum with no writer had no stated meaning. Note in particular that none means "no mode was stored" — it is the default for a persisted progression row, not a running state.
Nothing to do. Marten, Polecat and Fisher all use JasperFx's SubscriptionAgent and ShardStateTracker directly — none of them implements ISubscriptionAgent — so all three pick this up on the package bump with no store-side change and no store release to wait for.
One thing this does not change: Marten's persisted mode column has no writer either, so a ShardState hydrated from the progression table still reports none. That is a separate path from the live tracker and out of scope here.
Full Changelog: V2.52.0...V2.52.1
## What's Changed * #679: store-agnostic post-commit document session listener by @jeremydmiller in https://github.com/JasperFx/jasperfx/pull/680 Full
Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.51.0...v2.52
Three changes to the store-agnostic contracts, all additive. No store breaks on this bump.
Three changes to the store-agnostic contracts, all additive. No store breaks on this bump.
IDocumentSessionOperations.PendingStreams (#673, #675)A consumer holding the shared document session contract can now read the StreamActions a session has queued but not yet committed:
IReadOnlyList<StreamAction> PendingStreams { get; }All three stores already surfaced the same JasperFx.Events.StreamAction collection under three different names — Marten's PendingChanges.Streams(), Polecat's PendingChanges.Streams, Fisher's Events.PendingStreams — so this closes a naming gap, not a capability gap. It sits on the committable tier for the same reason Events does: a stream action can only be pending in a session that can append, and IDocumentWriteOperations (the tier a projection's RaiseSideEffects receives) cannot.
The member carries a throwing default rather than an empty one. An empty list is indistinguishable from a session with nothing pending, so a silent default would let a consumer's derived work be discarded with a clean build and green tests.
New opt-in PendingStreamActionsCompliance holds stores to the behavior.
IAggregateWriteCache — a shared second-level snapshot cache for FetchForWriting (#674, #676)The aggregate snapshot cache built and measured for Marten is now a shared contract in JasperFx.Events.Fetching, so Marten, Polecat and Fisher get one implementation of it rather than three.
IAggregateWriteCache, AggregateCacheKey, NulloAggregateWriteCacheRecentlyUsedAggregateWriteCache — the default, bounded and node-localAggregateWriteCacheOptions — opt-in per aggregate type, off by defaultEventRegistry.CacheAggregatesForWriting<T>() — inherited by every store's event optionsThe cached snapshot is a baseline only: the stream version and every event after the cached version are still read from the database on every call, and the optimistic concurrency assertion on append is untouched. A stale entry costs a larger delta query — never a wrong aggregate, never a suppressed concurrency failure. What it removes is the snapshot load, which on the measured workload was 4.5–4.9 ms of a 13.2 ms round.
The default implementation is backed by JasperFx.Core's existing RecentlyUsedCache, so this adds no new package dependency — a deliberate reversal of the prototype's Microsoft.Extensions.Caching.Memory reference, which would have pushed that onto every store.
New opt-in AggregateWriteCacheCompliance asserts that turning caching on is unobservable except in latency, including when the cached baseline is stale, ahead of the stream, or evicted.
DocumentComplianceConfig gains a nullable StreamIdentity, so a document compliance suite can declare the stream identity style it needs instead of leaving each fixture to guess. DocumentSessionEventsCompliance appends by stream key and had no way to say so, which failed three of its five facts on every store defaulting to Guid identity — a correct store failing an undocumented precondition, which is a suite bug by definition. Additive: null means "leave the store on its own default", so no existing fixture changes.
BinaryEventAttribute is no longer sealed. A store that shipped its own before this one was promoted cannot delete it and could not derive from a sealed one, leaving it checking two attribute types indefinitely. Unsealing lets it subclass instead and collapse back to a single lookup, since attribute lookup matches by assignability. Stores without a pre-existing attribute should keep using the promoted one directly.
Adoption is tracked per store: Marten JasperFx/marten#5248, #5249, #5250, #5251 · Polecat JasperFx/polecat#477, #478, #479 · Fisher JasperFx/fisher#96, #97, #98.
Full Changelog: V2.49.0...V2.51.0
Do not claim an unscanned ceiling when a whole batch is skipped by @arnelirobles in https://github.com/JasperFx/jasperfx/pull/670
Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.49.0...v2.50
A by-id load for strong-typed-identity documents ( #665 , #666 )
JasperFx.Events.Documents.IDocumentReadOperations gains one member:
Task<T?> LoadAsync<T>(object id, CancellationToken token = default) where T : notnull;Before this, the read contract offered Guid and string only, so a document keyed by a strong-typed identifier could not be loaded by id through the abstraction at all. Passing the wrapped primitive was not an alternative — it compiles and then throws the store's id-type mismatch at runtime — so store-agnostic code had to fall back to a LINQ query on the identity standing in for a load.
The typed overloads stay preferred by overload resolution, so no existing call site moves; only an argument that fits neither lands on the new member.
The member ships with a default implementation. It unboxes a Guid or string and forwards to the overload that already exists — the only half of the member that is answerable identically for every store — and throws NotSupportedException, naming the implementing type, the document type and the identity type, for anything else. Resolving a strong-typed identifier needs the store's own value-type registration, which nothing generic can guess.
So a store takes this release cleanly and overrides the member when it is ready. What holds it to the real behavior is the compliance suite rather than the compiler.
DocumentLoadAndStoreCompliance gains a document keyed by a strong-typed id and three facts: the load, its miss case, and the one an override is most likely to get wrong — a boxed Guid or string reaching the object overload through an object-typed local must resolve exactly as the typed overload does. A store inheriting the default passes that third fact and fails the first two.
DocumentComplianceConfig gains ValueTypes / RegisterValueType<T>(), because those facts need the identity type registered with the store and the document contract does not carry identity configuration. Enrolling fixtures must replay it — every store spells it options.RegisterValueType(type). This is not a compile break either: a fixture builds fine without it and then fails three facts at runtime.
LoadAsync<T>(object) — no product change. Fixture work only: JasperFx/marten#5241LoadAsync<T, TId>(TId), which does not satisfy the member on arity: JasperFx/fisher#89Six projection-dispatch defects in the aggregate source generator and its runtime, plus a silent event-identity bug on string-keyed appends.
Six projection-dispatch defects in the aggregate source generator and its runtime, plus a silent event-identity bug on string-keyed appends.
JFXEVT003 is now an ErrorJFXEVT003 was Info — invisible in a CLI build at any verbosity — and its message promised a "fallback to runtime expression compilation" that does not exist. It is now an Error with an accurate message, and it fires in far fewer places.
A projection that needs partial and lacks it now fails the build instead of failing later at store construction with InvalidProjectionException: No source-generated dispatcher found. Every affected consumer is already broken at runtime today; this moves the failure earlier and names the fix. Suppressible with dotnet_diagnostic.JFXEVT003.severity if you need a staged upgrade.
partial is required in far fewer placesProjection subclasses were silently skipped unless declared partial — build clean, then a hard failure at DocumentStore construction. The gate predated #462, which moved aggregation dispatch to a standalone file-scoped evolver that needs nothing from the user's declaration. Rider's redundant-partial inspection would also strip the modifier back off, correctly by the language's rules, reintroducing the failure on the next cleanup-on-save.
After this release partial is required in exactly two places, both reported at build time:
EventProjection subclass using conventional methods — its dispatcher is an ApplyAsync override on your class;private/protected, which a file-scoped type cannot name (and then every containing type must be partial too).Everything else — including DI-activated projections and every ordinary SingleStreamProjection / MultiStreamProjection subclass — needs no modifier. Generic and non-visible projections previously emitted uncompilable code (CS0246 / CS0122) even with partial; they now work. (#650, #651)
new'd or GetUninitializedObject shadow — so injected dependencies are reachable and anything the real constructor set is present. This also removes the member-injection emission that had reintroduced the CS0111 double-load failure when the generator ships in two referenced packages (#653, #661)ShouldDelete and Create/Apply covering the same event type produced two identical switch arms and failed the consumer build with CS8120. They now compose into one arm — delete when the predicate says so, otherwise fold the event in. A ctor-registered DeleteEvent<T>() stays unconditional (#652, #660)Evolve is no longer treated as an override. Previously this either threw a bogus "can only use the override of 'Evolve' or conventional Apply/Create/ShouldDelete methods, but not both" at registration, or reached first-event dispatch and threw NotImplementedException. Resolution also no longer throws AmbiguousMatchException when the projection declares a same-named helper (#656, #659)EventProjection with an explicit ApplyAsync override silently dropped its published-type registration with no diagnostic at all. Now reported as JFXEVT006 (Warning) naming the projection and the unregistered document types (#654, #658)JFXEVT001 and JFXEVT004 are removed. Neither was ever reported, and the lambda-registration opt-out JFXEVT004 described could only produce false skips — the ProjectEvent/CreateEvent/DeleteEvent lambda APIs it matched were removed in JasperFx 2.0 / Marten 9.0, so it could only fire on a user-defined helper that happened to share a name (#655, #657)StreamAction.Append(graph, string streamKey, …) and StreamAction.Append(string streamKey, IEvent[]) appended straight to the backing list instead of going through AddEvents, so the envelopes never got StreamId/StreamKey/TenantId. PrepareEvents does not close the gap either. A store handing stream.Events to an inline projection gave it envelopes with an empty StreamKey — the normal way a string-identified projection learns which entity it is projecting — and the projection silently wrote a document with a blank field (#663, #664)The generator and the JasperFx.Events runtime now move together: an evolver that takes the projection through its constructor cannot be activated by a runtime without activateEvolver. Pin JasperFx.Events and JasperFx.Events.SourceGenerator to the same version. Evolvers generated before this release keep working — the parameterless constructor is still the fallback.
Packed locally and validated against both stores before publishing:
9ddfd0ac8 — EventSourcingTests 1850 passed / 0 failed, CoreTests 535 passed / 0 failed, 0 build errors and no JFXEVT diagnostics anywhere.70b4367 — Polecat.Tests 2151 passed / 0 failed, 0 build errors and no JFXEVT diagnostics.The JFXEVT003 escalation produces no diagnostics in either corpus, so the severity change should be inert for existing projections in both stores.
Full Changelog: V2.47.0...V2.48.0
Adds the JasperFx.Events.Documents persistence abstractions ( #647 ) — the document slice JasperFx.Events did not previously cover, so store-agnostic
Adds the JasperFx.Events.Documents persistence abstractions (#647) — the
document slice JasperFx.Events did not previously cover, so store-agnostic
consumers can read and write documents alongside the event store.
Purely additive: new namespace, no existing public type changed.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01Ri7jHRKhaFNBesQM1B5i1k
Per-tenant high-water polling is now bounded at thousands of tenants: agent routing is O(tenants + agents) instead of O(tenants × agents), only tenant
RecentlyUsedCache.CompactIfNecessary no longer over-evicts entries (#640, #646)Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.45.0...V2.46.0
Compliance wave 8 — the last two suites in the cross-store event sourcing backlog.
Compliance wave 8 — the last two suites in the cross-store event sourcing backlog.
JasperFx.Events.ComplianceTests reaches 28 suites / 230 tests, enrolled in both Marten and Polecat with zero capability gates on either store. With this release the event sourcing compliance backlog is empty.
ConjoinedEventTenancyCompliance (8 tests) — one database sliced by tenant. The property under test is isolation, and it is worth pinning across stores because the failure mode is silent and asymmetric: a store that leaks across tenants still answers correctly for the tenant that owns the data, and misbehaves only for the other one. Every test therefore checks both directions — what a tenant can see, and what it must not.
The suite deliberately reuses one stream id across two tenants. Under conjoined tenancy a stream's identity is (tenant, id), not id alone, and reusing the id is the sharpest way to show it: a store keying on id alone either collides on append or hands one tenant's events to the other.
Cost is a single new seam member, ComplianceStoreConfig.ConjoinedEventTenancy. Opening a tenant-scoped session needed nothing new — IEventStore<TOperations, TQuerySession>.OpenSession(IEventDatabase, string) was already shared and implemented by both products, and TenancyStyle was already a shared JasperFx.MultiTenancy enum.
SubscriptionCompliance (6 tests) — ordering and completeness for the "do something with every event" surface that is not a projection. Page boundaries are deliberately never asserted; only that the union of the pages is right, monotonic, and free of redelivery.
This one costs a per-consumer partial plus one registrar member, and that is the honest price. Both products declare ISubscription with an identical member, but IChangeListener is a per-product type, so the signature cannot be written once — the same situation as ComplianceFlatTableProjection. Consumers implement one method and call Record(page.Events).
Two new members on the compliance seam, both additive:
ComplianceStoreConfig.ConjoinedEventTenancyIComplianceStoreRegistrar.Subscribe(ComplianceSubscription)Enrolling SubscriptionCompliance also requires a small partial class completing ComplianceSubscription against your product's ISubscription, and a SupportsConjoinedEventTenancy gate exists on the fixture for stores that cannot slice one database by tenant. The package README documents both.
Nothing outside JasperFx.Events.ComplianceTests changed in this release, so it is behaviourally inert for the shipping libraries.
Both stores: 14/14 on the new suites, 230/230 across the full compliance set, verified against the actual packed artifacts rather than source-linked sources. Marten EventSourcingTests 1796/0/7; Polecat full suite 1837/0/3.
Compliance wave 7 — the last two event sourcing suites in the cross-store compliance backlog.
Compliance wave 7 — the last two event sourcing suites in the cross-store compliance backlog.
JasperFx.Events.ComplianceTests goes to 26 suites / 216 tests, enrolled in both Marten and Polecat with zero capability gates on either store.
RebuildAndCatchUpCompliance (11 tests) — projection rebuild and catch-up semantics. AsyncDaemonCompliance already smoke-tested catch-up and a basic rebuild, so this covers the parts that are easy to get subtly wrong: teardown-before-replay, idempotency, agreement between the by-view-type and by-name overloads, isolation from a second projection, catch-up without a full daemon run, and PrepareForRebuildsAsync.
The teardown assertion is the one that earns its keep. A rebuild that replays onto surviving rows looks correct for every stream whose events still exist, and is wrong only for rows the replay can no longer produce — so it passes any ordinary state assertion. That exact divergence was a real product gap found earlier by the flat-table suite, so the test plants a document the replay cannot possibly produce and requires the rebuild to remove it.
DeadLetterCompliance (6 tests) — the projection error path. A poison event whose Apply always throws, needing no store-specific hook. Pins that a skip policy actually skips — the shard survives and keeps projecting events after the fault, not just before it — and that the skipped event is recorded rather than lost, with enough on the dead-letter row to identify both the event and the failure.
Neither suite needed a seam addition. IProjectionDaemon already declared the entire rebuild surface, and the error policy and dead-letter reads were already on shared interfaces that both stores implement.
Versions 2.40.0 through 2.43.0 went to NuGet without a release here. Consolidated so upgrading from 2.39.5 doesn't hide anything:
StreamCompactingCompliance, EventDataMaskingCompliance, plus the seam they needed (ApplyEventDataMaskingAsync on the fixture, two AddMaskingRule overloads on the config).EventProjectionScenario wakes the high-water agent in process instead of polling.EventProjection's published types via a PublishedTypes() override rather than a primary-constructor argument, fixing CS8862 on primary-ctor projections.StrongTypedIdentityCompliance, plus ComplianceStoreConfig.RegisterValueType<T>().QueryTableAsync fixture member.CompactStreamAsync<T> moved onto JasperFx.Events.IEventStoreOperations as default-implemented members that throw, so a store without compacting stays source-compatible. If your event store also declares those overloads on its own operations interface while inheriting IEventStoreOperations, the signature becomes reachable through two paths and your call sites go ambiguous with CS0121. The library itself still compiles — the break surfaces in consuming code. The fix is to delete the local declarations, which is the point of the lift.
IEventDataMasking moved into JasperFx.Events.Protected. Code that names the interface explicitly needs its using updated. The common fluent usage — Advanced.ApplyEventDataMasking(x => x.IncludeStream(...)) — never names the type, so most consumers see nothing.
Both Marten and Polecat have already taken these lifts.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Compliance wave 5 part 1: explorer, archiving and FetchLatest suites (2.39.4) by @jeremydmiller in https://github.com/JasperFx/jasperfx/pull/633
Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.39.3...V2.39.5
Nothing published for this version
Extended progression batches amortize the connection, not the transaction (2.39.2) by @jeremydmiller in https://github.com/JasperFx/jasperfx/pull/630
Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.39.1...V2.39.3
Nothing published for this version
JasperFxEventProjectionBase's constructor never touched Options, so an EventProjection registered no teardown targets — Options.CleanUps and Options.S
A single fix on top of 2.39.0.
JasperFxEventProjectionBase's constructor never touched Options, so an EventProjection registered no teardown targets — Options.CleanUps and Options.StorageTypes stayed empty unless the author hand-called Options.DeleteViewTypeOnTeardown<T>(). Aggregation projections have always registered their single TDoc, and nothing in the API surface signalled the difference.
Everything that derives "what does this projection own" from those lists silently did nothing for event projections: a rebuild deleted the progression row and then re-projected into a table still holding the previous run's documents, per-tenant progression deletion left the documents behind, and the ProjectionScenario harness wipe never wiped after an event projection.
Published types are now registered as teardown targets in AssembleAndAssertValidity() rather than the constructor — the source generator emits its RegisterPublishedType calls into the subclass constructor, which runs after the base one, so only assembly time sees the complete set. Registration is idempotent.
Rebuilding an event projection now truncates the document types it publishes. That is the point of the fix, but if a projection writes into storage it doesn't own — an append-only audit table, or documents another projection owns — set the new opt-out:
public class MyProjection : EventProjection
{
public MyProjection()
{
DeletePublishedTypesOnTeardown = false;
}
}
It is all-or-nothing: turn it off and call Options.DeleteViewTypeOnTeardown<T>() for the types you do want wiped.
Because DeleteViewTypeOnTeardown writes to both CleanUps and StorageTypes, the ProjectionScenario test-harness wipe also starts working after event projections. Desirable, and now deliberate rather than incidental.
Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.39.0...V2.39.1
Projection lag, per-tenant high-water parsing, and a large cut in the async daemon's idle database traffic.
Projection lag, per-tenant high-water parsing, and a large cut in the async daemon's idle database traffic.
A supported per-tenant projection lag read (#619, #627). "How far behind is projection X, at its current version, for tenant T on this database?" had no supported answer, so the correlation had been reinvented three times — the daemon's blue/green side-effect gate, Marten's WaitForNonStaleDataAsync, and application code in the field — each rediscovering the same traps. ProjectionLag + ProjectionLagCalculator + IEventDatabase.FetchProjectionLagAsync / IEventStore<,>.FetchProjectionLagAsync now express it once, anchored on registered sources at their current version, over the single AllProjectionProgress round trip that already exists. No new SQL, and every store gets it through a default interface implementation. A registered cell with no row reads as fully behind, not caught up.
Per-tenant HighWaterMark:{tenant} rows round-trip through ShardName (#618, #623). ShardName.TryParse("HighWaterMark:acme", ...) used to return true and a wrong answer — the tenant id in the shard-key slot, TenantId null, and an Identity that didn't match the input. Those rows are real and persisted (Marten writes one per tenant on every vectorized high-water poll), so any consumer grouping progression rows by tenant silently attributed every tenant's mark to the store-global one. ShardName.HighWaterMarkFor(tenantId) and ShardName.IsHighWaterMark are the supported way to compose and recognize them.
Only a daemon that actually runs agents writes extended progression telemetry (#621, #625). The ShardStateTracker is per-database and shared, and every JasperFxAsyncDaemon subscribed an ExtendedProgressionWriter to it in the constructor — including daemons built ad hoc purely to read state, which is a documented thing to do. N daemons for one database meant N writers on one publication stream, each renting a connection and issuing the same UPDATE against the same rows. The subscription is now armed on the start path and released on stop; an unstarted daemon writes nothing at all.
The periodic per-shard heartbeat is off by default (#622, #628). It cost one pooled connection and one transaction per database per node every 5 seconds — ~37 connection acquisitions/sec/node on a 512-shard-database deployment — and an audit across JasperFx, Marten and CritterWatch found nothing that reads the persisted value. Agent status transitions are still written, which is what the extended columns are actually for. The cadence is now reachable from application code for the first time via DaemonSettings.ExtendedProgressionHeartbeatInterval; a positive value restores the old behavior as a compatibility hatch.
ShardNames are now distinct values where they previously all compared equal to the store-global mark. That collapse was the bug; nothing in JasperFx constructed such a name.TryParse now rejects HighWaterMark-prefixed strings other than the bare constant and HighWaterMark:{tenant}, instead of forcing them into the generic grammar.DaemonSettings.ExtendedProgressionHeartbeatInterval. Nothing in the Critter Stack reads it today.Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.38.0...V2.39.0
fix: never adopt a test runner as the application assembly (#600) by @jeremydmiller in https://github.com/JasperFx/jasperfx/pull/602
Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.37.0...V2.38.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
fix(#574): stop fanning StopAllAsync out over disposed daemons at shutdown (marten#5055) by @jeremydmiller in https://github.com/JasperFx/jasperfx/pul
Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.36.1...V2.37.0
Nothing published for this version
This addresses a problem that causes blog spam and probably slowed down pod shutdowns in Kubernetes
This addresses a problem that causes blog spam and probably slowed down pod shutdowns in Kubernetes
Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.36.1...JasperFx.Events.2.36.2
[#572](https://github.com/JasperFx/jasperfx/issues/572) — `ShardStatusWatcher` could still lose a wakeup after 2.36.0
#572 — ShardStatusWatcher could still lose a wakeup after 2.36.0 (#573)
2.36.0's fix for #568 narrowed the window in which a WaitForShardState / WaitForShardCondition call could miss an already-published state, but could not close it: the snapshot the watcher re-checked was written by the very publication walk it was racing. A watcher could subscribe too late for the walk and read the snapshot before that walk had recorded the state — so neither path saw it. With nothing further published for that shard, the wait could only end in a timeout no matter how generous the budget. Reported from marten#5054, where it made HighWaterAgentTests.skips_multiple_gaps_and_keeps_advancing fail reproducibly on 2.36.0 and never on 2.35.0.
ShardStateTracker.PublishAsync now records the state synchronously before posting to the block, so a snapshot read can never lag a publication the caller has already made, and subscribing plus reading the snapshot is a single atomic step against the publication walk. Observers are still notified outside the lock.
Also fixed along the way: _listeners and _states were read-modify-write on plain fields, so two concurrent Subscribe calls could drop one subscriber outright — a permanently lost wakeup rather than a delayed one.
Anyone on 2.36.0 should upgrade.
fix(fsharp): propagate DerivedVariable IsReferenced to same-named Arguments by @thechucklingatom in https://github.com/JasperFx/jasperfx/pull/563
Full Changelog: https://github.com/JasperFx/jasperfx/compare/V2.35.0...2.36.0
When a JasperFx verb is invoked from the Aspire dashboard, the short-lived dotnet run child now receives the resource's fully resolved Aspire environm
When a JasperFx verb is invoked from the Aspire dashboard, the short-lived dotnet run child now
receives the resource's fully resolved Aspire environment. The EnvironmentCallbackContext is now
associated with the resource, so WithReference(...) endpoint/connection-string callbacks resolve
instead of throwing Resource is not set and blanking the entire environment. Resolution is now
resilient per-variable (one bad callback no longer discards the rest), cancellation propagates, and
genuine misconfiguration fails loudly rather than launching against a half-populated environment.
RaiseSideEffects (#561)Adds a new backwards-compatible virtual overload:
public virtual ValueTask RaiseSideEffects(TOperations operations, TId id, IEventSlice<TDoc> slice)
The slice's strongly-typed identity is now supplied directly. This lets you raise side effects (emit
follow-on events / publish messages) for a MultiStreamProjection slice even when the aggregate
snapshot is null — e.g. when the slice was deleted — where the identity was previously unavailable
from slice.Snapshot. The existing RaiseSideEffects(operations, slice) override continues to work
unchanged. Thanks to @lofbacke for the contribution.
Full changelog: https://github.com/JasperFx/jasperfx/compare/V2.34.0...V2.35.0
Minor release bundling the following fixes:
Minor release bundling the following fixes:
IEventStore.QueryByTagsAsync(tags, tenantId, ct) overload and EventQuery.TenantId, completing the tenant dimension on the explorer read surface (companion to #503).Stopped heartbeat can't clobber a later write, and guards the shared batch-write throttle release against ObjectDisposedException. Root cause behind marten#5022.InMemoryQueue saturation and RetryBlock discard timing tests.Also includes the previously-unreleased 2.33.1 change (#550/#551, stamp AssignedNodeNumber on daemon-published ShardState).
Nothing published for this version
Advances the CritterWatch projection-stepthrough epic — the shared JasperFx.Events abstractions Marten and Polecat build on — plus a multi-host diagno
Advances the CritterWatch projection-stepthrough epic — the shared JasperFx.Events abstractions Marten and Polecat build on — plus a multi-host diagnosability fix ported from Wolverine.
Session-backed, step-instrumented aggregation fold (#544, #547)
The load-bearing capability the stepthrough epic depends on, in the shared aggregation base so Marten/Polecat inherit it rather than each re-implementing a reflection-Apply path. JasperFxAggregationProjectionBase.BuildTimelinesAsync runs the real slice → group → EnrichEventsAsync → fold path (per-event Create/Apply/ShouldDelete dispatch), capturing a before/after JSON timeline per event per identity into a MultiAggregateProjectionResult. Adds IProjectionStepObserver for live streaming and IEventStore.RunMultiStreamProjectionAsync.
Serializable rich EventTagQuery (#545, #548)
EventTagQuerySpec carries a full DCB EventTagQuery (OR conditions + AndEventsOfType event-type filters) across a message hop and resolves it back to CLR types against the registered tag/event graph — replacing the lossy AND-only Dictionary<string,string> form for sourcing a stepthrough / AggregateToMany from a real decision boundary.
IDcbAggregateRegistry — runtime discovery of DCB aggregates (#546, #549)
Discovers DCB aggregates used only inside a DCB operation (nested handler/endpoint code, no registered projection name) so they become steppable run targets identified by type. Thread-safe idempotent registry for lazy first-use population, plus a DcbAggregateDescriptor surfaced through EventStoreUsage.DiscoveredDcbAggregates.
Divergent process-pinned application assembly warning (#543)
Ports the wolverine#3521 diagnostic into JasperFx: AddJasperFx captures the registering assembly and records ApplicationAssemblyReuseWarning when a later host in a multi-host test process adopts a different host's process-pinned application assembly. Detection-only.
Marten/Polecat wire RunMultiStreamProjectionAsync over their query session, accept the serialized EventTagQuery on the DCB read path, and populate IDcbAggregateRegistry lazily from the DCB read entrypoints.
Full changelog: https://github.com/JasperFx/jasperfx/compare/V2.32.0...V2.33.0
Async daemon high-water reliability release. Packages JasperFx, JasperFx.Events, JasperFx.Events.SourceGenerator, JasperFx.SourceGenerator, and Jasper
Async daemon high-water reliability release. Packages JasperFx, JasperFx.Events, JasperFx.Events.SourceGenerator, JasperFx.SourceGenerator, and JasperFx.Aspire ship at 2.32.0; JasperFx.RuntimeCompiler stays at 5.0.0 (unchanged).
The high-water watchdog previously restarted the poll loop only when it faulted. A loop that was alive but no longer completing cycles — a custom IDaemonWakeup that stopped firing, a stuck connection — never faulted, so a frozen high-water mark looked identical to "no new events" and a downstream daemon health check would read Healthy against a dead agent.
ShardState.LastHeartbeat + AgentStatus), proving the loop is cycling independent of whether the mark advances.HighWaterAgent and the per-tenant TenantedHighWaterCoordinator (partitioned stores).New public surface
IProjectionDaemon: RestartHighWaterAgentAsync(CancellationToken), HighWaterLastPolledAt, IsHighWaterStale.DaemonSettings.HighWaterStalenessThreshold (default 30s).ShardAction: Faulted and Restarted.Downstream note: the three new
IProjectionDaemonmembers are implemented on the baseJasperFxAsyncDaemon, so Marten/Polecat inherit them; any external direct implementer ofIProjectionDaemonwill need to add them.
Consumers: marten#4982, polecat#339, CritterWatch#774.
A shard start that faulted after agent.StartAsync had spun up the execution pipeline was never registered in _agents and never stopped — leaving an orphan holding the shard's execution loop and a candidate for the permanent first-start wedge in wolverine#3519. A faulted start is now hard-stopped at the point of failure so it can't orphan the shard. (Companion to the #534 start-failure-cause propagation already shipped in 2.31.0; this teardown half landed after 2.31.0 was cut, so it first ships here.)
Full changelog: https://github.com/JasperFx/jasperfx/compare/V2.28.0...V2.32.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.