ci: pin the .NET SDK and harden the release gates - #167
Merged
Conversation
- Add root global.json pinning SDK 10.0.300 (rollForward: disable) so CI and the local machine build the Roslyn DLLs with the same toolchain; both workflows now install it via setup-dotnet global-json-file. - release.yml: run the Generators and Analyzers test suites (Debug, so a test run can never touch the shipped Release DLLs). - release.yml: replace the "generator DLL is non-empty" check with a real freshness gate — rebuild both solutions in Release (Directory.Build.targets re-deploys the DLLs into the package) and fail on git diff, covering the analyzer DLL that the workflow never verified before. - release.yml: guard that the package CHANGELOG.md, once it exists, stays byte-identical to the root CHANGELOG.md. - tests.yml: build with the pinned SDK from global.json (6.0.x kept for the net6.0 test runtime). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsVLAxv4eia9yv4TjSaP3G
VPDPersonal
marked this pull request as ready for review
August 6, 2026 18:43
This was referenced Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
global.jsonpinning the .NET SDK to 10.0.300 (rollForward: disable) so CI and the local machine build the Roslyn DLLs with the identical toolchain; both workflows now install it via setup-dotnetglobal-json-file(6.0.x kept alongside for the net6.0 test runtime).release.ymlnow runs the Generators and Analyzers test suites before tagging — Debug on purpose, so a test run can never touch the shipped Release DLLs.Directory.Build.targetsre-deploys the DLLs into the package) and fail ongit diff --exit-codeover both DLLs. This also finally coversAspid.FastTools.Analyzers.dll, which the release workflow never verified after the analyzer merge (chore(analyzers): fold the analyzer submodule into the main repo #152).CHANGELOG.md, once it exists, is byte-identical to the rootCHANGELOG.md; the step skips while the package copy doesn't exist.Notes for review
build/release-gate-deterministic-dlls. Without<Deterministic>+<ContinuousIntegrationBuild>a rebuild is not byte-reproducible, so the freshness gate would fail on every release (verified locally: today's rebuild produces binary-different DLLs of identical size). After that branch lands, the DLLs need one rebuild + commit with the pinned SDK.docs/changelog-catchupadds the packageCHANGELOG.md, then activates automatically.rollForward: disable: setup-dotnet installs exactly the version fromglobal.json, while a silent local patch roll-forward (e.g. 10.0.301) would produce byte-different DLLs and a confusing gate failure at release time — better to fail fast atdotnetstartup.mainthe generator deploy is not yet Release-only, so a Debug test run overwrites the package DLL — the subsequent Release rebuild overwrites it again before the diff, keeping the gate correct either way.tests.ymlis intentionally still not triggered by tags:release.ymlnow runs both suites itself.🇷🇺 Описание на русском
Кратко
global.jsonпинит .NET SDK 10.0.300 (rollForward: disable) — CI и локальная машина собирают Roslyn-DLL одним тулчейном; оба workflow ставят его через setup-dotnetglobal-json-file(6.0.x остаётся для net6.0-рантайма тестов).release.ymlтеперь гоняет тесты Generators и Analyzers до тегирования — намеренно в Debug, чтобы прогон тестов не мог затронуть поставляемые Release-DLL.Directory.Build.targetsсам разворачивает DLL в пакет) иgit diff --exit-codeпо обеим DLL. Заодно впервые проверяетсяAspid.FastTools.Analyzers.dll, который релизный workflow не верифицировал после вливания анализаторов (chore(analyzers): fold the analyzer submodule into the main repo #152).CHANGELOG.mdпакета, как только появится, обязан быть байт-в-байт равен корневому; пока файла нет — шаг пропускается.Заметки для ревью
build/release-gate-deterministic-dlls. Без<Deterministic>+<ContinuousIntegrationBuild>пересборка не воспроизводима байт-в-байт, и гейт свежести падал бы на каждом релизе (проверено локально: сегодняшняя пересборка даёт бинарно другие DLL того же размера). После merge той ветки DLL нужно один раз пересобрать и закоммитить пиненым SDK.docs/changelog-catchupне добавитCHANGELOG.mdв пакет, затем включается сам.rollForward: disable: setup-dotnet ставит ровно версию изglobal.json, а тихий локальный roll-forward патча дал бы байт-различие DLL и невнятное падение гейта на релизе — лучше падать сразу при запускеdotnet.mainдеплой генератора ещё не Release-only, и Debug-тесты затирают DLL пакета — последующая Release-пересборка перезаписывает её снова до diff, так что гейт корректен в обоих случаях.tests.ymlпо-прежнему намеренно не триггерится тегами:release.ymlтеперь сам гоняет оба набора тестов.🤖 Generated with Claude Code
https://claude.ai/code/session_01LsVLAxv4eia9yv4TjSaP3G