Skip to content

ADR-0103: Package upgrade and warning policy

Field Value
Status Accepted
Date 2026-11-24 (decided), 2026-11-30 (written)
Deciders ConnectSoft Architecture Team (owner decision of 2026-11-24)
Supersedes -

Context

ADR-0102 fixed the target frameworks, the package version shapes and the first package holds of the .NET 11 wave. A second question remained: how far package pins are upgraded, what happens to the warnings that newer packages and analyzers report, and which behaviour an upgrade is allowed to change.

The owner decided the policy on 2026-11-24. It was applied in gates U1 to U9 between 2026-11-24 and 2026-11-30.

The order in which repositories move is explained in Upgrade order and promotion levels.

Decision

1. Upgrade scope

  1. Every outdated pin is upgraded: patch, minor and major versions. The only exceptions are the holds in section 8.
  2. Versions live in Directory.Packages.props.
  3. Internal ConnectSoft and DerechHaLev pins follow the versions that were just promoted.

2. Order and promotion

Levels are upgraded in dependency order. The owner commits and promotes each level before the next level starts.

3. Warnings: fix, do not silence

  1. Analyzer and test tooling pins are upgraded first.
  2. Warnings are then fixed in code, in the same gate as the package upgrade.
  3. Warnings are fixed, not silenced. A suppression is allowed only with a written reason, where the fix that the rule asks for would be wrong.

4. Exceptions for Orleans grain code and UI code

Orleans grain code (hard exception). ConfigureAwait(false) is never added in grain code, because the continuation leaves the activation scheduler.

  • CA2007, MA0004 and VSTHRD111 in grain code get a class-level pragma with the reason.
  • Blocking calls that are reachable from grains are listed. They are not rewritten in bulk.
  • The gate includes a diff check: the number of ConfigureAwait calls added in grain files must be 0.

UI code (Blazor and MAUI). ConfigureAwait(false) is never used in components, view models or code that touches UI state.

5. Behaviour does not change

An upgrade gate does not change:

  • database migrations (comments only),
  • ORM mappings,
  • service and messaging contracts,
  • public API,
  • logging text,
  • authorization.

A rule whose fix would require such a change is left visible and reported. Typical cases are public collection shapes, value-object deserialization (S5766), in-network HTTP (S5332), long methods in migrations and analyzer crashes (AD0001).

6. NU1510 and security pins

  1. For NU1510, remove the direct PackageReference that the shared framework supplies, and keep the PackageVersion line.
  2. A security pin is removed only when the framework supplies the assembly and nothing resolves a lower version.

One related trap applies to code changes: adding #nullable enable annotations to a file with HTTP request binding makes MVC require those values. In a project with nullable reference types disabled, remove the ? instead.

7. Verification per gate

Every gate verifies:

  1. restore without cache,
  2. a Release build of all target frameworks,
  3. a warning recount against the baseline,
  4. unit and architecture tests,
  5. NHibernate mapping XML and public API compared before and after, where code moved,
  6. a vulnerability audit,
  7. git status and line endings.

Tests that open a database are left out unless the owner permits them, and databases are never touched unasked. Acceptance, database, end-to-end and deployment runs stay with the owner and CI.

8. Accepted majors and package holds

The majors accepted in this wave include Serilog.* 11, Npgsql 11 and Scalar.AspNetCore 3.x.

The holds below are not upgraded. The planner of the level upgrade reads them from .ai/skills/connectsoft-extensions-level-upgrade/exclusions.json in ConnectSoft.AI.AgentKit, except for the last row, which this record adds. A hold stops the upgrade from proposing a newer version. It does not state that every repository already uses the listed version. A hold is revisited only when its reason is resolved.

Package Held at Reason
AutoMapper 17.0.0 where the licence is wired Commercial licence from v15. A major is never crossed without licence wiring; repositories without the wiring stay on their current major.
Microsoft.OpenApi 2.7.5 Swashbuckle 11 requires OpenApi 3.x, and ServiceModel.Grpc.AspNetCore.Swashbuckle 1.26.0 throws MissingMethodException against OpenApi 3, so gRPC Swagger would return HTTP 500.
Swashbuckle.AspNetCore* 10.3.1 Swashbuckle 11 needs Microsoft.OpenApi 3.x, which is held. All Swashbuckle.AspNetCore.* packages move together.
IdentityModel 5.2.0 Owner decision for the .NET 11 wave.
KubernetesClient 17.0.14 Owner decision for the .NET 11 wave: the estate uses HealthChecks.UI 9, which this version line supports.
SixLabors.ImageSharp 3.1.12 3.2 and later need a commercial licence key.
Asyncify 0.9.7 Version-sort trap: the feed also lists 0.9.5707.38527, which sorts higher although it is older. That proposal is never accepted.
JsonSchema.Net 8.0.5 9.x introduced an open source maintenance fee whose terms are not stated on nuget.org. Held until the licence is checked.
Hl7.Fhir.R4B 5.12.2 6.x is a large breaking change. Held until a dedicated migration task.
Verify.* Per repository (Verify.MSTest 31.x, Verify.DiffPlex 3.1.2 to 3.3.0) Newer Verify brings a SponsorCheck (SC021) that fails the build without a licence property. The sponsorship or licence decision is the owner's.
MassTransit* 9.2.6 Commercial licence (MT_LICENSE) in MassTransit 9.x. Newer versions are not proposed.
FluentAssertions 7.2.2 v8 is commercially licensed. Repositories already on 8.11.0 are a separate licence decision.
Microsoft.Data.SqlClient 7.1.2 8.0.0, released 2026-11-26, changes connection pool and connect timeout behaviour.
Microsoft.ApplicationInsights.AspNetCore (ConnectSoft.MarketingSite only) 2.x Stays on the 2.x line in that repository.

The same file holds two rules that the planner enforces:

  • Previews follow only their own label. A stable pin never moves to a prerelease. A prerelease pin moves only to a newer version with the same label; any other move is a human decision.
  • Per-TFM lines stay inside their major. Where a package has two inline per-TFM PackageVersion lines, each line moves only inside its own major.

Alternatives considered

Option Outcome
Suppress new analyzer warnings instead of fixing them Rejected. A suppression needs a written reason and is allowed only where the fix would be wrong.
Add ConfigureAwait(false) in grain code to satisfy the analyzers Rejected. The continuation leaves the activation scheduler.
Change contracts, mappings or public API to satisfy a rule Rejected. Behaviour does not change; the rule stays visible and is reported.
Take Microsoft.Data.SqlClient 8.0.0 in this wave Held because it changes connection pool and connect timeout behaviour.

Consequences

  • A level cannot start until the owner has committed and promoted the level before it.
  • Some warnings stay visible by design, because their fix would change behaviour. They are reported, not hidden.
  • Every suppression has a written reason, so a reviewer can challenge it.
  • A passed gate does not cover acceptance, database, end-to-end or deployment behaviour. Those runs stay with the owner and CI.
  • Blocking calls reachable from grains remain listed work.
  • The holds are explicit exceptions that must be revisited when their reasons are resolved.