Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
19eb1c3
docs: decision 129, Metalama 2027.0 moves into 2.4.0
CaffeinatedCoder Oct 31, 2026
0f89b27
build: the Generators package on Metalama 2027.0.9-preview, as 2.4.0-…
CaffeinatedCoder Nov 28, 2026
0526fba
Merge remote-tracking branch 'origin/docs/metalama-2027-in-2-4-0' int…
CaffeinatedCoder Nov 28, 2026
14e4afd
docs: decision 130, 2.4.0 is published as previews on the current Met…
CaffeinatedCoder Nov 28, 2026
af3e1eb
build: global.json pins the .NET 11 SDK, band 11.0.1xx (decision 131)
CaffeinatedCoder Nov 28, 2026
a91f04d
fix: the EF Core package runs on EF Core 11, with a net11.0 asset bui…
CaffeinatedCoder Nov 28, 2026
43a263a
fix: the ASP.NET Core package's OpenAPI document is written on Micros…
CaffeinatedCoder Nov 28, 2026
9d08d23
docs: the agent guide names Microsoft.AspNetCore.OpenApi 11 beside 10
CaffeinatedCoder Nov 28, 2026
d4eb5c7
build: the docs workflow publishes a multi-targeted package for net10.0
CaffeinatedCoder Nov 28, 2026
78d8947
test: no provider's query context takes EF's service-provider count f…
CaffeinatedCoder Nov 28, 2026
5ba1b19
fix: on ASP.NET Core 11 a nullable value object's schema holds its nu…
CaffeinatedCoder Nov 28, 2026
35d906e
test: the ASP.NET Core tests answer for ASP.NET Core 11's own changes…
CaffeinatedCoder Nov 28, 2026
72f1c33
test: the EF Core tests answer for what EF Core 11 translates, with a…
CaffeinatedCoder Nov 28, 2026
8a1ea83
docs: the EF Core README says which SQL its comments show
CaffeinatedCoder Nov 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,12 @@ jobs:

# The API pages are read from published assemblies, which carry the XML docs and every dependency DocFX needs
# to resolve a signature. The packages are the ones site/docfx.json names, so the two cannot disagree.
# A package with a net11.0 asset beside net10.0 is published for net10.0: a publish names one target
# (NETSDK1129), and net10.0 is the surface every target has (decision 120, rule 2).
- name: Publish the run-time packages
run: |
for assembly in $(jq -r '.metadata[].src[].files[]' site/docfx.json); do
dotnet publish "src/${assembly%.dll}" -c Release -o site/obj/pub
dotnet publish "src/${assembly%.dll}" -c Release -f net10.0 -o site/obj/pub
done

- name: Build the site, warnings as errors
Expand Down
7 changes: 4 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ decision with its evidence, and a design note per area.
This file is the canonical agent guide. There is no CLAUDE.md, on purpose.

## Stack
.NET 10 · C# 14 · Metalama 2026.1 (compile-time generation; no 2027.0-only API such as
`[Durable]`) · Roslyn analyzers (netstandard2.0) · EF Core 10 · Microsoft.AspNetCore.OpenApi 10
.NET 10 and 11 (SDK 11) · C# 14 · Metalama 2027.0, a preview until it is stable (compile-time generation;
[decision 130](design/adr/0130-2-4-0-is-published-as-previews-on-the-current-metalama-2027-preview.md)) · Roslyn
analyzers (netstandard2.0) · EF Core 10 and 11 · Microsoft.AspNetCore.OpenApi 10 and 11

## Packages
| Package | Role |
Expand Down Expand Up @@ -85,7 +86,7 @@ session's own checkout ([decision 105](design/adr/0105-every-tool-is-built-in-th
A tool built from other sources refuses to run and names the command that rebuilds it,
`dotnet build tools/<Name> -c Release`.

The SDK is pinned in `global.json` (10.0.4xx band, `latestPatch`). Tests run on Microsoft Testing
The SDK is pinned in `global.json` (11.0.1xx band, `latestPatch`). Tests run on Microsoft Testing
Platform (xunit.v3 4.x), so `dotnet test` takes `--solution`/`--project`, and TRX output is
`--report-xunit-trx`. The build treats warnings as errors, including CS1591 on shipping projects, and
runs the CMTK analyzers on the shipping projects' own code (`src/Directory.Build.targets`), so a library
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A version's heading reads `## <version> — Unreleased` until the release is pre
the release date. The release workflow refuses a tag whose section still says `Unreleased`, and the
section is the GitHub release's notes.

## 2.4.0 — Unreleased
## 2.4.0-preview.1 — Unreleased

### Added

Expand All @@ -20,13 +20,18 @@ section is the GitHub release's notes.

### Changed

- Generators: the package requires Metalama 2027.0, a preview until Metalama releases it (`2027.0.9-preview`), where 2.3.x requires 2026.1.30. So 2.4.0 is a preview until then, and isn't for production. A project that references `Metalama.Framework` 2026.1 itself fails to restore with NU1605: raise that reference, or stay on 2.3.x.
- EF Core: the package has a `net11.0` asset that requires `Microsoft.EntityFrameworkCore.Relational` 11.0.0, where `net10.0` still requires 10.0.12. A `net11.0` project that references EF Core 10 itself fails to restore with NU1605: raise that reference, or stay on 2.3.x with EF Core 10. On EF Core 11, SQL Server's HiLo isn't chosen for a key over `ulong` until you clear the generator factory on it ([Keys](https://github.com/CaffeinatedCoder/CodoMetis.TypeKit/blob/main/src/CodoMetis.TypeKit.EntityFrameworkCore/README.md#keys)).
- ASP.NET Core: the package has a `net11.0` asset that requires `Microsoft.AspNetCore.OpenApi` 11.0.0, where `net10.0` still requires 10.0.12. A `net11.0` project that references the 10 line itself fails to restore with NU1605: raise that reference, or stay on 2.3.x with the 10 line.
- Packages: the public surface is checked against 2.3.1's, so nothing 2.3.1 ships is removed or changed in 2.4.0.
- Analyzers: CMTK0005 now also warns at `CollectionsMarshal.SetCount(ids, count)` on a `List<OrderId>`, which makes room for `count` items without putting one there, as `new OrderId[count]` does; a constant count of zero isn't reported. In a build that treats warnings as errors, that can report code that built before ([CMTK0005](https://github.com/CaffeinatedCoder/CodoMetis.TypeKit/blob/main/src/CodoMetis.TypeKit.Analyzers/README.md#cmtk0005)).

- Generators: a property, field or nested type you wrote with the name of a generated member, on the value object, a closed set or a base of either, such as `public static int Parse => 1`, now fails with CMTK1011 naming it, where it failed with a Metalama error (LAMA0506, LAMA0531) that named nothing you wrote. So does a closed set's own method named as a generated property, such as `Name()` ([Write your own members](https://github.com/CaffeinatedCoder/CodoMetis.TypeKit/blob/main/src/CodoMetis.TypeKit.Generators/README.md#write-your-own-members)).

### Fixed

- EF Core: on EF Core 11 the package threw `MissingMethodException` for the first value object EF mapped, because EF Core 11 removed a constructor it called. The `net11.0` asset is built against EF Core 11, and there a default key over `ulong` gets its temporary value in a `--nativeaot` compiled model and with `ValueObjectConverter` named by hand too ([#285](https://github.com/CaffeinatedCoder/CodoMetis.TypeKit/issues/285)).
- ASP.NET Core: with `Microsoft.AspNetCore.OpenApi` 11 the OpenAPI document answered 500, a `MissingMethodException` from the fault responses, because `Microsoft.OpenApi` 3 changed the type of a response's content. The `net11.0` asset is built against it ([#286](https://github.com/CaffeinatedCoder/CodoMetis.TypeKit/issues/286)).
- Generators: an overload that differs from a generated member only by a nullable value type, such as a base record's `TryFrom(int?)` over an `int` or a closed set's `Parse(string, bool?)`, a base record's method named as a generated property, such as `MinValue()`, and an overload of a private entry point are kept beside the generated member, where the build failed with CMTK1011 ([Write your own members](https://github.com/CaffeinatedCoder/CodoMetis.TypeKit/blob/main/src/CodoMetis.TypeKit.Generators/README.md#write-your-own-members)).
- EF Core: a query that uses an arithmetic or bitwise operator a value object declares by hand, `&&` and `||` included, throws, naming the value object, where the database ran its own arithmetic and skipped the operator; a query filter fails when the model is built ([Queries](https://github.com/CaffeinatedCoder/CodoMetis.TypeKit/blob/main/src/CodoMetis.TypeKit.EntityFrameworkCore/README.md#queries)).

Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>2.4.0</Version>
<Version>2.4.0-preview.1</Version>
<Authors>CaffeinatedCoder</Authors>
<Copyright>Copyright (c) 2026 CaffeinatedCoder</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
22 changes: 20 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
one is a release decision, not a dependency update.
-->
<ItemGroup>
<!-- Latest stable YYYY.N: MIT maintenance covers only the latest line (design/adr/0004-metalama-2026-1-x-latest-stable.md). -->
<PackageVersion Include="Metalama.Framework" Version="2026.1.30" />
<!-- 2.4.0 and its previews build on the current Metalama 2027.0 preview, and v2.4.0 is tagged only on a stable 2027.0 (issues 173 and 284). -->
<PackageVersion Include="Metalama.Framework" Version="2027.0.9-preview" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.12" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="10.0.12" />
<!--
Expand Down Expand Up @@ -73,6 +73,24 @@
-->
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="9.0.21" />
</ItemGroup>
<!--
The net11.0 assets and test runs (decision 120): the satellites require the 11 line of what they integrate
with, and their tests run on it. A higher floor on one target is named in the changelog's "Changed".
-->
<ItemGroup Condition="'$(TargetFramework)' == 'net11.0'">
<PackageVersion Update="Microsoft.EntityFrameworkCore.Relational" Version="11.0.0" />
<PackageVersion Update="Microsoft.AspNetCore.OpenApi" Version="11.0.0" />
<PackageVersion Update="Microsoft.AspNetCore.TestHost" Version="11.0.0" />
<PackageVersion Update="Microsoft.EntityFrameworkCore.Sqlite" Version="11.0.0" />
<PackageVersion Update="Microsoft.EntityFrameworkCore.Design" Version="11.0.0" />
<PackageVersion Update="Npgsql.EntityFrameworkCore.PostgreSQL" Version="11.0.0" />
<PackageVersion Update="Microsoft.EntityFrameworkCore.SqlServer" Version="11.0.0" />
<!-- Test-only on this target: Microsoft.EntityFrameworkCore.Design 11.0.0 requires Roslyn 5.9.0 exactly (NU1107 beside 5.0.0). The analyzers are netstandard2.0 and keep their floor. -->
<PackageVersion Update="Microsoft.CodeAnalysis.CSharp" Version="5.9.0" />
<PackageVersion Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.9.0" />
<!-- Test-only: SQL Server's provider 11.0.0 asks for 10.0.13 or later, and the 9.0.21 pin above would be a downgrade (NU1605). -->
<PackageVersion Update="System.Security.Cryptography.Pkcs" Version="10.0.13" />
</ItemGroup>
<!-- Benchmarks only (benchmarks/), never a shipping or test dependency. -->
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
Expand Down
77 changes: 77 additions & 0 deletions design/adr/0129-metalama-2027-0-moves-into-2-4-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# 0129. Metalama 2027.0 moves into 2.4.0, so a consumer with only the .NET 11 SDK builds

Date: 2026-10-31
Status: accepted

Context: 2026-10-31, issue #280; replaces the timing in
[decision 120](0120-a-net11-0-target-and-documented-floor-raises-join-a-minor.md)'s Metalama paragraph ("2.3 and 2.4
stay on 2026.1, and 2.5.0 moves both targets to 2027.0"). Decision 120 named the cost of holding 2026.1 on SDK 11 as
LAMA0617, "a warning, falling back to the SDK 10 Razor compiler". The RC3 spike (`spikes/Sdk11Rc3Metalama`,
[KB-060](../knowledge/KB-060-metalama-2026-1-on-the-net-11-sdk.md)) found that the fallback exists only when an SDK 10
is installed beside SDK 11: without one, a web project with the Generators package fails with LAMA0625 (#275). The
maintainer decided, in these words: "I want a 2.4.0 that compiles at every .NET11-consumer, even when he has only
.NET 11 SDK installed. If this doesn't work with Metalama 2026, then we need to take a straight decision", and
accepted the proposal below the same day.

## Decision

**The Generators package moves to Metalama 2027.0 in 2.4.0, for the `net10.0` and `net11.0` assets alike.** Every
other rule of decision 120 stands: one Metalama version for every target, the floor raise documented under its
first rule, and the five conditions of its Metalama paragraph, which are now 2.4.0's. Where decision 120 says 2.5.0
of the move, read 2.4.0, and where it says the 2.4.x line, read 2.3.x.

**2.4.0 is tagged only on a stable Metalama 2027.0.** A stable package does not depend on a prerelease (NU5104,
an error under this repository's warnings as errors), so 2.4.0's date is Metalama's: 2027.0 is planned for
2027-01-01 in Metalama's internal documents (#173), with no public date on 2026-10-31. A fix a consumer needs before
then ships as a 2.3.x patch.

**One condition is added: a build with only SDK 11 installed.** CI and the consumer smoke test get a lane whose
.NET installation holds SDK 11 and nothing else, with a web consumer (`Microsoft.NET.Sdk.Web`) on the packages,
because that is the case Metalama 2026.1 fails and the one a machine with SDK 10 beside it never shows. It runs on
the general availability SDK before the tag (#281).

**2.3.x is the line below the ceiling.** A project that needs Metalama 2026 stays on 2.3.x. On a machine with only
SDK 11, its web projects need SDK 10 installed beside SDK 11, or a direct `Metalama.Framework` 2027 reference beside
the 2.3.x packages, which weaves (KB-060, decision 120); #275 says so, and 2.4.0's changelog names both.

Refused:

- **Staying on 2026.1 in 2.4.0 and documenting SDK 10 beside SDK 11.** It fails the requirement, on `net10.0` as on
`net11.0`: the Razor compiler is the SDK's, whatever the target (KB-060).
- **A 2.4.0 without `net11.0`, on 2026.1.** The same: a `net10.0` web project fails on SDK 11 alone.
- **A 2.4.0 on 2027.0-preview.** A stable package on a prerelease dependency (above).
- **Waiting for a 2026.1 patch that supports SDK 11's Roslyn.** Not in this repository's hands, and 2026.1.31
(compiler 2026.1.21) still fails.

## Evidence

[KB-060](../knowledge/KB-060-metalama-2026-1-on-the-net-11-sdk.md), measured 2026-10-31 on macOS arm64 with the
published 2.3.1 packages:

| Web project | Metalama 2026.1 | Metalama 2027.0.5-preview |
|---|---|---|
| SDK 11 RC3 alone, `net11.0` | LAMA0625 (2026.1.31 too) | builds |
| SDK 11 RC3 alone, `net10.0` | LAMA0625 | builds |
| SDK 11 RC1 alone | LAMA0625 | builds |
| SDK 11 RC3 with SDK 10.0.403 beside it | builds, LAMA0617 twice | builds |
| SDK 10.0.403, `net10.0` | builds | builds |

A console project builds on 2026.1 in every case, so the failure is the web SDK's Razor compiler, which needs Roslyn
5.11 (RC1) or 5.12 (RC3) where Metalama 2026.1 bundles 5.9. With 2027, one project on `net10.0;net11.0` and no
`LangVersion` compiles `net10.0` at C# 14.0 and `net11.0` at 15.0, the value object is generated on both, and a union
under `#if NET11_0_OR_GREATER` or in a file removed from `net10.0` builds on both targets. This machine has a Metalama
license entry for 2027.0, so these runs say nothing about a build without one; decision 120's clean-container run of
2027.0.4-preview did, and the CI condition stays.

## Consequences

- The roadmap's Metalama item moves to 2.4.0. #173 (the move), #272 (a union over value objects in a woven project)
and #223 (what the generators do with a union or a `closed` class) move from the 2.5.0 epic to the 2.4.0 epic:
the release that makes a woven project compile those shapes defines what they do, since a value object over a union
that compiles with no defined answer is the silent failure this repository refuses. 2.5.0 keeps what 2027.0 offers
beyond that: AspectTesting on xunit.v3 (#220), the aspect-author analyzers (#221), type facets (#222) and the
platform requirement (#224).
- Decision 120's rule 2 sentence "until 2.5.0 a union member reaches the consumers without the Generators package"
ends at 2.4.0: from 2.4.0 a woven `net11.0` project compiles at C# 15, so #209 and #210 reach every consumer.
- #275 closes when 2.4.0 ships on 2027.0; #281 is the lane.
- Decision 120's status and index row name this record.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 0130. 2.4.0 is published as `2.4.0-preview.N` on the current Metalama 2027 preview, until Metalama 2027.0 is stable

Date: 2026-11-28
Status: accepted

Context: 2026-11-28, issue #284; amends [decision 129](0129-metalama-2027-0-moves-into-2-4-0.md), which tags 2.4.0
only on a stable Metalama 2027.0 and refused "a 2.4.0 on 2027.0-preview" because a stable package does not depend
on a prerelease. .NET 11 has been generally available since 2026-11-10 and Metalama 2027.0 is still a preview
(`2027.0.9-preview` on 2026-11-28, the stable planned for 2027-01-01). Until it ships, nothing on `release/2.4.0`
reaches a consumer, and two shipped packages fail on the 11 line (#285, #286). The maintainer decided on
2026-11-11 that 2.4.0 is published as previews meanwhile (#284), and on 2026-11-28, in these words: "Base all 2.4.0
versions and their previews on current Metalama 2027, keep 2.4.0 preview until Metalama releases GA".

## Decision

**Every 2.4.0 version is built on the current Metalama 2027 preview, and is itself a preview until Metalama 2027.0
is stable.** `Directory.Packages.props` names the newest `2027.0.N-preview` the suite and the smoke test ran on, and
`Version` is `2.4.0-preview.N`. A prerelease package may depend on a prerelease: NU5104 is about stable packages
only, and it is what fails the pack if `Version` is set to `2.4.0` too early (measured below).

**Decision 129's rule for the stable tag is unchanged.** `v2.4.0` is tagged only on a stable Metalama 2027.0, and
its five conditions hold for that tag.

**A new Metalama preview is taken by a change of its own.** It moves the pin, runs the suite and the smoke test on
it, and names what the new compiler asked for. A TypeKit preview is published on a Metalama preview only after
that.

**One changelog section per published version.** `CHANGELOG.md` has a `## 2.4.0-preview.N` section for each
preview, which is its release notes as for any version. The `## 2.4.0` section, written when the stable is
prepared, holds everything since 2.3.1, so a consumer of stable versions reads one section.

**What a preview promises is written where it is installed from.** The Generators README and each preview's
release notes say that it depends on a Metalama preview and is not for production, and that 2.3.x is the stable
line until `v2.4.0`.

**Conditions before `2.4.0-preview.1` is published** (issue #284, unchanged): a build with no Metalama licence
passes in CI on the Metalama preview; the lane with only SDK 11 installed builds a web consumer (#281); each
target is run, not assumed (#208); the release workflow has a prerelease path that publishes what CI packed
(#247). If a Metalama preview needs a licence or stops working at a date, the record of that preview says so and
the README names it, or no preview is published.

## Evidence

Measured 2026-11-28 on macOS arm64, SDK 10.0.404, `release/2.4.0` at 020e48c:

- With `Metalama.Framework` 2027.0.9-preview (compiler 2027.0.6-preview) the solution builds after one kind of
change: LAMA0891, a static member of a compile-time type that is not immutable, on two lookup tables of the
aspects, which became `ImmutableArray`. The `[Durable]` attribute #173 expected on the value placeholder is not
asked for: the build passes under warnings as errors without it.
- The suite: 36119 passed of 37480, 1252 skipped. All 109 failures were the pack of the Generators package under
`Version` 2.4.0: "NU5104: A stable release of a package should not have a prerelease dependency".
- With `Version` 2.4.0-preview.1 and the changelog section renamed to it, the conventions pass (2089), the pack
and package validation against 2.3.1 included.

Not measured here: a build with no Metalama licence (this machine holds one; CI has none), the IDEs, and the
consumer matrix of decision 120.

## Consequences

- #173 is done on the preview and stays open for the stable: its conditions are the tag's.
- The first publish is `2.4.0-preview.1`, which is also the first with two targets (#208).
- [The roadmap](../roadmap.md)'s Metalama item names this record beside decision 129.
Loading
Loading