Skip to content

Bump Foundatio.Mediator.Abstractions from 1.3.1 to 1.3.3#361

Merged
github-actions[bot] merged 1 commit into
mainfrom
dependabot/nuget/Foundatio.Mediator.Abstractions-1.3.3
Jul 8, 2026
Merged

Bump Foundatio.Mediator.Abstractions from 1.3.1 to 1.3.3#361
github-actions[bot] merged 1 commit into
mainfrom
dependabot/nuget/Foundatio.Mediator.Abstractions-1.3.3

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 7, 2026

Copy link
Copy Markdown
Contributor

Pinned Foundatio.Mediator.Abstractions at 1.3.3.

Release notes

Sourced from Foundatio.Mediator.Abstractions's releases.

1.3.3

Migration ergonomics driven by a large production migration from MassTransit's mediator (#​271). All changes are additive and backward-compatible with 1.3.2.

Result ergonomics (#​271, #​279)

  • Result.Invalid and Result<T>.Invalid now accept field-keyed error messages (IEnumerable<KeyValuePair<string, string[]>>) — the shape produced by ASP.NET Core model validation, MiniValidator, and FluentValidation's ToDictionary() — so validation output passes straight through without an app-side conversion helper.
  • New ResultStatus.RateLimited with Result.RateLimited() / Result.RateLimited(message) factories on both result types. Generated endpoints map it to a 429 problem response (message becomes detail), and handler factory detection emits 429 in the endpoint OpenAPI metadata.

Middleware message replacement (#​271, #​279)

  • Before middleware can now return HandlerResult.ContinueWith(message) to replace the dispatched message — subsequent middleware, the handler, and After/Finally all receive the replacement. This is the missing piece for enriching immutable record messages (stamping tenant/user context from HttpContext), whose init-only properties can't be mutated in place; mutable messages can keep being set directly in Before.
  • Works on every dispatch path (HTTP endpoints, queues, in-process InvokeAsync); in endpoint scenarios an HttpContext? middleware parameter resolves from the call context and is null elsewhere. The middleware guide documents the enrichment patterns: abstract base record (zero per-message code — with on the base type preserves the derived runtime type), interface with a one-line self-copy method, or a plain settable property.
  • The CleanArchitectureSample dogfoods the pattern: the SetRequestedByFilter endpoint filter is replaced by SetRequestedByMiddleware using ContinueWith with fully immutable messages, and the endpoint-filter demo now shows an HTTP-shaped concern (X-Request-Duration-Ms response-header filter).
  • The middleware guide also gained a complete MiniValidator-based validation middleware recipe built on the new Invalid overload.

Fixed

  • Re-pinned Microsoft.CodeAnalysis to 5.0.0 (#​280) after dependency bumps reverted the #​269 downgrade on main — a generator built against Roslyn 5.3.0 silently fails to load (CS9057) on .NET 10 SDKs older than 10.0.3xx. The regression never shipped in a release; dependabot now ignores the load-bearing CodeAnalysis packages so future bumps are manual and verified against SDK 10.0.1xx.

Dependency updates

  • Foundatio and Foundatio.Xunit.v3 13.0.2 (stable), Scalar.AspNetCore 2.16.6, Verify.DiffPlex 3.3.0, WolverineFx 6.16.0 (benchmarks) (#​272–#​278).

Full changelog: FoundatioFx/Foundatio.Mediator@v1.3.2...v1.3.3

1.3.2

Scope-per-invoke handler isolation, broader .NET 10 SDK compatibility, and Result factory ergonomics. All changes are additive and backward-compatible with 1.3.1.

Scope-per-invoke handler isolation (#​268)

  • New MediatorLifetime.ScopedPerInvoke — the mediator opens a fresh DI scope for each invocation, resolves the entire pipeline (middleware + handler + their dependencies) from it, and disposes the scope when the invocation — including cascading messages — completes. This matches the scope-per-message semantics of MassTransit's mediator and Wolverine, for handlers that assume isolated scoped dependencies per dispatch (e.g. a fresh DbContext with its own change tracker). Requested in #​267.
  • Apply per handler with [Handler(Lifetime = MediatorLifetime.ScopedPerInvoke)], or assembly-wide with [assembly: MediatorConfiguration(HandlerLifetime = MediatorLifetime.ScopedPerInvoke)] with per-handler opt-out — the natural path when migrating a project off MassTransit mediator or Wolverine. Ambient dispatch (caller-owned scopes) remains the default; nothing changes for existing code.
  • Scopes follow the dispatch tree: nested and cascading dispatches from a ScopedPerInvoke handler use its scope as their ambient scope, while targets that are themselves ScopedPerInvoke always open their own.
  • New compile-time diagnostics: FMED014 (ScopedPerInvoke on middleware — handler-only, falls back to Scoped), FMED015 (handler returns a deferred IQueryable<T>/IAsyncEnumerable<T> that would be enumerated after the scope is disposed), and FMED016 (FireAndForget cascades are awaited for ScopedPerInvoke handlers so background dispatches can't outlive the scope).

Works on every .NET 10 SDK (#​269)

  • The source generator and code fixes now reference Microsoft.CodeAnalysis 5.0.0 (previously 5.3.0), so the package works with SDK 10.0.100 and later instead of requiring 10.0.3xx+. Previously, building with an older SDK produced warning CS9057 and the generator silently didn't run (missing handler wrappers, missing MapMediatorEndpoints).

Result factory type inference (#​270)

  • Result.Created(order), Result.Ok(user), and Result.Success(user) — plus the message/location overloads — now infer the value type from the argument, so the verbose Result<OrderView>.Created(order) spelling is no longer required. Generated endpoint status-code detection (e.g. .Produces<T>(201)) picks the new overloads up unchanged.
  • Note for Result<string>: a string argument still binds to the existing non-generic overloads — location for Created, message for Ok/Success. Use Result<string>.Created(value) when the string is the result value.

Full changelog: FoundatioFx/Foundatio.Mediator@v1.3.1...v1.3.2

Commits viewable in compare view.

@dependabot dependabot Bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Jul 7, 2026
---
updated-dependencies:
- dependency-name: Foundatio.Mediator.Abstractions
  dependency-version: 1.3.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/nuget/Foundatio.Mediator.Abstractions-1.3.3 branch from ae41aff to 6d801fe Compare July 8, 2026 07:36
@github-actions github-actions Bot merged commit 73aa0a4 into main Jul 8, 2026
2 of 3 checks passed
@dependabot dependabot Bot deleted the dependabot/nuget/Foundatio.Mediator.Abstractions-1.3.3 branch July 8, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants