diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index eddd48ab..0dd47f27 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
- "version": "2026.2.4.1",
+ "version": "2026.3.0",
"commands": [
"jb"
],
diff --git a/.gitattributes b/.gitattributes
index 3252d3ac..d17d920e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,4 @@
tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/*.verified.cs whitespace=-trailing-space
+
+# Verify snapshots must keep LF line endings on Windows checkouts.
+*.verified.* text eol=lf working-tree-encoding=UTF-8
diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml
index f6a0f3ce..e5b99a2b 100644
--- a/.github/workflows/pr-build.yaml
+++ b/.github/workflows/pr-build.yaml
@@ -21,7 +21,7 @@ jobs:
name: build / build
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
- timeout-minutes: 15
+ timeout-minutes: 25
steps:
- uses: actions/checkout@v7
@@ -45,8 +45,8 @@ jobs:
- name: Build
run: dotnet build MinimalLambda.sln --no-restore --configuration Release /p:TreatWarningsAsErrors=true
- - name: Validate AOT compatibility
- run: task build:aot-check
+ - name: Validate stable and preview packages
+ run: bash scripts/dry-run-release-manifests.sh
- name: Run coverage
timeout-minutes: 10
@@ -56,6 +56,18 @@ jobs:
--coverage-output-format cobertura --no-progress --no-ansi
--max-parallel-test-modules 1 -p:TestTfmsInParallel=false
+ - name: Validate packed consumers
+ run: task build:package-compat
+
+ - name: Test Runtime Async on .NET 11
+ run: >-
+ dotnet test MinimalLambda.sln --configuration Release
+ -p:MinimalLambdaRuntimeAsync=true --no-progress --no-ansi
+ --max-parallel-test-modules 1 -p:TestTfmsInParallel=false
+
+ - name: Validate AOT compatibility
+ run: task build:aot-check
+
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
with:
diff --git a/.github/workflows/publish-preview.yaml b/.github/workflows/publish-preview.yaml
index e4da6db8..d8050746 100644
--- a/.github/workflows/publish-preview.yaml
+++ b/.github/workflows/publish-preview.yaml
@@ -21,7 +21,7 @@ jobs:
permissions:
contents: write
pull-requests: write
- uses: LayeredCraft/devops-templates/.github/workflows/publish-preview.yml@v11.2
+ uses: LayeredCraft/devops-templates/.github/workflows/publish-preview.yml@7aeca949aec9dd3c7cf4802b8b8497dc1832e16f # retain symbol artifacts
with:
solution: MinimalLambda.sln
dotnetVersion: 11.0.x
@@ -29,9 +29,23 @@ jobs:
hasTests: false
buildConfiguration: Release
- push:
+ validate-artifacts:
needs: build
runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v7
+ - uses: actions/download-artifact@v4
+ with:
+ name: nuget-packages
+ path: release-artifacts
+ - name: Validate downloaded packages and symbols
+ env:
+ PREVIEW_RUN_NUMBER: ${{ github.run_number }}
+ run: python3 scripts/validate-release-artifacts.py --lane core-preview --preview-run-number "$PREVIEW_RUN_NUMBER" --artifacts release-artifacts
+
+ push:
+ needs: validate-artifacts
+ runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml
index 26fbd775..abae8055 100644
--- a/.github/workflows/publish-release.yaml
+++ b/.github/workflows/publish-release.yaml
@@ -11,16 +11,30 @@ jobs:
build:
permissions:
contents: write
- uses: LayeredCraft/devops-templates/.github/workflows/publish-release.yml@v11.2
+ uses: LayeredCraft/devops-templates/.github/workflows/publish-release.yml@7aeca949aec9dd3c7cf4802b8b8497dc1832e16f # retain symbol artifacts
with:
solution: MinimalLambda.sln
dotnetVersion: 11.0.x
hasTests: false
buildConfiguration: Release
- push:
+ validate-artifacts:
needs: build
runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v7
+ - uses: actions/download-artifact@v4
+ with:
+ name: nuget-packages
+ path: release-artifacts
+ - name: Validate downloaded packages and symbols
+ env:
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
+ run: python3 scripts/validate-release-artifacts.py --lane core --tag "$RELEASE_TAG" --artifacts release-artifacts
+
+ push:
+ needs: validate-artifacts
+ runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
diff --git a/.gitignore b/.gitignore
index 581506da..aeaa3c48 100644
--- a/.gitignore
+++ b/.gitignore
@@ -90,3 +90,7 @@ nunit-*.xml
*.db
.beads-credential-key
__pycache__/
+
+# Machine-specific mise overrides
+mise.local.toml
+mise.local.lock
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7caf4764..db66bd0f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -48,35 +48,74 @@ respectful and constructive in all interactions.
## Development Setup
-### Prerequisites
+### Setup with mise
-- **.NET SDK 10.0+**
-- **Node.js** (for commitlint & husky - local commit validation)
-- **Task** (optional, for running automated tasks) - see [Taskfile.yml](/Taskfile.yml)
-- **Git** with configured `user.name` and `user.email`
+Use mise to set up a local developer workstation or an AI agent's remote development environment.
+It installs the project tools and restores development dependencies from one configuration.
-### Building the Project
+Install [mise](https://mise.jdx.dev/getting-started.html), version 2026.11.8 or later, and Git.
+Configure Git's `user.name` and `user.email`, then run from the repository root:
```bash
-# Install Node dependencies (commitlint & husky for commit validation)
-npm install
+mise trust
+mise install
+mise run setup
+```
-# Set up git commit hooks (commit-msg validation)
-task local:setup-git-hooks
+Review `mise.toml` before trusting it. The configuration installs the build SDK from `global.json`,
+.NET 8/9/10 SDKs for the test runtimes, Node.js, Python, uv, and Task. SDKs share one .NET root so
+all test frameworks are available to the .NET 11 host. Tool installation runs sequentially to
+avoid concurrent SDK installers writing the same files. Resolved tool versions are recorded in
+`mise.lock` for Linux and macOS on x64/arm64, and Windows on x64.
-# Restore dependencies
-dotnet restore
+The setup task installs Node dependencies and Husky commit hooks with `npm ci`, restores NuGet
+packages and local .NET tools, and restores documentation dependencies from `uv.lock` using the
+mise-selected Python. `UV_PYTHON` keeps uv on that interpreter even if an existing environment
+uses another Python version. Run setup again after dependency changes.
-# Build the solution
-dotnet build
+For remote agents and other non-interactive shells, use `mise exec --` for development commands
+without shell activation. CI continues to use the existing GitHub Actions and LayeredCraft DevOps
+workflows.
-# Run tests
-dotnet test
+Existing Taskfiles remain the build, test, and formatting commands:
-# Clean packages (if needed)
-dotnet clean
+```bash
+mise exec -- dotnet build --configuration Release
+mise exec -- task test:all
+mise exec -- task format
+mise exec -- task local:docs:build
```
+[Activate mise in your shell](https://mise.jdx.dev/shell-setup.html) to use these commands
+without the `mise exec --` prefix. Native AOT publishing still requires the platform's C/C++ build
+tools, such as Xcode Command Line Tools on macOS or the compiler/linker prerequisites on Linux.
+
+To refresh locked tool versions after reviewing available updates:
+
+```bash
+mise lock --bump --platform linux-x64,linux-arm64,macos-x64,macos-arm64,windows-x64
+```
+
+Keep the build SDK version in `global.json`; `mise.toml` reads it directly. Commit `mise.lock`
+with tool changes. Put machine-specific overrides in the ignored `mise.local.toml`.
+
+### Manual setup
+
+Without mise, install the stable .NET 11 SDK, .NET 8/9/10 SDKs or their required runtimes, Node.js 24,
+Python 3.13, uv, Task, and Git. Then run:
+
+```bash
+npm ci
+dotnet restore MinimalLambda.sln
+dotnet tool restore
+uv sync --frozen --python python
+dotnet build --configuration Release
+task test:all
+```
+
+The SDK includes both .NET and ASP.NET Core runtimes. When installing only runtimes, install both
+families for the older target frameworks. Exact SDK and tool versions are listed in `mise.lock`.
+
## Code Formatting
Code formatting is automated using **CleanupCode** and **CSharpier**, ensuring consistent style
@@ -349,13 +388,17 @@ This project supports multiple .NET versions:
- **.NET 8.0** (supported)
- **.NET 9.0** (supported)
-- **.NET 10.0 ** (primary target)
+- **.NET 10.0** (supported)
+- **.NET 11.0** (primary target)
+
+Build the repository with the stable .NET 11 SDK, version 11.0.100 or later, and C# 15.
+`task build:aot-check` validates Native AOT publishing on .NET 10 and .NET 11.
Test your changes against all supported frameworks:
```bash
-dotnet build -f net8.0
-dotnet build -f net9.0
+dotnet build --configuration Release
+task test:all
```
## Central Package Management
diff --git a/Directory.Build.props b/Directory.Build.props
index a861144c..dbe09ec9 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -18,6 +18,9 @@
true
true
+
+ $(Features);runtime-async=on
+
all
@@ -34,8 +37,4 @@
true
-
-
- $(NoWarn);NU5104
-
\ No newline at end of file
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 51f7fedb..188f355d 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -1,8 +1,8 @@
-
-
- $(NoWarn);NU5104
-
+
+
+
+
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 18c614bd..880fddfa 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -12,7 +12,7 @@
-
+
@@ -21,78 +21,89 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MinimalLambda.Packages.slnf b/MinimalLambda.Packages.slnf
index 83d7cb9a..6723ccff 100644
--- a/MinimalLambda.Packages.slnf
+++ b/MinimalLambda.Packages.slnf
@@ -17,6 +17,7 @@
"src/MinimalLambda.Templates/MinimalLambda.Templates.csproj",
"src/MinimalLambda.Testing/MinimalLambda.Testing.csproj",
"src/MinimalLambda/MinimalLambda.csproj",
+ "src/MinimalLambda.SourceGenerators/MinimalLambda.SourceGenerators.csproj",
"src/MinimalLambda.EventProcessing/MinimalLambda.EventProcessing.csproj"
]
}
diff --git a/benchmarks/MinimalLambda.Benchmarks/BatchBenchmarks.cs b/benchmarks/MinimalLambda.Benchmarks/BatchBenchmarks.cs
new file mode 100644
index 00000000..eabd80ba
--- /dev/null
+++ b/benchmarks/MinimalLambda.Benchmarks/BatchBenchmarks.cs
@@ -0,0 +1,57 @@
+using System.Text.Json;
+using Amazon.Lambda.Core;
+using Amazon.Lambda.TestUtilities;
+using BenchmarkDotNet.Attributes;
+using Microsoft.Extensions.DependencyInjection;
+using MinimalLambda.Builder;
+using MinimalLambda.EventProcessing;
+using MinimalLambda.Runtime;
+
+namespace MinimalLambda.Benchmarks;
+
+public class BatchBenchmarks
+{
+ private readonly TestLambdaContext _context =
+ new() { RemainingTime = TimeSpan.FromMinutes(15) };
+
+ private LambdaApplication _app = null!;
+ private byte[] _payload = null!;
+ private Func> _handler = null!;
+
+ [Params(1, 32)]
+ public int ItemCount { get; set; }
+
+ [GlobalSetup]
+ public void Setup()
+ {
+ BenchmarkConfig.ReportRuntime();
+ _payload = JsonSerializer.SerializeToUtf8Bytes(
+ Enumerable.Range(0, ItemCount).ToArray(),
+ BenchmarkJsonContext.Default.Int32Array);
+ var builder =
+ LambdaApplication.CreateBuilder(
+ new LambdaApplicationOptions { DisableDefaults = true });
+ builder.Services.AddLambdaSerializerWithContext();
+ builder.Services.Configure(options =>
+ options.MaxConcurrentExecutions = 4);
+ _app = builder.Build();
+ _app.MapEventHandler(
+ static (items, _) => items,
+ static async _ => await Task.Yield());
+ _handler =
+ _app
+ .Services
+ .GetRequiredService()
+ .CreateHandler(CancellationToken.None);
+ }
+
+ [Benchmark]
+ public async Task ProcessBatch()
+ {
+ using var input = new MemoryStream(_payload, writable: false);
+ using var output = await _handler(input, _context).ConfigureAwait(false);
+ }
+
+ [GlobalCleanup]
+ public void Cleanup() => _app.Dispose();
+}
diff --git a/benchmarks/MinimalLambda.Benchmarks/BenchmarkConfig.cs b/benchmarks/MinimalLambda.Benchmarks/BenchmarkConfig.cs
index f5cc32a4..e77924e3 100644
--- a/benchmarks/MinimalLambda.Benchmarks/BenchmarkConfig.cs
+++ b/benchmarks/MinimalLambda.Benchmarks/BenchmarkConfig.cs
@@ -1,5 +1,49 @@
+using System.Reflection;
using BenchmarkDotNet.Configs;
+using BenchmarkDotNet.Diagnosers;
+using BenchmarkDotNet.Environments;
+using BenchmarkDotNet.Jobs;
+using BenchmarkDotNet.Toolchains.CsProj;
+using BenchmarkDotNet.Toolchains.DotNetCli;
+using MinimalLambda.Runtime;
namespace MinimalLambda.Benchmarks;
-public class BenchmarkConfig : ManualConfig { }
+public class BenchmarkConfig : ManualConfig
+{
+ internal static void ReportRuntime()
+ {
+ var method = typeof(LambdaHostedService).GetMethod(
+ "ExecuteAsync",
+ BindingFlags.Instance | BindingFlags.NonPublic)!;
+ Console.WriteLine(
+ $"Core async lowering: {method.MethodImplementationFlags}; runtime: {Environment.Version}");
+ }
+
+ public BenchmarkConfig()
+ {
+ Add(DefaultConfig.Instance);
+ AddDiagnoser(MemoryDiagnoser.Default);
+ var common = Job.Default.WithArguments(
+ [
+ new MsBuildArgument("/p:GeneratePackageOnBuild=false"),
+ new MsBuildArgument("/p:MinimalLambdaRuntimeAsync=false")
+ ]);
+ AddJob(common.WithRuntime(CoreRuntime.Core10_0).WithId("NET10"));
+
+ var toolchain =
+ CsProjCoreToolchain.From(new NetCoreAppSettings("net11.0", null, ".NET 11.0"));
+ // shortcut: BDN 0.15.8 needs a known moniker; the toolchain runs net11.0. Remove when BDN
+ // supports .NET 11.
+ var net11 = common.WithRuntime(CoreRuntime.Core10_0).WithToolchain(toolchain);
+ AddJob(net11.WithId("NET11"));
+ AddJob(
+ net11
+ .WithArguments(
+ [
+ new MsBuildArgument("/p:GeneratePackageOnBuild=false"),
+ new MsBuildArgument("/p:MinimalLambdaRuntimeAsync=true")
+ ])
+ .WithId("NET11-RuntimeAsync"));
+ }
+}
diff --git a/benchmarks/MinimalLambda.Benchmarks/FeatureBenchmarks.cs b/benchmarks/MinimalLambda.Benchmarks/FeatureBenchmarks.cs
new file mode 100644
index 00000000..2d390ce7
--- /dev/null
+++ b/benchmarks/MinimalLambda.Benchmarks/FeatureBenchmarks.cs
@@ -0,0 +1,45 @@
+using System.Runtime.CompilerServices;
+using BenchmarkDotNet.Attributes;
+
+namespace MinimalLambda.Benchmarks;
+
+public class FeatureBenchmarks
+{
+ private readonly DefaultFeatureCollection _features = new([]);
+ private readonly IFeatureProvider[] _providers = [new StringFeatureProvider()];
+
+ [GlobalSetup]
+ public void Setup()
+ {
+ BenchmarkConfig.ReportRuntime();
+ _features.Set("cached");
+ }
+
+ [Benchmark]
+ public string? CachedLookup() => _features.Get();
+
+ [Benchmark]
+ public string? FirstProviderLookup() => new DefaultFeatureCollection(_providers).Get();
+
+ [Benchmark]
+ public IInvocationDataFeature ReplaceResponseStream()
+ {
+ var feature = CreateFeature();
+ feature.ResponseStream = Stream.Null;
+ return feature;
+ }
+
+ // Keep the factory boundary so the JIT cannot discard the original stream initialization.
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ private static IInvocationDataFeature CreateFeature() =>
+ new InvocationDataFeature { EventStream = Stream.Null };
+
+ private sealed class StringFeatureProvider : IFeatureProvider
+ {
+ public bool TryCreate(Type type, out object? feature)
+ {
+ feature = type == typeof(string) ? "provided" : null;
+ return feature is not null;
+ }
+ }
+}
diff --git a/benchmarks/MinimalLambda.Benchmarks/InvocationBenchmarks.cs b/benchmarks/MinimalLambda.Benchmarks/InvocationBenchmarks.cs
new file mode 100644
index 00000000..8066c781
--- /dev/null
+++ b/benchmarks/MinimalLambda.Benchmarks/InvocationBenchmarks.cs
@@ -0,0 +1,94 @@
+using System.Text.Json.Serialization;
+using Amazon.Lambda.Core;
+using Amazon.Lambda.TestUtilities;
+using BenchmarkDotNet.Attributes;
+using Microsoft.Extensions.DependencyInjection;
+using MinimalLambda.Builder;
+using MinimalLambda.Runtime;
+
+namespace MinimalLambda.Benchmarks;
+
+public class InvocationBenchmarks
+{
+ private readonly TestLambdaContext _context =
+ new() { RemainingTime = TimeSpan.FromMinutes(15) };
+
+ private readonly byte[] _payload = "{\"Value\":42}"u8.ToArray();
+ private LambdaApplication _completed = null!;
+ private LambdaApplication _suspended = null!;
+ private LambdaApplication _serialized = null!;
+ private Func> _completedHandler = null!;
+ private Func> _suspendedHandler = null!;
+ private Func> _serializedHandler = null!;
+
+ [Params(0, 3)]
+ public int MiddlewareCount { get; set; }
+
+ [GlobalSetup]
+ public void Setup()
+ {
+ BenchmarkConfig.ReportRuntime();
+ _completed = CreateApplication();
+ _completed.MapHandler(() => Task.CompletedTask);
+ _completedHandler = CreateHandler(_completed);
+
+ _suspended = CreateApplication();
+ _suspended.MapHandler(async () =>
+ {
+ await Task.Yield();
+ });
+ _suspendedHandler = CreateHandler(_suspended);
+
+ _serialized = CreateApplication();
+ _serialized.MapHandler(([FromEvent] BenchmarkPayload value) => value);
+ _serializedHandler = CreateHandler(_serialized);
+ }
+
+ [Benchmark]
+ public Task Completed() => Invoke(_completedHandler);
+
+ [Benchmark]
+ public Task Suspended() => Invoke(_suspendedHandler);
+
+ [Benchmark]
+ public Task Serialize() => Invoke(_serializedHandler);
+
+ private async Task Invoke(Func> handler)
+ {
+ using var input = new MemoryStream(_payload, writable: false);
+ using var output = await handler(input, _context).ConfigureAwait(false);
+ }
+
+ private LambdaApplication CreateApplication()
+ {
+ var builder =
+ LambdaApplication.CreateBuilder(
+ new LambdaApplicationOptions { DisableDefaults = true });
+ builder.Services.AddLambdaSerializerWithContext();
+ var app = builder.Build();
+ for (var index = 0; index < MiddlewareCount; index++)
+ app.Use(next => async context => await next(context).ConfigureAwait(false));
+ return app;
+ }
+
+ private static Func>
+ CreateHandler(LambdaApplication app) =>
+ app
+ .Services
+ .GetRequiredService()
+ .CreateHandler(CancellationToken.None);
+
+ [GlobalCleanup]
+ public void Cleanup()
+ {
+ _completed.Dispose();
+ _suspended.Dispose();
+ _serialized.Dispose();
+ }
+}
+
+public sealed record BenchmarkPayload(int Value);
+
+[JsonSerializable(typeof(BenchmarkPayload))]
+[JsonSerializable(typeof(int[]))]
+public partial class BenchmarkJsonContext : JsonSerializerContext;
diff --git a/benchmarks/MinimalLambda.Benchmarks/MinimalLambda.Benchmarks.csproj b/benchmarks/MinimalLambda.Benchmarks/MinimalLambda.Benchmarks.csproj
index fa64581f..7351aed3 100644
--- a/benchmarks/MinimalLambda.Benchmarks/MinimalLambda.Benchmarks.csproj
+++ b/benchmarks/MinimalLambda.Benchmarks/MinimalLambda.Benchmarks.csproj
@@ -1,10 +1,11 @@
- net10.0
+ net10.0;net11.0
latest
enable
enable
Exe
+ $(InterceptorsNamespaces);MinimalLambda.Generated
AnyCPU
@@ -17,8 +18,12 @@
+
+
+
diff --git a/benchmarks/MinimalLambda.Benchmarks/Program.cs b/benchmarks/MinimalLambda.Benchmarks/Program.cs
index 721fe92b..2bff7985 100644
--- a/benchmarks/MinimalLambda.Benchmarks/Program.cs
+++ b/benchmarks/MinimalLambda.Benchmarks/Program.cs
@@ -1,7 +1,4 @@
-using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Running;
using MinimalLambda.Benchmarks;
-var config = DefaultConfig.Instance;
-
-BenchmarkRunner.Run(config, args);
+BenchmarkSwitcher.FromAssembly(typeof(BenchmarkConfig).Assembly).Run(args, new BenchmarkConfig());
diff --git a/benchmarks/README.md b/benchmarks/README.md
new file mode 100644
index 00000000..a318f7ec
--- /dev/null
+++ b/benchmarks/README.md
@@ -0,0 +1,60 @@
+# MinimalLambda benchmarks
+
+Run from the repository root with the stable .NET 11 SDK and both .NET 10 and .NET 11 runtimes installed:
+
+```bash
+dotnet run --project benchmarks/MinimalLambda.Benchmarks -c Release -f net11.0 -- --filter '*InvocationBenchmarks*' '*BatchBenchmarks*' '*FeatureBenchmarks*'
+```
+
+The suite measures complete invocations, zero or three middleware layers, JSON deserialization and serialization, batches of one or 32 items, feature lookup, and response-stream replacement. Batch handlers use `Task.Yield()` to exercise suspended work with a concurrency limit of four. `CreateBuilderBenchmarks` remains available through the benchmark filter.
+
+Three jobs compare the same source:
+
+| Job | Target | Compiler lowering |
+| --- | --- | --- |
+| `NET10` | .NET 10 | Classic async |
+| `NET11` | .NET 11 | Classic async |
+| `NET11-RuntimeAsync` | .NET 11 | Runtime Async |
+
+BenchmarkDotNet 0.15.8 does not recognize the .NET 11 runtime moniker. The .NET 11 jobs use an explicit `net11.0` toolchain and a known moniker for BenchmarkDotNet's SDK checks and build ordering. Its configuration summary can therefore say `Runtime=.NET 10.0`; the process environment header and setup diagnostics report the actual runtime. Setup also prints the core library's `ExecuteAsync` implementation flags: `IL` for classic async and `Async` for Runtime Async.
+
+## Runtime Async
+
+Runtime Async remains disabled by default. To evaluate repository builds:
+
+```bash
+dotnet test MinimalLambda.sln -c Release -p:MinimalLambdaRuntimeAsync=true
+task build:aot-check
+```
+
+The property applies only to `net11.0` projects. Compiler feature changes participate in the incremental compile cache, so switching modes rebuilds affected assemblies. The AOT task publishes .NET 10 and both .NET 11 modes. CI tests both modes and validates stable and preview package manifests.
+
+This is a repository build option. It does not recompile installed NuGet assemblies or automatically opt client projects into Runtime Async.
+
+## Release preparation measurements
+
+Measured on November 15, 2026, on an Apple M3 Max running macOS 27.0.1, SDK 11.0.100, .NET 10.0.13, and .NET 11.0.0. These are short local JIT measurements, with one launch, two warmups, five measured iterations, and a 100 ms iteration target. They do not measure AWS cold starts or Native AOT execution.
+
+```bash
+dotnet run --project benchmarks/MinimalLambda.Benchmarks -c Release -f net11.0 -- --filter '*InvocationBenchmarks*' '*BatchBenchmarks*' '*FeatureBenchmarks*' --warmupCount 2 --iterationCount 5 --iterationTime 100 --launchCount 1
+```
+
+The allocation baseline uses commit `3a481e47` with the same benchmark code and benchmark access to internals. Run each revision from its own checkout directory so BenchmarkDotNet resolves the correct project. Both .NET 10 and .NET 11 showed these allocations per operation:
+
+| Operation | Before | After |
+| --- | ---: | ---: |
+| Cached feature lookup | 32 B | 0 B |
+| First provider lookup | 248 B | 248 B |
+| Replace response stream before first read | 96 B | 32 B |
+
+The response-stream benchmark keeps a non-inlined factory boundary so the JIT cannot remove the original stream initialization as dead code. No pooling or stream ownership changes are involved.
+
+For .NET 11, Runtime Async increased allocations in the suspended workloads:
+
+| Workload | Classic async | Runtime Async |
+| --- | ---: | ---: |
+| Completed invocation, no middleware | 992 B | 992 B |
+| Suspended invocation, no middleware | 1,558 B | 2,256 B |
+| Batch of 32 suspended items | 16.09 KB | 24.18 KB |
+
+Timing results varied by workload and had wide confidence intervals in some cases. These measurements support keeping Runtime Async opt-in for this release. Repeat longer runs on the deployment architecture before changing the default.
diff --git a/decisions/durable-dependency-support-matrix.md b/decisions/durable-dependency-support-matrix.md
index 47f8f36a..d5e9085f 100644
--- a/decisions/durable-dependency-support-matrix.md
+++ b/decisions/durable-dependency-support-matrix.md
@@ -1,13 +1,13 @@
# Durable Execution dependency and support matrix
-**Verified:** 2026-08-01
+**Verified:** 2026-11-15
## Selected dependencies
| Package | Selected version | Supported asset | Purpose |
| ---------------------------------------- | ---------------- | --------------- | --------------------------------------------- |
-| `Amazon.Lambda.DurableExecution` | `1.0.0` | `net10.0` | Runtime and DE001-DE004 analyzers |
-| `Amazon.Lambda.DurableExecution.Testing` | `1.0.0` | `net10.0` | In-memory workflow testing |
+| `Amazon.Lambda.DurableExecution` | `2.2.0` | `net10.0` | Runtime and DE001-DE004 analyzers |
+| `Amazon.Lambda.DurableExecution.Testing` | `1.1.0` | `net10.0` | In-memory workflow testing |
| `Amazon.Lambda.Tools` | `7.0.0` minimum | `net10.0` | Durable deployment and invocation CLI support |
Consumers must reference `MinimalLambda`, `MinimalLambda.DurableExecution`, and
@@ -48,7 +48,7 @@ run.
## Sources
-- [Amazon.Lambda.DurableExecution 1.0.0](https://www.nuget.org/packages/Amazon.Lambda.DurableExecution/1.0.0)
-- [Amazon.Lambda.DurableExecution.Testing 1.0.0](https://www.nuget.org/packages/Amazon.Lambda.DurableExecution.Testing/1.0.0)
+- [Amazon.Lambda.DurableExecution 2.2.0](https://www.nuget.org/packages/Amazon.Lambda.DurableExecution/2.2.0)
+- [Amazon.Lambda.DurableExecution.Testing 1.1.0](https://www.nuget.org/packages/Amazon.Lambda.DurableExecution.Testing/1.1.0)
- [AWS durable supported runtimes](https://docs.aws.amazon.com/lambda/latest/dg/durable-supported-runtimes.html)
- [AWS durable infrastructure configuration](https://docs.aws.amazon.com/lambda/latest/dg/durable-getting-started-iac.html)
diff --git a/docs/features/durable-execution.md b/docs/features/durable-execution.md
index 17dd4325..d2c61c96 100644
--- a/docs/features/durable-execution.md
+++ b/docs/features/durable-execution.md
@@ -13,7 +13,7 @@ Target `net10.0`. Reference all three packages directly:
```bash
dotnet add package MinimalLambda --version 2.6.0-beta.2
dotnet add package MinimalLambda.DurableExecution --version 2.6.0-beta.2
-dotnet add package Amazon.Lambda.DurableExecution --version 1.0.0
+dotnet add package Amazon.Lambda.DurableExecution --version 2.2.0
```
`MinimalLambda.DurableExecution` releases with `MinimalLambda`; use matching versions. Direct `MinimalLambda` reference supplies source generator for `MapHandler` and `MapDurableHandler`. Direct AWS package reference supplies DE001-DE004 analyzers, which do not flow through transitive dependencies.
diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md
index 5229446c..150ceefe 100644
--- a/docs/getting-started/installation.md
+++ b/docs/getting-started/installation.md
@@ -6,16 +6,20 @@ This guide walks you through installing `MinimalLambda` and configuring your pro
Before you begin, ensure your development environment meets these requirements:
-| Requirement | Minimum Version | Recommended |
-| ------------------- | ----------------------------------------------------- | ----------- |
-| .NET SDK | 8.0 | Latest LTS |
-| C# Language Version | 11 | latest |
-| IDE | Visual Studio 2022 (17.8+), Rider 2023.3+, or VS Code | Latest |
-| AWS CLI | 2.0+ (optional) | Latest |
+| Requirement | Minimum | Recommended |
+| --- | --- | --- |
+| .NET SDK | 11.0.100 | Latest .NET 11 patch |
+| C# language version | 14 | 15.0 |
+| IDE | .NET 11 SDK support | Latest |
+| AWS CLI | 2.0+, optional | Latest |
-!!! note "C# 11 Requirement"
+!!! note "Compiler requirement"
- C# 11 or later is required for source generators and interceptors that power the framework's compile-time optimizations.
+ Use the .NET 11 SDK with C# 14 or later for the source generator and interceptors. The repository builds with stable C# 15; the libraries still include assets for older target frameworks.
+
+The core packages include assets for `net8.0`, `net9.0`, `net10.0`, and `net11.0`.
+Use the stable .NET 11 SDK and Microsoft.Extensions 11.0.0 or later when targeting `net11.0`.
+Durable Execution currently targets `net10.0`.
## Starting from a template
diff --git a/examples/MinimalLambda.Example.DurableExecution/MinimalLambda.Example.DurableExecution.csproj b/examples/MinimalLambda.Example.DurableExecution/MinimalLambda.Example.DurableExecution.csproj
index 66442579..3f3c3fe3 100644
--- a/examples/MinimalLambda.Example.DurableExecution/MinimalLambda.Example.DurableExecution.csproj
+++ b/examples/MinimalLambda.Example.DurableExecution/MinimalLambda.Example.DurableExecution.csproj
@@ -2,7 +2,7 @@
Exe
net10.0
- preview
+ 15.0
enable
enable
Lambda
diff --git a/examples/MinimalLambda.Example.Events/MinimalLambda.Example.Events.csproj b/examples/MinimalLambda.Example.Events/MinimalLambda.Example.Events.csproj
index fd0b955f..af66e6dc 100644
--- a/examples/MinimalLambda.Example.Events/MinimalLambda.Example.Events.csproj
+++ b/examples/MinimalLambda.Example.Events/MinimalLambda.Example.Events.csproj
@@ -2,7 +2,7 @@
Exe
net8.0
- preview
+ 15.0
disable
enable
true
diff --git a/examples/MinimalLambda.Example.OpenTelemetry/MinimalLambda.Example.OpenTelemetry.csproj b/examples/MinimalLambda.Example.OpenTelemetry/MinimalLambda.Example.OpenTelemetry.csproj
index 26a703b9..2a44bb3b 100644
--- a/examples/MinimalLambda.Example.OpenTelemetry/MinimalLambda.Example.OpenTelemetry.csproj
+++ b/examples/MinimalLambda.Example.OpenTelemetry/MinimalLambda.Example.OpenTelemetry.csproj
@@ -2,7 +2,7 @@
Exe
net9.0
- preview
+ 15.0
enable
enable
true
diff --git a/global.json b/global.json
index 865d9da8..86e7e88a 100644
--- a/global.json
+++ b/global.json
@@ -1,7 +1,8 @@
{
"sdk": {
"rollForward": "latestMinor",
- "version": "11.0.100-preview.6.26359.118"
+ "allowPrerelease": false,
+ "version": "11.0.100"
},
"test": {
"runner": "Microsoft.Testing.Platform"
diff --git a/mise.lock b/mise.lock
new file mode 100644
index 00000000..634243c3
--- /dev/null
+++ b/mise.lock
@@ -0,0 +1,148 @@
+# @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html
+
+lockfile_version = 4
+
+[[tools.dotnet]]
+version = "11.0.100"
+backend = "core:dotnet"
+specifiers = ["11.0.100"]
+
+[[tools.dotnet]]
+version = "10.0.404"
+backend = "core:dotnet"
+specifiers = ["10"]
+
+[[tools.dotnet]]
+version = "9.0.321"
+backend = "core:dotnet"
+specifiers = ["9"]
+
+[[tools.dotnet]]
+version = "8.0.428"
+backend = "core:dotnet"
+specifiers = ["8"]
+
+[[tools.node]]
+version = "24.22.3"
+backend = "core:node"
+specifiers = ["24"]
+
+[tools.node."platforms.linux-arm64"]
+checksum = "sha256:261af2af250dfd7e9f25cf151d1b2713a0adf8f10a9ad116c4947f68627affe8"
+url = "https://nodejs.org/dist/v24.22.3/node-v24.22.3-linux-arm64.tar.gz"
+
+[tools.node."platforms.linux-x64"]
+checksum = "sha256:061ec3e3062115705b56b51fa9cc330ab50d34b6969387d4e4b1a50c6809acc2"
+url = "https://nodejs.org/dist/v24.22.3/node-v24.22.3-linux-x64.tar.gz"
+
+[tools.node."platforms.macos-arm64"]
+checksum = "sha256:ff6e17d4874b76d272212b908cc020d6e815fba5a6c7eaaa06add725840307fd"
+url = "https://nodejs.org/dist/v24.22.3/node-v24.22.3-darwin-arm64.tar.gz"
+
+[tools.node."platforms.macos-x64"]
+checksum = "sha256:977614af0504c81045e7fd85596dbca0e5f951b96681516dadafedcca8c447f7"
+url = "https://nodejs.org/dist/v24.22.3/node-v24.22.3-darwin-x64.tar.gz"
+
+[tools.node."platforms.windows-x64"]
+checksum = "sha256:e612af99f626ab415ea225af6bce5c971feb448cb5cae250bb1c3fa50c5f7d9f"
+url = "https://nodejs.org/dist/v24.22.3/node-v24.22.3-win-x64.zip"
+
+[[tools.python]]
+version = "3.13.18"
+backend = "core:python"
+specifiers = ["3.13"]
+
+[tools.python."platforms.linux-arm64"]
+checksum = "sha256:55c00325f7c1fddf325dfc621aabdfbbac4dc54adda224af88ec411dc12db239"
+url = "https://github.com/astral-sh/python-build-standalone/releases/download/20261110/cpython-3.13.18+20261110-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz"
+provenance = "github-attestations"
+
+[tools.python."platforms.linux-x64"]
+checksum = "sha256:f2d2199eb25880e07863b391cf7124e7ffa1338b0d65600dfcec117c4223a7fb"
+url = "https://github.com/astral-sh/python-build-standalone/releases/download/20261110/cpython-3.13.18+20261110-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz"
+provenance = "github-attestations"
+
+[tools.python."platforms.macos-arm64"]
+checksum = "sha256:7a2384641584ab9984221fcb0fc9265df465922af71be71410529e2a9c3f0540"
+url = "https://github.com/astral-sh/python-build-standalone/releases/download/20261110/cpython-3.13.18+20261110-aarch64-apple-darwin-install_only_stripped.tar.gz"
+provenance = "github-attestations"
+
+[tools.python."platforms.macos-x64"]
+checksum = "sha256:d27d59a722db9f69926eb6d9564071247221f45a04da920ea7f3001c97e32f9b"
+url = "https://github.com/astral-sh/python-build-standalone/releases/download/20261110/cpython-3.13.18+20261110-x86_64-apple-darwin-install_only_stripped.tar.gz"
+provenance = "github-attestations"
+
+[tools.python."platforms.windows-x64"]
+checksum = "sha256:2e0fed09d48989f64c9305da9ff2d37a41c0d13ab2aa6283405b2b620dfbf805"
+url = "https://github.com/astral-sh/python-build-standalone/releases/download/20261110/cpython-3.13.18+20261110-x86_64-pc-windows-msvc-install_only_stripped.tar.gz"
+provenance = "github-attestations"
+
+[[tools.task]]
+version = "3.54.0"
+backend = "aqua:go-task/task"
+specifiers = ["3"]
+
+[tools.task."platforms.linux-arm64"]
+checksum = "sha256:d7189d439d4a6058e39e1b2acd7c8b27acd4856691b408f23b242e4294e1df5b"
+checksum_source = "mise-versions"
+url = "https://github.com/go-task/task/releases/download/v3.54.0/task_linux_arm64.tar.gz"
+url_api = "https://api.github.com/repos/go-task/task/releases/assets/604090041"
+
+[tools.task."platforms.linux-x64"]
+checksum = "sha256:680859dbb4d881a9c72d4d9a8f510825450849af8567deacd7302c01124416fb"
+checksum_source = "mise-versions"
+url = "https://github.com/go-task/task/releases/download/v3.54.0/task_linux_amd64.tar.gz"
+url_api = "https://api.github.com/repos/go-task/task/releases/assets/604090073"
+
+[tools.task."platforms.macos-arm64"]
+checksum = "sha256:12a69fcf37bb8d5bc9150c44f9a936775b73e59ff044c2c245232f198c135637"
+checksum_source = "mise-versions"
+url = "https://github.com/go-task/task/releases/download/v3.54.0/task_darwin_arm64.tar.gz"
+url_api = "https://api.github.com/repos/go-task/task/releases/assets/604090068"
+
+[tools.task."platforms.macos-x64"]
+checksum = "sha256:0543b0844a725814c0412d3f4bed12873ce9ed0da207b15775f63a97d734aac0"
+checksum_source = "mise-versions"
+url = "https://github.com/go-task/task/releases/download/v3.54.0/task_darwin_amd64.tar.gz"
+url_api = "https://api.github.com/repos/go-task/task/releases/assets/604090006"
+
+[tools.task."platforms.windows-x64"]
+checksum = "sha256:837f42f71899ea41d07a47acc81d4d6ea80cb41c68292345f915c656473efcb7"
+checksum_source = "mise-versions"
+url = "https://github.com/go-task/task/releases/download/v3.54.0/task_windows_amd64.zip"
+url_api = "https://api.github.com/repos/go-task/task/releases/assets/604090005"
+
+[[tools.uv]]
+version = "0.13.8"
+backend = "aqua:astral-sh/uv"
+specifiers = ["latest"]
+
+[tools.uv."platforms.linux-arm64"]
+checksum = "sha256:74f2f5c6024d397481db228db8fc25eed420db192243f88438c118e7e013e585"
+url = "https://github.com/astral-sh/uv/releases/download/0.13.8/uv-aarch64-unknown-linux-gnu.tar.gz"
+url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/740313629"
+provenance = "github-attestations"
+
+[tools.uv."platforms.linux-x64"]
+checksum = "sha256:5acfd9177cfecf0bf87578f059728215ccc884388988f55f7a65041b57387d91"
+url = "https://github.com/astral-sh/uv/releases/download/0.13.8/uv-x86_64-unknown-linux-gnu.tar.gz"
+url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/740313966"
+provenance = "github-attestations"
+
+[tools.uv."platforms.macos-arm64"]
+checksum = "sha256:6b71028a6b904f2ae3340ef52e595512de807d06c0a20eaef2f692581b246558"
+url = "https://github.com/astral-sh/uv/releases/download/0.13.8/uv-aarch64-apple-darwin.tar.gz"
+url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/740313603"
+provenance = "github-attestations"
+
+[tools.uv."platforms.macos-x64"]
+checksum = "sha256:a04c2ffeac28b2003a2c13caf538ab425fcd7def3e4a41571f4a8fb370a66af3"
+url = "https://github.com/astral-sh/uv/releases/download/0.13.8/uv-x86_64-apple-darwin.tar.gz"
+url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/740313917"
+provenance = "github-attestations"
+
+[tools.uv."platforms.windows-x64"]
+checksum = "sha256:529e78a9cec6cd7e3e014f7ecd8bda0c113969d4ed0f2efeedb85c30943325b8"
+url = "https://github.com/astral-sh/uv/releases/download/0.13.8/uv-x86_64-pc-windows-msvc.zip"
+url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/740313927"
+provenance = "github-attestations"
diff --git a/mise.toml b/mise.toml
new file mode 100644
index 00000000..4fd19c95
--- /dev/null
+++ b/mise.toml
@@ -0,0 +1,27 @@
+min_version = "2026.11.8"
+
+[settings]
+lockfile = true
+# SDK installers share a cache and .NET root; run them sequentially.
+jobs = 1
+dotnet.isolated = false
+
+[tools]
+# Keep the build SDK in global.json; older SDKs supply runtimes for the test matrix.
+dotnet = ["{{ read_json(path='global.json')['sdk']['version'] }}", "10", "9", "8"]
+node = "24"
+python = "3.13"
+uv = "latest"
+task = "3"
+
+[env]
+UV_PYTHON = { value = "{{ tools.python.path }}", tools = true }
+
+[tasks.setup]
+description = "Restore development dependencies and configure commit hooks"
+run = [
+ "npm ci",
+ "dotnet restore MinimalLambda.sln",
+ "dotnet tool restore",
+ "uv sync --frozen",
+]
diff --git a/package-lock.json b/package-lock.json
index 407209a3..9f62b475 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"version": "0.0.7",
"devDependencies": {
"@commitlint/cli": "^21.2.4",
- "@commitlint/config-conventional": "^21.0.2",
+ "@commitlint/config-conventional": "^21.2.4",
"husky": "^9.1.7"
}
},
diff --git a/package.json b/package.json
index 3ff81a09..d6ea5d5a 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
"private": true,
"devDependencies": {
"@commitlint/cli": "^21.2.4",
- "@commitlint/config-conventional": "^21.0.2",
+ "@commitlint/config-conventional": "^21.2.4",
"husky": "^9.1.7"
},
"scripts": {
diff --git a/scripts/dry-run-release-manifests.sh b/scripts/dry-run-release-manifests.sh
index 9e04c252..f817b9f6 100755
--- a/scripts/dry-run-release-manifests.sh
+++ b/scripts/dry-run-release-manifests.sh
@@ -22,33 +22,35 @@ rsync -a \
"$repo_root/" "$work_root/"
artifacts="$temporary/artifacts"
-version=91.2.3-preview.456
cd "$work_root"
dotnet restore MinimalLambda.Packages.slnf --tl:off
-dotnet build MinimalLambda.Packages.slnf \
- --tl:off \
- --configuration Release \
- --no-restore \
- -p:Version="$version"
-dotnet pack MinimalLambda.Packages.slnf \
- --tl:off \
- --configuration Release \
- --no-build \
- --output "$artifacts/packages" \
- -p:Version="$version"
-
-python3 scripts/validate-release-artifacts.py \
- --lane core \
- --tag "v$version" \
- --artifacts "$artifacts/packages"
+for version in 91.2.3 91.2.3-preview.456; do
+ dotnet build MinimalLambda.Packages.slnf \
+ --tl:off \
+ --configuration Release \
+ --no-restore \
+ -p:Version="$version"
+ dotnet pack MinimalLambda.Packages.slnf \
+ --tl:off \
+ --configuration Release \
+ --no-build \
+ --output "$artifacts/packages/$version" \
+ -p:Version="$version"
+
+ python3 scripts/validate-release-artifacts.py \
+ --lane core \
+ --tag "v$version" \
+ --artifacts "$artifacts/packages/$version"
+
+done
python3 scripts/validate-release-artifacts.py \
--lane core-preview \
--expected-version "$version" \
--preview-run-number 456 \
- --artifacts "$artifacts/packages"
+ --artifacts "$artifacts/packages/$version"
python3 scripts/test-release-artifact-validator.py
diff --git a/scripts/test-package-compatibility.sh b/scripts/test-package-compatibility.sh
index 2a459cc6..329720b0 100755
--- a/scripts/test-package-compatibility.sh
+++ b/scripts/test-package-compatibility.sh
@@ -245,7 +245,7 @@ for filename, (package_id, version, kind) in expected.items():
if minimal.attrib.get("exclude") != "Build,Analyzers":
raise AssertionError(f"durable core dependency exclusion mismatch: {minimal.attrib}")
aws = by_id["Amazon.Lambda.DurableExecution"]
- if aws.attrib.get("version") != "1.0.0":
+ if aws.attrib.get("version") != "2.2.0":
raise AssertionError(f"durable AWS dependency version mismatch: {aws.attrib}")
if aws.attrib.get("exclude") != "Build,Analyzers":
raise AssertionError(f"durable AWS dependency exclusion mismatch: {aws.attrib}")
diff --git a/scripts/test-release-artifact-validator.py b/scripts/test-release-artifact-validator.py
index e6c7195d..dd811c74 100644
--- a/scripts/test-release-artifact-validator.py
+++ b/scripts/test-release-artifact-validator.py
@@ -52,6 +52,35 @@ def main() -> None:
"must not ship deferred mlambda-durable template",
)
+ with tempfile.TemporaryDirectory(prefix="minimal-lambda-manifest-") as temporary:
+ artifacts = Path(temporary)
+ package_ids = validator.CORE_PACKAGE_IDS | {"MinimalLambda.EventProcessing"}
+ for package_id in package_ids:
+ extensions = ("nupkg",) if package_id == "MinimalLambda.Templates" else ("nupkg", "snupkg")
+ for extension in extensions:
+ path = artifacts / f"{package_id}.{VERSION}.{extension}"
+ with zipfile.ZipFile(path, "w") as archive:
+ archive.writestr(
+ f"{package_id}.nuspec",
+ f"{package_id}{VERSION}",
+ )
+ validator.validate_artifacts("core", artifacts, VERSION, None)
+ symbol = artifacts / f"MinimalLambda.EventProcessing.{VERSION}.snupkg"
+ symbol_payload = symbol.read_bytes()
+ symbol.unlink()
+ expect_failure(
+ "missing downloaded symbol package",
+ lambda: validator.validate_artifacts("core", artifacts, VERSION, None),
+ "symbol package ID collision/omission",
+ )
+ symbol.write_bytes(symbol_payload)
+ (artifacts / f"MinimalLambda.EventProcessing.{VERSION}.nupkg").unlink()
+ expect_failure(
+ "missing event processing package",
+ lambda: validator.validate_artifacts("core", artifacts, VERSION, None),
+ "missing=['MinimalLambda.EventProcessing']",
+ )
+
original_lookup = validator.nuget_version_exists
validator.nuget_version_exists = lambda package_id, version: package_id == PACKAGE_ID
try:
diff --git a/scripts/validate-release-artifacts.py b/scripts/validate-release-artifacts.py
index 9fe9bc5a..8c14a4bf 100755
--- a/scripts/validate-release-artifacts.py
+++ b/scripts/validate-release-artifacts.py
@@ -18,6 +18,7 @@
"MinimalLambda",
"MinimalLambda.Abstractions",
"MinimalLambda.DurableExecution",
+ "MinimalLambda.EventProcessing",
"MinimalLambda.Envelopes",
"MinimalLambda.Envelopes.Alb",
"MinimalLambda.Envelopes.ApiGateway",
diff --git a/skills/minimal-lambda/references/client-project-setup.md b/skills/minimal-lambda/references/client-project-setup.md
index f4abc1fc..390533ab 100644
--- a/skills/minimal-lambda/references/client-project-setup.md
+++ b/skills/minimal-lambda/references/client-project-setup.md
@@ -85,9 +85,8 @@ Keep `MinimalLambda.Testing` version aligned with `MinimalLambda`.
## Project file basics
-Use a current .NET SDK and modern C# language version. Interceptors/source-generation paths require
-compiler support; prefer `LangVersion` `latest`/`preview` when package docs or build diagnostics
-require it. Repo uses newer versions; client project can use current SDK/LangVersion.
+Use the .NET 11 SDK and stable `LangVersion` `15.0` for the current source generator and
+interceptors. Older target frameworks remain supported; preview language mode is not required.
```xml
diff --git a/skills/minimal-lambda/references/durable-execution.md b/skills/minimal-lambda/references/durable-execution.md
index 776ace92..e633c505 100644
--- a/skills/minimal-lambda/references/durable-execution.md
+++ b/skills/minimal-lambda/references/durable-execution.md
@@ -10,7 +10,7 @@ Reference all three packages directly:
```bash
dotnet add package MinimalLambda
dotnet add package MinimalLambda.DurableExecution
-dotnet add package Amazon.Lambda.DurableExecution --version 1.0.0
+dotnet add package Amazon.Lambda.DurableExecution --version 2.2.0
```
Direct `MinimalLambda` reference activates MinimalLambda source generator. Direct AWS package
diff --git a/skills/minimal-lambda/references/repo-workflow.md b/skills/minimal-lambda/references/repo-workflow.md
index 7538031b..91fdb212 100644
--- a/skills/minimal-lambda/references/repo-workflow.md
+++ b/skills/minimal-lambda/references/repo-workflow.md
@@ -14,6 +14,28 @@ Follow root `AGENTS.md`:
## Commands
+The repository requires the stable .NET 11 SDK, version 11.0.100 or later.
+Libraries target .NET 8, 9, 10, and 11; Durable Execution targets .NET 10.
+
+For a new checkout on a developer workstation or in an AI agent's remote development environment,
+use mise 2026.11.8 or later:
+
+```bash
+mise trust
+mise install
+mise run setup
+mise exec -- dotnet build --configuration Release
+mise exec -- task test:all
+```
+
+`mise.toml` reads the SDK version from `global.json` and installs older SDKs in the same .NET root
+for the test matrix. Install sequentially with the configured `jobs = 1` to avoid SDK installer races.
+`mise.lock` pins resolved tool versions. The setup task restores npm, NuGet,
+local .NET tools, and the uv documentation environment. Keep existing Taskfiles as the command
+source; use `mise exec --` when mise is not activated in the shell, including non-interactive agent
+sessions. Mise sets up development environments; CI uses the existing GitHub Actions and
+LayeredCraft DevOps workflows.
+
Restore:
```bash
@@ -32,7 +54,7 @@ Tests:
```bash
task test:all
# or pick the target framework relevant to the change
-DOTNET_NOLOGO=1 dotnet test --configuration Release -f net10.0
+DOTNET_NOLOGO=1 dotnet test --project tests/MinimalLambda.UnitTests/MinimalLambda.UnitTests.csproj --configuration Release -f net11.0
```
Use `task test:all` when practical; focused `dotnet test -f ...` commands are shortcuts, not the
@@ -41,7 +63,7 @@ canonical full suite.
AOT check:
```bash
-DOTNET_NOLOGO=1 dotnet publish src/AotCompatibility.TestApp/AotCompatibility.TestApp.csproj /p:TreatWarningsAsErrors=true
+task build:aot-check
```
Format:
@@ -51,10 +73,25 @@ task format
# or task format:csharpier for C# formatting only
```
+## Performance checks
+
+The benchmark project compares .NET 10, .NET 11, and an opt-in .NET 11 Runtime Async build.
+It covers full invocations, middleware, serialization, batch processing, and feature allocations.
+Run from the repository root:
+
+```bash
+dotnet run --project benchmarks/MinimalLambda.Benchmarks -c Release -f net11.0 -- --filter '*InvocationBenchmarks*' '*BatchBenchmarks*' '*FeatureBenchmarks*'
+```
+
+Runtime Async is disabled by default. Evaluate it with `-p:MinimalLambdaRuntimeAsync=true`;
+the repository applies the compiler feature only to `net11.0`. This property builds repository
+projects; it does not change precompiled NuGet assemblies or configure client projects.
+Validate tests and AOT publishing in both modes before changing the default.
+
## Code style
- nullable enabled; treat nullability warnings as bugs
-- C# preview/C# 14 features present
+- stable C# 15; C# 14 extension blocks remain valid
- extension blocks `extension(...) { ... }` are intentional; do not rewrite to old extension syntax
- file-scoped namespaces
- `sealed` for public classes unless inheritance intended
@@ -132,6 +169,12 @@ dotnet test
- Integration tests via `MinimalLambda.Testing` for pipeline behavior.
- AOT test app for trimming/native publish compatibility.
+## Release artifact validation
+
+Release and preview publishing download and validate the complete package manifest before trusted
+publishing. Keep all 16 `.nupkg` and 15 `.snupkg` files in the uploaded artifact. The shared workflows
+are pinned to the symbol-upload fix from `LayeredCraft/devops-templates#53`.
+
## Before final handoff
Report commands run and results. If not run, say why.
diff --git a/src/AotCompatibility.TestApp/AotCompatibility.TestApp.csproj b/src/AotCompatibility.TestApp/AotCompatibility.TestApp.csproj
index e394292a..f34518c9 100644
--- a/src/AotCompatibility.TestApp/AotCompatibility.TestApp.csproj
+++ b/src/AotCompatibility.TestApp/AotCompatibility.TestApp.csproj
@@ -1,8 +1,8 @@
Exe
- net10.0
- preview
+ net10.0;net11.0
+ 15.0
enable
enable
true
diff --git a/src/Envelopes/MinimalLambda.Envelopes.Alb/MinimalLambda.Envelopes.Alb.csproj b/src/Envelopes/MinimalLambda.Envelopes.Alb/MinimalLambda.Envelopes.Alb.csproj
index e9ec06c5..e4fd7fcc 100644
--- a/src/Envelopes/MinimalLambda.Envelopes.Alb/MinimalLambda.Envelopes.Alb.csproj
+++ b/src/Envelopes/MinimalLambda.Envelopes.Alb/MinimalLambda.Envelopes.Alb.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/MinimalLambda.Envelopes.ApiGateway.csproj b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/MinimalLambda.Envelopes.ApiGateway.csproj
index 4b19c5e1..4aac55c4 100644
--- a/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/MinimalLambda.Envelopes.ApiGateway.csproj
+++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/MinimalLambda.Envelopes.ApiGateway.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/MinimalLambda.Envelopes.CloudWatchLogs.csproj b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/MinimalLambda.Envelopes.CloudWatchLogs.csproj
index c915e9d0..3ecc47bb 100644
--- a/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/MinimalLambda.Envelopes.CloudWatchLogs.csproj
+++ b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/MinimalLambda.Envelopes.CloudWatchLogs.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/Envelopes/MinimalLambda.Envelopes.Kafka/MinimalLambda.Envelopes.Kafka.csproj b/src/Envelopes/MinimalLambda.Envelopes.Kafka/MinimalLambda.Envelopes.Kafka.csproj
index 615fe4b9..6c35db73 100644
--- a/src/Envelopes/MinimalLambda.Envelopes.Kafka/MinimalLambda.Envelopes.Kafka.csproj
+++ b/src/Envelopes/MinimalLambda.Envelopes.Kafka/MinimalLambda.Envelopes.Kafka.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj
index 4863d830..274763e1 100644
--- a/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj
+++ b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/MinimalLambda.Envelopes.KinesisFirehose.csproj b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/MinimalLambda.Envelopes.KinesisFirehose.csproj
index 4cf94cb4..41f72a8f 100644
--- a/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/MinimalLambda.Envelopes.KinesisFirehose.csproj
+++ b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/MinimalLambda.Envelopes.KinesisFirehose.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/Envelopes/MinimalLambda.Envelopes.Sns/MinimalLambda.Envelopes.Sns.csproj b/src/Envelopes/MinimalLambda.Envelopes.Sns/MinimalLambda.Envelopes.Sns.csproj
index 4eeeb023..7f9879a4 100644
--- a/src/Envelopes/MinimalLambda.Envelopes.Sns/MinimalLambda.Envelopes.Sns.csproj
+++ b/src/Envelopes/MinimalLambda.Envelopes.Sns/MinimalLambda.Envelopes.Sns.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/Envelopes/MinimalLambda.Envelopes.Sqs/MinimalLambda.Envelopes.Sqs.csproj b/src/Envelopes/MinimalLambda.Envelopes.Sqs/MinimalLambda.Envelopes.Sqs.csproj
index 427bd86f..fe734952 100644
--- a/src/Envelopes/MinimalLambda.Envelopes.Sqs/MinimalLambda.Envelopes.Sqs.csproj
+++ b/src/Envelopes/MinimalLambda.Envelopes.Sqs/MinimalLambda.Envelopes.Sqs.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/Envelopes/MinimalLambda.Envelopes/MinimalLambda.Envelopes.csproj b/src/Envelopes/MinimalLambda.Envelopes/MinimalLambda.Envelopes.csproj
index 784782e5..ddd9a077 100644
--- a/src/Envelopes/MinimalLambda.Envelopes/MinimalLambda.Envelopes.csproj
+++ b/src/Envelopes/MinimalLambda.Envelopes/MinimalLambda.Envelopes.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/MinimalLambda.Abstractions/MinimalLambda.Abstractions.csproj b/src/MinimalLambda.Abstractions/MinimalLambda.Abstractions.csproj
index 51a029bc..8d2cd3e8 100644
--- a/src/MinimalLambda.Abstractions/MinimalLambda.Abstractions.csproj
+++ b/src/MinimalLambda.Abstractions/MinimalLambda.Abstractions.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0;net11.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/MinimalLambda.DurableExecution/MinimalLambda.DurableExecution.csproj b/src/MinimalLambda.DurableExecution/MinimalLambda.DurableExecution.csproj
index b7ad2793..d78cc152 100644
--- a/src/MinimalLambda.DurableExecution/MinimalLambda.DurableExecution.csproj
+++ b/src/MinimalLambda.DurableExecution/MinimalLambda.DurableExecution.csproj
@@ -1,7 +1,7 @@
net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/MinimalLambda.DurableExecution/README.md b/src/MinimalLambda.DurableExecution/README.md
index 0f54b538..44d00835 100644
--- a/src/MinimalLambda.DurableExecution/README.md
+++ b/src/MinimalLambda.DurableExecution/README.md
@@ -16,7 +16,7 @@ Reference all three packages directly:
```bash
dotnet add package MinimalLambda --version 2.6.0-beta.2
dotnet add package MinimalLambda.DurableExecution --version 2.6.0-beta.2
-dotnet add package Amazon.Lambda.DurableExecution --version 1.0.0
+dotnet add package Amazon.Lambda.DurableExecution --version 2.2.0
```
Direct `MinimalLambda` reference supplies one source generator for both `MapHandler` and
diff --git a/src/MinimalLambda.EventProcessing/MinimalLambda.EventProcessing.csproj b/src/MinimalLambda.EventProcessing/MinimalLambda.EventProcessing.csproj
index 9899d2ce..3ae3eac2 100644
--- a/src/MinimalLambda.EventProcessing/MinimalLambda.EventProcessing.csproj
+++ b/src/MinimalLambda.EventProcessing/MinimalLambda.EventProcessing.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0;net11.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/MinimalLambda.OpenTelemetry/MinimalLambda.OpenTelemetry.csproj b/src/MinimalLambda.OpenTelemetry/MinimalLambda.OpenTelemetry.csproj
index abc54a8f..af10f6ba 100644
--- a/src/MinimalLambda.OpenTelemetry/MinimalLambda.OpenTelemetry.csproj
+++ b/src/MinimalLambda.OpenTelemetry/MinimalLambda.OpenTelemetry.csproj
@@ -1,7 +1,7 @@
net9.0;net10.0;net11.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/MinimalLambda.SourceGenerators/MinimalLambda.SourceGenerators.csproj b/src/MinimalLambda.SourceGenerators/MinimalLambda.SourceGenerators.csproj
index fe0e4c27..f65b3d1b 100644
--- a/src/MinimalLambda.SourceGenerators/MinimalLambda.SourceGenerators.csproj
+++ b/src/MinimalLambda.SourceGenerators/MinimalLambda.SourceGenerators.csproj
@@ -31,7 +31,9 @@
-
+
diff --git a/src/MinimalLambda.Templates/templates/mlambda-durable/src/BlueprintBaseName.1/BlueprintBaseName.1.csproj b/src/MinimalLambda.Templates/templates/mlambda-durable/src/BlueprintBaseName.1/BlueprintBaseName.1.csproj
index bc6a0eec..96a6d9e9 100644
--- a/src/MinimalLambda.Templates/templates/mlambda-durable/src/BlueprintBaseName.1/BlueprintBaseName.1.csproj
+++ b/src/MinimalLambda.Templates/templates/mlambda-durable/src/BlueprintBaseName.1/BlueprintBaseName.1.csproj
@@ -2,7 +2,7 @@
Exe
net10.0
- preview
+ 15.0
enable
enable
Lambda
diff --git a/src/MinimalLambda.Testing/MinimalLambda.Testing.csproj b/src/MinimalLambda.Testing/MinimalLambda.Testing.csproj
index 38392c94..de2e8b86 100644
--- a/src/MinimalLambda.Testing/MinimalLambda.Testing.csproj
+++ b/src/MinimalLambda.Testing/MinimalLambda.Testing.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0;net11.0
- preview
+ 15.0
enable
enable
true
diff --git a/src/MinimalLambda/Core/Features/DefaultFeatureCollection.cs b/src/MinimalLambda/Core/Features/DefaultFeatureCollection.cs
index 5b358263..332adc30 100644
--- a/src/MinimalLambda/Core/Features/DefaultFeatureCollection.cs
+++ b/src/MinimalLambda/Core/Features/DefaultFeatureCollection.cs
@@ -25,10 +25,16 @@ internal DefaultFeatureCollection(IEnumerable featureProviders
public T? Get()
{
var type = typeof(T);
- if (!_features.TryGetValue(type, out var feature)
- && _featureProviders.Any(t => t.TryCreate(type, out feature))
- && !_features.TryAdd(type, feature!))
- feature = _features[type];
+ if (!_features.TryGetValue(type, out var feature))
+ foreach (var provider in _featureProviders)
+ {
+ if (!provider.TryCreate(type, out feature))
+ continue;
+
+ if (!_features.TryAdd(type, feature!))
+ feature = _features[type];
+ break;
+ }
return feature is null ? default : (T)feature;
}
diff --git a/src/MinimalLambda/Core/Features/InvocationDataFeature.cs b/src/MinimalLambda/Core/Features/InvocationDataFeature.cs
index e7e41687..0849c3c8 100644
--- a/src/MinimalLambda/Core/Features/InvocationDataFeature.cs
+++ b/src/MinimalLambda/Core/Features/InvocationDataFeature.cs
@@ -11,7 +11,25 @@ public required Stream EventStream
init => _eventStream = value;
}
- public Stream ResponseStream { get; set; } = new MemoryStream();
+ private Stream? _responseStream;
+
+ public Stream ResponseStream
+ {
+ get
+ {
+ if (Volatile.Read(ref _responseStream) is { } response)
+ return response;
+
+ var created = new MemoryStream();
+ response = Interlocked.CompareExchange(ref _responseStream, created, null);
+ if (response is null)
+ return created;
+
+ created.Dispose();
+ return response;
+ }
+ set => Volatile.Write(ref _responseStream, value);
+ }
public void EnableBuffering()
{
diff --git a/src/MinimalLambda/MinimalLambda.csproj b/src/MinimalLambda/MinimalLambda.csproj
index ce7e1c68..c096fb35 100644
--- a/src/MinimalLambda/MinimalLambda.csproj
+++ b/src/MinimalLambda/MinimalLambda.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0;net11.0
- preview
+ 15.0
enable
enable
true
@@ -31,6 +31,7 @@
+
diff --git a/tasks/BuildTasks.yml b/tasks/BuildTasks.yml
index cbb30bf0..de1dd67a 100644
--- a/tasks/BuildTasks.yml
+++ b/tasks/BuildTasks.yml
@@ -60,10 +60,12 @@ tasks:
- echo " dotnet nuget add source {{.LOCAL_NUGET_SOURCE}} --name local"
aot-check:
- desc: Validates the AOT compatibility of the libraries
+ desc: Validates AOT on .NET 10 and .NET 11 with classic and Runtime Async builds
silent: true
cmds:
- - dotnet publish src/AotCompatibility.TestApp/AotCompatibility.TestApp.csproj /p:TreatWarningsAsErrors=true
+ - dotnet publish src/AotCompatibility.TestApp/AotCompatibility.TestApp.csproj --configuration Release --framework net10.0 /p:TreatWarningsAsErrors=true
+ - dotnet publish src/AotCompatibility.TestApp/AotCompatibility.TestApp.csproj --configuration Release --framework net11.0 /p:TreatWarningsAsErrors=true
+ - dotnet publish src/AotCompatibility.TestApp/AotCompatibility.TestApp.csproj --configuration Release --framework net11.0 /p:MinimalLambdaRuntimeAsync=true /p:TreatWarningsAsErrors=true
package-compat:
desc: Validates packed durable package consumers on net10.0
diff --git a/tests/MinimalLambda.DurableExecution.UnitTests/MinimalLambda.DurableExecution.UnitTests.csproj b/tests/MinimalLambda.DurableExecution.UnitTests/MinimalLambda.DurableExecution.UnitTests.csproj
index 243fc60d..04341a05 100644
--- a/tests/MinimalLambda.DurableExecution.UnitTests/MinimalLambda.DurableExecution.UnitTests.csproj
+++ b/tests/MinimalLambda.DurableExecution.UnitTests/MinimalLambda.DurableExecution.UnitTests.csproj
@@ -1,7 +1,7 @@
net10.0
- preview
+ 15.0
enable
enable
false
diff --git a/tests/MinimalLambda.Envelopes.UnitTests/MinimalLambda.Envelopes.UnitTests.csproj b/tests/MinimalLambda.Envelopes.UnitTests/MinimalLambda.Envelopes.UnitTests.csproj
index 049357a6..3d9352b3 100644
--- a/tests/MinimalLambda.Envelopes.UnitTests/MinimalLambda.Envelopes.UnitTests.csproj
+++ b/tests/MinimalLambda.Envelopes.UnitTests/MinimalLambda.Envelopes.UnitTests.csproj
@@ -1,7 +1,7 @@
net8.0;net9.0;net10.0;net11.0
- preview
+ 15.0
enable
enable
false
diff --git a/tests/MinimalLambda.OpenTelemetry.UnitTests/MinimalLambda.OpenTelemetry.UnitTests.csproj b/tests/MinimalLambda.OpenTelemetry.UnitTests/MinimalLambda.OpenTelemetry.UnitTests.csproj
index 158f6335..746158a6 100644
--- a/tests/MinimalLambda.OpenTelemetry.UnitTests/MinimalLambda.OpenTelemetry.UnitTests.csproj
+++ b/tests/MinimalLambda.OpenTelemetry.UnitTests/MinimalLambda.OpenTelemetry.UnitTests.csproj
@@ -1,7 +1,7 @@
net9.0;net10.0;net11.0
- preview
+ 15.0
enable
enable
false
diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/EventHandlerEmitterTests.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/EventHandlerEmitterTests.cs
index 1339fdea..150737d0 100644
--- a/tests/MinimalLambda.SourceGenerators.UnitTests/EventHandlerEmitterTests.cs
+++ b/tests/MinimalLambda.SourceGenerators.UnitTests/EventHandlerEmitterTests.cs
@@ -232,7 +232,7 @@ internal sealed class Response;
result.Diagnostics.Should().BeEmpty();
result
.GeneratedTrees
- .Select(tree => tree.FilePath.Split('/').Last())
+ .Select(tree => Path.GetFileName(tree.FilePath))
.Should()
.Contain(
[
diff --git a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.DiLambda/MinimalLambda.Testing.UnitTests.DiLambda.csproj b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.DiLambda/MinimalLambda.Testing.UnitTests.DiLambda.csproj
index fe22ff05..a3bcf8f3 100644
--- a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.DiLambda/MinimalLambda.Testing.UnitTests.DiLambda.csproj
+++ b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.DiLambda/MinimalLambda.Testing.UnitTests.DiLambda.csproj
@@ -2,7 +2,7 @@
Exe
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.DurableLambda/MinimalLambda.Testing.UnitTests.DurableLambda.csproj b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.DurableLambda/MinimalLambda.Testing.UnitTests.DurableLambda.csproj
index 2720d8f0..7053ae77 100644
--- a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.DurableLambda/MinimalLambda.Testing.UnitTests.DurableLambda.csproj
+++ b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.DurableLambda/MinimalLambda.Testing.UnitTests.DurableLambda.csproj
@@ -2,7 +2,7 @@
Exe
net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.EventProcessorLambda/MinimalLambda.Testing.UnitTests.EventProcessorLambda.csproj b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.EventProcessorLambda/MinimalLambda.Testing.UnitTests.EventProcessorLambda.csproj
index d3af1a50..74f6d901 100644
--- a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.EventProcessorLambda/MinimalLambda.Testing.UnitTests.EventProcessorLambda.csproj
+++ b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.EventProcessorLambda/MinimalLambda.Testing.UnitTests.EventProcessorLambda.csproj
@@ -2,7 +2,7 @@
Exe
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.NoEventLambda/MinimalLambda.Testing.UnitTests.NoEventLambda.csproj b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.NoEventLambda/MinimalLambda.Testing.UnitTests.NoEventLambda.csproj
index 12c43e23..bcf1c46d 100644
--- a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.NoEventLambda/MinimalLambda.Testing.UnitTests.NoEventLambda.csproj
+++ b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.NoEventLambda/MinimalLambda.Testing.UnitTests.NoEventLambda.csproj
@@ -2,7 +2,7 @@
Exe
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.NoResponseLambda/MinimalLambda.Testing.UnitTests.NoResponseLambda.csproj b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.NoResponseLambda/MinimalLambda.Testing.UnitTests.NoResponseLambda.csproj
index 12c43e23..bcf1c46d 100644
--- a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.NoResponseLambda/MinimalLambda.Testing.UnitTests.NoResponseLambda.csproj
+++ b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.NoResponseLambda/MinimalLambda.Testing.UnitTests.NoResponseLambda.csproj
@@ -2,7 +2,7 @@
Exe
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.SimpleLambda/MinimalLambda.Testing.UnitTests.SimpleLambda.csproj b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.SimpleLambda/MinimalLambda.Testing.UnitTests.SimpleLambda.csproj
index 12c43e23..bcf1c46d 100644
--- a/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.SimpleLambda/MinimalLambda.Testing.UnitTests.SimpleLambda.csproj
+++ b/tests/MinimalLambda.Testing.UnitTests/Lambdas/MinimalLambda.Testing.UnitTests.SimpleLambda/MinimalLambda.Testing.UnitTests.SimpleLambda.csproj
@@ -2,7 +2,7 @@
Exe
net8.0;net9.0;net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/tests/MinimalLambda.UnitTests/Core/Features/DefaultFeatureCollectionTests.cs b/tests/MinimalLambda.UnitTests/Core/Features/DefaultFeatureCollectionTests.cs
index d666f54e..38bab219 100644
--- a/tests/MinimalLambda.UnitTests/Core/Features/DefaultFeatureCollectionTests.cs
+++ b/tests/MinimalLambda.UnitTests/Core/Features/DefaultFeatureCollectionTests.cs
@@ -349,6 +349,25 @@ public void Get_WithDifferentTypeReturnsCorrectInstance()
#endregion
+ [Fact]
+ public void Get_WhenProviderSetsFeature_PreservesAlreadyStoredFeature()
+ {
+ var provider = Substitute.For();
+ var collection = new DefaultFeatureCollection([provider]);
+ provider
+ .TryCreate(typeof(string), out _)
+ .Returns(call =>
+ {
+ collection.Set("stored");
+ call[1] = "created";
+ return true;
+ });
+
+ collection.Get().Should().Be("stored");
+ collection.Get().Should().Be("stored");
+ provider.Received(1).TryCreate(typeof(string), out _);
+ }
+
#region Enumeration Tests
[Fact]
diff --git a/tests/MinimalLambda.UnitTests/Core/Features/InvocationDataFeatureTests.cs b/tests/MinimalLambda.UnitTests/Core/Features/InvocationDataFeatureTests.cs
index 690085ed..aa3d5a30 100644
--- a/tests/MinimalLambda.UnitTests/Core/Features/InvocationDataFeatureTests.cs
+++ b/tests/MinimalLambda.UnitTests/Core/Features/InvocationDataFeatureTests.cs
@@ -5,6 +5,71 @@ namespace MinimalLambda.UnitTests.Core.Features;
[TestSubject(typeof(InvocationDataFeature))]
public class InvocationDataFeatureTests
{
+ [Fact]
+ public void ResponseStream_WhenReadRepeatedly_ReturnsSameWritableStream()
+ {
+ using var feature = new InvocationDataFeature { EventStream = Stream.Null };
+ using var stream = feature.ResponseStream;
+
+ stream.WriteByte(42);
+
+ feature.ResponseStream.Should().BeSameAs(stream);
+ stream.Position = 0;
+ stream.ReadByte().Should().Be(42);
+ }
+
+ [Fact]
+ public async Task ResponseStream_WhenFirstReadConcurrently_ReturnsSameStreamToAllReaders()
+ {
+ const int readerCount = 8;
+ const int roundCount = 128;
+ var features =
+ Enumerable
+ .Range(0, roundCount)
+ .Select(_ => new InvocationDataFeature { EventStream = Stream.Null })
+ .ToArray();
+ var streams = new Stream[roundCount, readerCount];
+ using var barrier = new Barrier(readerCount);
+
+ var readers = Enumerable
+ .Range(0, readerCount)
+ .Select(reader => Task.Factory.StartNew(
+ () =>
+ {
+ for (var round = 0; round < roundCount; round++)
+ {
+ barrier.SignalAndWait();
+ streams[round, reader] = features[round].ResponseStream;
+ }
+ },
+ CancellationToken.None,
+ TaskCreationOptions.LongRunning,
+ TaskScheduler.Default));
+
+ await Task.WhenAll(readers);
+
+ for (var round = 0; round < roundCount; round++)
+ {
+ using var feature = features[round];
+ using var stream = feature.ResponseStream;
+ for (var reader = 0; reader < readerCount; reader++)
+ streams[round, reader].Should().BeSameAs(stream);
+ }
+ }
+
+ [Fact]
+ public void ResponseStream_WhenReplacedBeforeFirstRead_PreservesReplacementAfterDisposal()
+ {
+ using var response = new MemoryStream();
+ var feature =
+ new InvocationDataFeature { EventStream = Stream.Null, ResponseStream = response };
+
+ feature.Dispose();
+
+ feature.ResponseStream.Should().BeSameAs(response);
+ response.CanWrite.Should().BeTrue();
+ }
+
[Fact]
public void EnableBuffering_WhenEventStreamAlreadySeekable_DoesNotReplaceStream()
{
diff --git a/tests/package-compatibility/AotConsumer/AotConsumer.csproj b/tests/package-compatibility/AotConsumer/AotConsumer.csproj
index 1b53a496..e2795557 100644
--- a/tests/package-compatibility/AotConsumer/AotConsumer.csproj
+++ b/tests/package-compatibility/AotConsumer/AotConsumer.csproj
@@ -2,7 +2,7 @@
Exe
net10.0
- preview
+ 15.0
enable
enable
true
@@ -17,6 +17,6 @@
Condition="'$(CorePackageVersion)' != ''" />
-
+
\ No newline at end of file
diff --git a/tests/package-compatibility/CoreOnlyConsumer/CoreOnlyConsumer.csproj b/tests/package-compatibility/CoreOnlyConsumer/CoreOnlyConsumer.csproj
index 3a7a91cf..1f7850e6 100644
--- a/tests/package-compatibility/CoreOnlyConsumer/CoreOnlyConsumer.csproj
+++ b/tests/package-compatibility/CoreOnlyConsumer/CoreOnlyConsumer.csproj
@@ -1 +1 @@
-net10.0Exepreviewenableenabletrue
\ No newline at end of file
+net10.0Exe15.0enableenabletrue
\ No newline at end of file
diff --git a/tests/package-compatibility/EventProcessorConsumer/EventProcessorConsumer.csproj b/tests/package-compatibility/EventProcessorConsumer/EventProcessorConsumer.csproj
index 21ec3e94..56306e35 100644
--- a/tests/package-compatibility/EventProcessorConsumer/EventProcessorConsumer.csproj
+++ b/tests/package-compatibility/EventProcessorConsumer/EventProcessorConsumer.csproj
@@ -3,7 +3,7 @@
$(CorePackageVersion)
Exe
net8.0;net9.0;net10.0;net11.0
- preview
+ 15.0
enable
enable
true
diff --git a/tests/package-compatibility/InvalidSignatureConsumer/InvalidSignatureConsumer.csproj b/tests/package-compatibility/InvalidSignatureConsumer/InvalidSignatureConsumer.csproj
index 0d237b64..0eeb2b3d 100644
--- a/tests/package-compatibility/InvalidSignatureConsumer/InvalidSignatureConsumer.csproj
+++ b/tests/package-compatibility/InvalidSignatureConsumer/InvalidSignatureConsumer.csproj
@@ -2,7 +2,7 @@
Exe
net10.0
- preview
+ 15.0
enable
enable
true
@@ -13,6 +13,6 @@
Condition="'$(CorePackageVersion)' != ''" />
-
+
\ No newline at end of file
diff --git a/tests/package-compatibility/OldCoreConsumer/OldCoreConsumer.csproj b/tests/package-compatibility/OldCoreConsumer/OldCoreConsumer.csproj
index f6f6d092..12d92e8e 100644
--- a/tests/package-compatibility/OldCoreConsumer/OldCoreConsumer.csproj
+++ b/tests/package-compatibility/OldCoreConsumer/OldCoreConsumer.csproj
@@ -12,6 +12,6 @@
Condition="'$(CorePackageVersion)' != ''" />
-
+
\ No newline at end of file
diff --git a/tests/package-compatibility/TaskConsumer/TaskConsumer.csproj b/tests/package-compatibility/TaskConsumer/TaskConsumer.csproj
index edb11aac..0149b1ea 100644
--- a/tests/package-compatibility/TaskConsumer/TaskConsumer.csproj
+++ b/tests/package-compatibility/TaskConsumer/TaskConsumer.csproj
@@ -2,7 +2,7 @@
Exe
net10.0
- preview
+ 15.0
enable
enable
true
diff --git a/tests/package-compatibility/TypedConsumer/TypedConsumer.csproj b/tests/package-compatibility/TypedConsumer/TypedConsumer.csproj
index 146690be..1ab2e8f0 100644
--- a/tests/package-compatibility/TypedConsumer/TypedConsumer.csproj
+++ b/tests/package-compatibility/TypedConsumer/TypedConsumer.csproj
@@ -2,7 +2,7 @@
Exe
net10.0
- preview
+ 15.0
enable
enable
true
@@ -13,7 +13,7 @@
Condition="'$(CorePackageVersion)' != ''" />
-
+
\ No newline at end of file