Skip to content

Event-subscription agent family + rewind, IWolverineObserver event-append & endpoint causation; upgrade JasperFx/Marten/Polecat/Weasel#3108

Merged
jeremydmiller merged 2 commits into
mainfrom
feature/event-subscription-agents-and-observers
Jun 15, 2026
Merged

Event-subscription agent family + rewind, IWolverineObserver event-append & endpoint causation; upgrade JasperFx/Marten/Polecat/Weasel#3108
jeremydmiller merged 2 commits into
mainfrom
feature/event-subscription-agents-and-observers

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Adds the Wolverine-side support that came out of CritterWatch (event-subscription agent management + a store-agnostic append observer + endpoint causation), and upgrades the cross-stack packages to the latest published NuGets. Squashed into a single commit per request; the logically-distinct pieces are enumerated below.

Features

  • IEventSubscriptionAgentFamily — core abstraction for resolving event-subscription agent URIs; Wolverine.Marten's EventSubscriptionAgentFamily implements it (lets external monitoring resolve/address subscription agents without reaching into internals).
  • Agent-level rewind + tenant-aware rebuild on EventSubscriptionAgent, consuming JasperFx.Events 2.12.0's tenant-aware daemon surface (PauseShardAsync / store-global rebuild fan-out under partitioning).
  • Store-agnostic event-append observation via IWolverineObserverNotifyObserverOfAppendedEvents is wired through both the Marten and Polecat outbox session factories, so observers see appended events regardless of the backing store.
  • Endpoint-originated message causation tracking (HTTP HttpChain/HttpGraph + core EndpointCausation/RecordEndpointCausationFrame).

Independent fix (called out for separate review)

  • #3088 — skip Observer.MessageRouted during description/codegen mode (a general Wolverine fix surfaced by the observer work; covered by observer_message_routed_skipped_during_description).

Package upgrade

Replaces the (CritterWatch-local) vendored project references with the latest published NuGets:
JasperFx family 2.9.10 → 2.12.0, Marten 9.7.3 → 9.8.0, Polecat 4.2.1 → 4.4.5, Weasel 9.0.3 → 9.1.5.

Verification

Wolverine.Marten, Wolverine.Polecat, and Wolverine.Http all build green (net9.0, 0 errors) against the published packages — the agent-rewind / tenant-rebuild path only compiles if 2.12.0's daemon surface matches.

🤖 Generated with Claude Code

jeremydmiller and others added 2 commits June 14, 2026 20:22
…pend, endpoint causation; upgrade JasperFx/Marten/Polecat/Weasel

Squashed CritterWatch support work for Wolverine, plus the cross-stack package upgrade:

- IEventSubscriptionAgentFamily — core abstraction for resolving event-subscription
  agent URIs (Wolverine.Marten EventSubscriptionAgentFamily implements it).
- Agent-level rewind + tenant-aware rebuild on EventSubscriptionAgent, consuming
  JasperFx.Events 2.12.0's tenant-aware daemon surface (PauseShardAsync / rebuild fan-out).
- Store-agnostic event-append observation via IWolverineObserver, with
  NotifyObserverOfAppendedEvents wired through both the Marten and Polecat outbox session
  factories so subscribers see appended events regardless of backing store.
- Endpoint-originated message causation tracking (HTTP + core runtime).
- fix(#3088): skip Observer.MessageRouted during description mode (independent Wolverine
  fix surfaced by the above; called out separately for review).

Package upgrade (replaces the vendored project references with the latest published
NuGets): JasperFx family 2.9.10 → 2.12.0, Marten 9.7.3 → 9.8.0, Polecat 4.2.1 → 4.4.5,
Weasel 9.0.3 → 9.1.5.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…are overload

EventSubscriptionAgent.RebuildAsync now calls the JasperFx.Events 2.12.0
tenant-aware RebuildProjectionAsync(name, tenantId, token) overload, but the
two MartenTests assertions still expected the old 2-arg overload, so
NSubstitute saw no matching call and both failed. Update the assertions to
the 3-arg overload (Polecat's agent still uses the 2-arg overload, so its
tests were already correct and are unchanged).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit e355725 into main Jun 15, 2026
24 checks passed
This was referenced Jun 15, 2026
dmytro-pryvedeniuk pushed a commit to dmytro-pryvedeniuk/wolverine that referenced this pull request Jun 17, 2026
…st live) projection shards (JasperFx#3124)

IEventSubscriptionAgentFamily.FindAgentUriAsync already resolves the agent URI from
the *registered* subscription set (via SupportedAgentsAsync -> usage.Subscriptions),
so it succeeds for a projection whose agent is paused/stopped/crashed/not-yet-started
— exactly what lets an operator restart or rebuild a non-running projection. That was
delivered with the event-subscription agent family in JasperFx#3108.

But the XML docs on both the interface and the Marten implementation still described it
as resolving the "live agent" and returning null when "no matching live agent is found",
which is the precise contradiction JasperFx#3124 reported. This corrects the contract docs to
state the run-state-independent (registered) behavior and adds regression tests proving
a registered shard resolves without a running agent (and that an unregistered shard
returns null).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant