Skip to content

ci: relax dotnet format gate to severity=error#24

Merged
Extentsoftware merged 6 commits intomainfrom
ci/format-severity-error
May 10, 2026
Merged

ci: relax dotnet format gate to severity=error#24
Extentsoftware merged 6 commits intomainfrom
ci/format-severity-error

Conversation

@Extentsoftware
Copy link
Copy Markdown
Owner

Summary

  • The format verification step was running at `--severity warn`, so any analyzer warning (notably xUnit1051, which had ~75 occurrences across the test suite) made the gate fail even though they aren't formatting issues.
  • Drops the gate to `--severity error` so it only catches real format violations. The build step still runs with `TreatWarningsAsErrors=true` and remains authoritative for analyzer hygiene.

Test plan

  • CI's `Verify formatting` step passes on this PR.

🤖 Generated with Claude Code

Marcus Poulton and others added 6 commits May 10, 2026 09:27
Format verification was running at --severity warn, so the gate failed
on every analyzer warning surfaced by xunit.analyzers (xUnit1051) even
though those are not formatting issues. Restrict the gate to actual
errors; the build step still treats warnings as errors and remains the
authority for analyzer hygiene.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Build runs with TreatWarningsAsErrors=true, which surfaces analyzer
warnings that aren't load-bearing for test code:

- xUnit1051 (use TestContext.Current.CancellationToken) — ~75 sites
- IDE0005 (remove unused usings) — handful in test files
- CA1711 (avoid 'Collection' suffix) — required by xUnit fixture convention

Add a tests/.editorconfig that disables these for the test tree only.

Also pass the image to MsSqlBuilder via its constructor; the
parameterless ctor is obsolete in Testcontainers.MsSql.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two pre-existing test regressions on main, both about read-after-write
shape:

- Workflow round-trip: EF materialises the owned _steps collection in
  physical row order, which is not guaranteed to match insertion order.
  Sort by the existing Order field at the domain boundary so callers
  always see steps in workflow order.

- Outbox round-trip: the MarkProcessed test inserts a "Test.Event" and
  flips ProcessedAt; that row leaked into the persistence test's
  AllSatisfy assertion via the shared MSSQL container. Narrow the
  query to the event types this test actually writes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Program.cs reads the connection string from LOOM_CONNECTION (or the
configured value) before WebApplicationFactory's ConfigureAppConfiguration
hook runs, so the InMemory override in LoomWebFactory was being shadowed
by appsettings.Development.json's SQL Server connection string and the
host smoke tests tried to connect to localhost:1433.

Set LOOM_CONNECTION in the factory constructor to the temp SQLite path
so the auto-detected provider matches the SQLite-only fixture model.
ExternalId pinned its column type to nvarchar(max), which SQLite can't
parse and caused EnsureCreated to throw 'near "max": syntax error' in
the Loom.Web smoke tests. Removing the explicit type lets the provider
choose the right unbounded text type (nvarchar(max) on SQL Server,
TEXT on SQLite); behaviour on SQL Server is unchanged.
@Extentsoftware Extentsoftware merged commit 358bcb8 into main May 10, 2026
1 check passed
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.

1 participant