[P1] Run dotnet test in GitHub CI — the C# quality gate never executes outside the laptop #258

Closed
opened 2026-07-03 09:33:35 -07:00 by nelsong6 · 2 comments
nelsong6 commented 2026-07-03 09:33:35 -07:00 (Migrated from github.com)

Priority: P1. Confirmed in the 2026-07-02 uncapped audit pass (finding #148). Highest-leverage single guardrail found.

Problem

The C# test suite (Tests/SpireLens.Core.Tests, ~35 files) is the project's only deterministic quality gate, but GitHub CI never runs it. .github/workflows/release.yml only dotnet builds the Tests project (lines ~37-38) — there is no dotnet test. The gate runs solely in the laptop glimmung verification phase.

Consequence: any direct push, manual PR merge, or run made while the laptop is down lands on main with zero C# tests executed. A regression in the historically-buggy promotion / adoption / merge paths ships silently. This also undercuts the value of every reflection-drift test and event-sequence fixture proposed elsewhere in the audit — they protect nothing between laptop sessions.

Fix

Replace the build-only step with a test run:

dotnet test Tests/SpireLens.Core.Tests/SpireLens.Core.Tests.csproj -c Release -p:SkipModsDeploy=true --logger trx

This runs headless on ubuntu-latest: the committed lib/{0Harmony,GodotSharp,sts2}.dll are the Sts2LibDir fallback when the game isn't present, and SafeLogger degrades to console. (Note: ~11 asset-coupled tooltip-icon tests currently fail against the lib/ stub because they resolve live-game icon assets — either decouple those or mark them [Trait("RequiresLiveGame","true")] and filter them out in the stub CI run; tracked in the test-fidelity issue.)

Optionally split into a dotnet-quality.yml with paths: filters mirroring the existing go-harness-quality.yml.

**Priority: P1.** Confirmed in the 2026-07-02 uncapped audit pass (finding #148). Highest-leverage single guardrail found. ## Problem The C# test suite (`Tests/SpireLens.Core.Tests`, ~35 files) is the project's only deterministic quality gate, but **GitHub CI never runs it**. `.github/workflows/release.yml` only `dotnet build`s the Tests project (lines ~37-38) — there is no `dotnet test`. The gate runs *solely* in the laptop glimmung verification phase. Consequence: any direct push, manual PR merge, or run made while the laptop is down lands on `main` with **zero C# tests executed**. A regression in the historically-buggy promotion / adoption / merge paths ships silently. This also undercuts the value of every reflection-drift test and event-sequence fixture proposed elsewhere in the audit — they protect nothing between laptop sessions. ## Fix Replace the build-only step with a test run: ``` dotnet test Tests/SpireLens.Core.Tests/SpireLens.Core.Tests.csproj -c Release -p:SkipModsDeploy=true --logger trx ``` This runs headless on `ubuntu-latest`: the committed `lib/{0Harmony,GodotSharp,sts2}.dll` are the `Sts2LibDir` fallback when the game isn't present, and `SafeLogger` degrades to console. (Note: ~11 asset-coupled tooltip-icon tests currently fail against the `lib/` stub because they resolve live-game icon assets — either decouple those or mark them `[Trait("RequiresLiveGame","true")]` and filter them out in the stub CI run; tracked in the test-fidelity issue.) Optionally split into a `dotnet-quality.yml` with `paths:` filters mirroring the existing `go-harness-quality.yml`.
nelsong6 commented 2026-07-03 10:16:00 -07:00 (Migrated from github.com)

Delivered in #266 (branch claude/ci-dotnet-test):

  • New .github/workflows/dotnet-quality.yml runs dotnet test on ubuntu-latest against the checked-in lib/ stubs.
  • The 11 tooltip tests that resolve real game icon assets are tagged [Trait("Category","RequiresLiveGame")] and excluded via --filter.
  • The exact CI command (Release + SkipModsDeploy + filter) passes 233/233 locally, and the existing release.yml already proves the C# project builds on ubuntu-latest with the stubs — so the gate should activate green on merge.

Could not observe the actual run this session — and this is worth checking: GitHub Actions created no workflow runs for PRs #264/#265/#266 (the only check-suite on #266's head is a queued claude app; gh api .../actions/runs?head_sha=... returns empty). That means even the existing release.yml gate isn't executing on these PRs. Likely a repo Actions setting (e.g. approval required for the pushing actor). Worth confirming Actions is actually running on PRs, otherwise no gate — new or old — protects main.

Delivered in #266 (branch claude/ci-dotnet-test): - New `.github/workflows/dotnet-quality.yml` runs `dotnet test` on ubuntu-latest against the checked-in lib/ stubs. - The 11 tooltip tests that resolve real game icon assets are tagged `[Trait("Category","RequiresLiveGame")]` and excluded via `--filter`. - The exact CI command (Release + SkipModsDeploy + filter) passes **233/233 locally**, and the existing release.yml already proves the C# project **builds on ubuntu-latest** with the stubs — so the gate should activate green on merge. **Could not observe the actual run this session — and this is worth checking:** GitHub Actions created **no** workflow runs for PRs #264/#265/#266 (the only check-suite on #266's head is a queued `claude` app; `gh api .../actions/runs?head_sha=...` returns empty). That means even the existing release.yml gate isn't executing on these PRs. Likely a repo Actions setting (e.g. approval required for the pushing actor). Worth confirming Actions is actually running on PRs, otherwise no gate — new or old — protects main.
nelsong6 commented 2026-07-05 15:45:02 -07:00 (Migrated from github.com)

Closing during repository issue cleanup. If this becomes active work again, we can reopen or recreate it as a fresh, specific task.

Closing during repository issue cleanup. If this becomes active work again, we can reopen or recreate it as a fresh, specific task.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/spirelens#258
No description provided.