Skip to content

Rename ThemeProviderDemo to ThemeProvider.Demo - #103

Open
matt-edmondson wants to merge 1 commit into
mainfrom
claude/rename-demo-project
Open

matt-edmondson wants to merge 1 commit into
mainfrom
claude/rename-demo-project

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #78

What

ThemeProviderDemo derived the identity ktsu.ThemeProviderDemo, running the role suffix together into the family name, so it read as a separate family rather than a component of ThemeProvider and sorted away from its siblings. The convention separates role suffixes with a dot.

  • Folder, .csproj filename and solution entry: ThemeProviderDemoThemeProvider.Demo
  • Namespace: ktsu.ThemeProviderDemoktsu.ThemeProvider.Demo, so the source matches the identity the folder path now derives
  • IsPackable=false set explicitly rather than relying on OutputType
  • The two doc references that named the old folder (CLAUDE.md, ThemeProvider.ImGui/README.md) follow it

The issue notes nothing inside the project file needs editing since the identity follows the folder path; the namespace edit is the one source change, and it is what keeps Program.cs consistent with the new identity rather than leaving it on the old family name.

CHANGELOG.md and the historical plan under docs/superpowers/ still mention the old name; those are records of what happened and are left alone.

Verification

  • dotnet build ThemeProvider.sln — clean, 0 warnings, 0 errors
  • Test suite — 64/64 passing
  • Output assembly is now ktsu.ThemeProvider.Demo.dll, confirming the derived identity changed as intended
  • dotnet pack ThemeProvider.sln produces exactly ktsu.ThemeProvider and ktsu.ThemeProvider.ImGui and no demo package, confirming the published packages are untouched and the demo stays unpublished

No test is added: the change is a rename with no behaviour to assert, and the build plus the pack output are what actually prove it. dotnet pack also reports pre-existing CP0001 ApiCompat errors on the two library projects — those reproduce identically on main (146 of them either way) and are not from this change.

Part of the naming audit tracked in ktsu-dev/Sdk#36.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AEnne4CKU84fkH76m2eK2Y


Generated by Claude Code

ThemeProviderDemo derived the identity ktsu.ThemeProviderDemo, running
the role suffix together into the family name, so it read as a separate
family rather than a component of ThemeProvider and sorted away from its
siblings. The convention separates role suffixes with a dot.

Renames the folder, the csproj and the solution entry, and moves the
namespace from ktsu.ThemeProviderDemo to ktsu.ThemeProvider.Demo to
match the derived identity. Sets IsPackable=false explicitly rather than
relying on OutputType.

Nothing was published under the old name: ktsu.Sdk marks only libraries
and PackAsTool projects packable, and this is a WinExe via ktsu.Sdk.App.
dotnet pack still produces exactly ktsu.ThemeProvider and
ktsu.ThemeProvider.ImGui.

Part of the naming audit in ktsu-dev/Sdk#36.

Fixes #78

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

Copy link
Copy Markdown
Contributor Author

github-advanced-security is failing on an account quota, not on this PR

The only red check here is github-advanced-security. Its job log ends with:

Error creating PR review request: SessionModelError: You have exceeded your monthly quota
  errorType: 'quota', statusCode: 402
##[error]Process completed with exit code 1.

That is the Copilot autofix step exhausting a monthly account quota (HTTP 402) before it analyses anything. It is not a finding against this diff, and no change to this branch can clear it — it needs the quota topped up or that step made non-blocking. Note CodeQL and Analyze (csharp) / Analyze (actions) all pass; it is only the Copilot-backed job that fails.

Everything else on this head is green: Test on ubuntu-latest, Test on macos-latest and Test on windows-latest all pass.

I have not spent a re-run on it. A 402 quota error is deterministic, and the cross-check a re-run would give is already in hand from a stronger source: the identical failure is on four PRs I opened today across four repositories with four unrelated diffs — ktsu-dev/KtsuTools#174, #103, ktsu-dev/FileDeduplicator#124 and ktsu-dev/ImageDescriber#143 — including one that only adds a text file. Re-running would consume the budget without telling us anything new.

No fix exists to port, so there is nothing for me to push here. Flagging it because it is org-wide rather than specific to this PR, and it will keep every PR red until the quota is dealt with.


Generated by Claude Code

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link
Copy Markdown
Contributor Author

SonarCloud gate needs a repo variable set — this one is blocked on you

SonarCloud Code Analysis now fails: 0.0% Coverage on New Code (required ≥ 80%). This is caused by this PR, so I want to be clear about it rather than wave it off — but it is not fixable by anything I can push.

Why

Moving ThemeProviderDemo/Program.cs to ThemeProvider.Demo/Program.cs makes SonarCloud re-attribute the file as new code. That is 795 lines of a windowed ImGui entry point (ktsu.Sdk.App, OutputType=WinExe), and ThemeProvider.Test references only ThemeProvider and ThemeProvider.ImGui — it has never referenced the demo. So the gate is measuring a file that no test can execute and getting 0%.

Nothing about the rename changed what is testable. Reverting the namespace edit would not help either: the gate needs ≥80% on whatever it counts as new, and 0% of a moved file fails the same way at one changed line as at 795.

What unblocks it

The shared workflow already has the mechanism, and its comment describes this exact case:

A file that cannot be executed rather than one nobody has got round to testing — a windowed entry point, say — is excluded per repository through the SONAR_COVERAGE_EXCLUSIONS_EXTRA variable, so this workflow stays identical everywhere instead of accumulating one repository's paths for all the others to carry.

So this needs a repository variable on ktsu-dev/ThemeProvider:

SONAR_COVERAGE_EXCLUSIONS_EXTRA = **/ThemeProvider.Demo/**

That is a settings change rather than a commit, which is why I have not done it — and it is the kind of decision worth making once for the estate rather than by me unilaterally, since ktsu-dev/Invoker#48 is blocked on exactly the same thing right now (**/Invoker.Demo/**), and every other demo project will hit it the moment one is renamed or added.

The alternative, if you would rather not use a variable

<SonarQubeExclude>true</SonarQubeExclude> in ThemeProvider.Demo.csproj would drop the project from analysis and travel with the project instead of living in repo settings. I have deliberately not pushed it: no repository in the org uses it today, the workflow comment says the variable is the chosen mechanism, and I cannot verify it against SonarCloud from here — so it would be a speculative push against a documented convention. Say the word and I will make that change instead.

Everything else on this head is green: build clean with 0 warnings, 64/64 tests passing on ubuntu, macOS and Windows. The only other red check is github-advanced-security, which is the Copilot quota failure covered above.


Generated by Claude Code

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.

Rename ThemeProviderDemo to ThemeProvider.Demo

1 participant