Repository navigation
feat(csharp-ci): fail when a packable net10.0 target resolves Microsoft.Extensions or AspNetCore 11 - #53
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68d6c100bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ble casing, report the checked count
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16c31278fc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
csharp-ci.yamlgains aGuard net10.0 package majorsstep betweenRestoreandBuild. It fails the shard when a packable project with anet10.0target resolves aMicrosoft.Extensions.*orMicrosoft.AspNetCore.*package at major 11 or later, directly or transitively. Anet10.0library that requires the 11.x line drags its consumers off 10.x while CI stays green.net10-package-exceptions(package@majorpairs, default empty). It reaches the script only through the environment and is validated before anything runs.net10.0target resolves 11.x goes red until it pins the package to 10.x or lists an exception.Two gaps found in an earlier version of this guard are fixed and covered by fixtures:
TargetFrameworkswith spaces, newlines or other casing (netstandard2.0; net10.0) was skipped silently. Whitespace is now removed and the match is case-insensitive.jqanddotnetprint CRLF, sopackablebecametrue\rand the shard checked nothing. Every captured value now goes throughtr -d '\r'.jqis installed on the self-hosted Hetzner runners (base package list) and on the GitHub-hosted images; the script fails with exit 3 and a clear error whenjqordotnetis missing.Type of change
Evidence
TargetFrameworks with a space after the semicolon exits 1: expected [1] got [0],TargetFrameworks spread over several lines,net10.0 spelled in upper case,jq and dotnet emitting CRLF still exit 1 on an offenderall FAIL.After:
bash test/guard-net10-package-majors_test.shprints 50ok, 0 FAIL, exit 0.actionlintclean,shellcheckclean.net10.0;net11.0, Serilog.AspNetCore split per TFM), run afterdotnet restore:test net10.0 package guardjob inbuild-and-test.yamlruns the fixture test on Ubuntu, macOS, Windows and Windows ARM.Test plan
csharp-ci.yamlon the self-hosted pool and onwindows-11-armis not exercised by this repo's CI (it never callscsharp-ci.yaml)Checklist
[Unreleased]entry inCHANGELOG.mdMerge Danger
Door: two-way. Reverting the commit removes the step and the input.
Blast Radius: every
csharp-ci.yamlcaller on a floating tag. The guard is on by default: a caller whose packablenet10.0target resolves 11.x goes red on its next run until it pins 10.x or setsnet10-package-exceptions. Callers with no such package see no change except an extra helper checkout on non-coverage shards and a few seconds ofdotnet msbuildevaluation per project.Breaking changes / migration notes
No input, output or secret is removed or renamed. A caller that is newly red either pins the offending package to 10.x for its
net10.0target or accepts it withnet10-package-exceptions: 'Microsoft.Extensions.Options@11'.