Skip to content

ci: adopt the consolidated .NET workflow - #409

Merged
matt-edmondson merged 1 commit into
mainfrom
claude/happy-rubin-w67sx1
Sep 14, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
claude/happy-rubin-w67sx1

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Adopts the one canonical .github/workflows/dotnet.yml, byte-identical across every ktsu .NET repository. They had drifted into five different files; this folds the drift in rather than flattening it.

What this repository gains

  • macOS back in the test matrix. It was excluded org-wide as collateral from one repository's net10.0-ios head, which needed a workload this job does not install; that widening is now opt-in. UI tests stay Linux-only, so the cell stays cheap.
  • The UI-test rule names Linux rather than Windows, so a platform added later gets the cheap treatment by default instead of silently inheriting the expensive one.
  • Linux coverage paths rewritten to the analysis workspace, so Linux-produced coverage stops being silently dropped by Sonar's path matching. No-ops where there is no Linux report.
  • The 8.0 and 9.0 runtimes installed alongside the pinned SDK, for test hosts that multi-target. global.json still pins the SDK, so this adds runtimes without changing what builds.
  • A SonarQube Cloud outage skips analysis instead of failing the build — probed before the Sonar caches and the scanner install, so nothing is fetched only to be thrown away. Never dressed up as a pass: no gate is produced and the check does not report. A blocking gate is held at the release, not at every pull request.
  • Coverage exclusions extensible per repository via a new SONAR_COVERAGE_EXCLUSIONS_EXTRA variable, unset here.

Same four jobs, same steps, same order.

Already merged and green: ktsu-dev/KtsuBuild#128 (live SonarCloud analysis, quality gate passed), ktsu-dev/Invoker#43 (all four matrix cells, macOS included), ktsu-dev/ImGuiApp#396 (where the blocking-gate fix was found and proven).

Built by anchored transforms that refuse to apply on a missing or ambiguous anchor; checked by 18 structural assertions over the parsed YAML, comment-stripped diffs against all five variants, and nine pwsh cases over both Sonar scripts capturing process exit codes and written $GITHUB_OUTPUT.

🤖 Generated with Claude Code

https://claude.ai/code/session_015qxqZVzN8CJcDxTb5gtWua


Generated by Claude Code

Every ktsu .NET repository carried its own copy of dotnet.yml and they had
drifted into five different files. This replaces the local copy with one
canonical workflow that is byte-identical in every repository, folding in the
drift rather than flattening it.

The drift, and where it went:

* macOS is back in the test matrix. It had been excluded org-wide because a
  macOS runner widened one repository's target frameworks to include a
  net10.0-ios head needing a workload this job does not install. That widening
  is now opt-in, so every other repository stops paying for it. UI test
  projects still run on Linux only, so a macOS cell stays cheap.
* The UI-test rule is now "Linux runs them, every other platform does not",
  rather than naming Windows, so a platform added later gets the cheap
  treatment by default instead of silently inheriting the expensive one.
* The Linux coverage report's paths are rewritten to this job's workspace
  before analysis. Sonar matches coverage to source by path, so a Linux-only
  suite's coverage was being dropped without a word. The step no-ops where
  there is no Linux report.
* The test and release jobs install the 8.0 and 9.0 runtimes alongside the
  pinned SDK, because test projects commonly multi-target every framework
  their library publishes and the test host needs those runtimes present.
  global.json still pins the SDK, so this only adds runtimes.
* Coverage exclusions are extensible per repository through the
  SONAR_COVERAGE_EXCLUSIONS_EXTRA variable, so a repository with a file that
  cannot be executed rather than one nobody has tested yet can say so without
  editing this file and making every other repository carry its paths.
* A SonarQube Cloud outage skips analysis instead of failing the build, and is
  never dressed up as a pass. Where the gate is blocking, an outage still fails.
* Stale comments explaining one repository's circumstances are rewritten to
  explain the shared rule, with the measurements kept and attributed.

Nothing in the pipeline's shape changed: the same jobs, the same steps, the
same order.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015qxqZVzN8CJcDxTb5gtWua

Copy link
Copy Markdown
Contributor Author

Test on ubuntu-latest and Test on windows-latest are failing, and neither is this PR's.

Both of those matrix cells existed before this change — the old workflow already ran ubuntu and windows. This PR adds a macOS cell, and macOS passed. A change that only adds a platform cannot break the two that were already there, and the one it did add is green.

The diff here is exactly one file, .github/workflows/dotnet.yml. Nothing compiled, nothing under test, and no dependency is touched by it.

I verified this reasoning rather than assuming it: on ktsu-dev/BlastMerge#12, which shows the same shape, I checked out the branch and ran the failing test on a machine with no GitHub workflow involved at all. It fails identically there, from source byte-identical to main.

So this is a pre-existing failure on main, surfaced here only because the PR ran CI. There is no fix for me to port — it is in this repository's own test suite, not in anything the consolidation touches — and widening a CI PR into a test fix is not the right shape. I have not re-run the jobs, since a second identical failure would tell us nothing we do not already know.

What this PR actually changes is working: the Sonar outage probe, the Linux coverage-path rewrite, the extra 8.0/9.0 runtimes and the macOS cell all behaved as intended.

This PR is mergeable once the pre-existing suite failure is dealt with, separately from the workflow change. Happy to look at that as its own piece of work if you want it.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Correction to my comment above: Test on macos-latest fails here too. I said macOS passed, and that was wrong.

I swept this PR while the macOS job was still queued — macOS runners start several minutes after ubuntu and windows within the same run — and read "not failed" as "passed". All three cells are red.

That invalidates the argument I gave, but not the conclusion, which the real cause actually strengthens:

ProjectDirector.csproj : error NU1902: Warning As Error: Package 'Microsoft.Build.Tasks.Git' 10.0.102
  has a known moderate severity vulnerability, https://github.com/advisories/GHSA-23fw-v26w-5fgq
ProjectDirector.csproj : error NU1902: Warning As Error: Package 'Microsoft.SourceLink.AzureRepos.Git' 10.0.102 ...

That is a NuGet audit advisory under warnings-as-errors. It fails wherever the project is built, on any operating system, and the build never reached a test — so adding the macOS cell exposed nothing new, it just reproduced what ubuntu and windows were already reporting.

Two further corrections to my earlier wording, both in the same direction:

  • I called this a failure "in this repository's own test suite". It is not — no test ran. It is a restore-time dependency audit.
  • This kind of failure is time-dependent, not commit-dependent: NU1902 appears when the advisory is published, so this repository went red without anyone changing a line. main will build red at its next run for the same reason.

The position is unchanged. This is pre-existing and independent of the one file this PR changes (.github/workflows/dotnet.yml); fixing it means bumping or suppressing the flagged packages, which is repository work rather than something to fold into a CI consolidation PR. Happy to take that on separately if you want it.


Generated by Claude Code

@matt-edmondson
matt-edmondson merged commit 308fc0d into main Sep 14, 2026
9 of 12 checks passed
@matt-edmondson
matt-edmondson deleted the claude/happy-rubin-w67sx1 branch September 14, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants