Skip to content

fix(build): clear remaining Release analyzer warnings#283

Merged
mpaulosky merged 10 commits into
devfrom
squad/280-cleanup-release-build-warnings
May 10, 2026
Merged

fix(build): clear remaining Release analyzer warnings#283
mpaulosky merged 10 commits into
devfrom
squad/280-cleanup-release-build-warnings

Conversation

@mpaulosky

@mpaulosky mpaulosky commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • remove the remaining Release analyzer warnings in the backend, infra, and test-project slice
  • keep the production diff focused to the warning fixes plus the final build log update
  • re-establish a zero-warning Release build baseline for this issue branch

What changed

  • add ConfigureAwait(false) to the async warning hotspots in validation, repository, and cache paths
  • rename the ServiceDefaults extension container and add targeted null guards where analyzers required them
  • add centralized [tests/**/*.cs] analyzer suppressions in .editorconfig for repo-wide test-only xUnit naming and focused-sync-validator noise
  • document the final zero-warning baseline and verification pass in docs/build-log.txt

Verification

  • dotnet build MyBlog.slnx --configuration Release --no-restore
  • dotnet test tests/Architecture.Tests/Architecture.Tests.csproj --configuration Release --no-build
  • dotnet test tests/Domain.Tests/Domain.Tests.csproj --configuration Release --no-build
  • dotnet test tests/Web.Tests/Web.Tests.csproj --configuration Release --no-build
  • dotnet test tests/Web.Tests.Integration/Web.Tests.Integration.csproj --configuration Release --no-build

Working as Boromir (DevOps / Infra)

Closes #280

Boromir and others added 6 commits May 8, 2026 11:41
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Scribe merged 7 decision inbox files from Sprint 18 release orchestration:
- aragorn-apphost-tests-parallel-fix.md (xunit serialization fix)
- aragorn-board-sync-theme-closeout.md (board cleanup verification)
- aragorn-pr-review-262-257.md (PR #262, #257 approvals)
- boromir-249-apphost-clear-hardening.md (issue #249 AC1-AC3 implementation)
- boromir-cleanup-240.md (worktree cleanup)
- boromir-release-pr-opened.md (PR #272 opened)
- boromir-theme-cleanup.md (post-theme branch cleanup)

Session artifacts created:
- .squad/orchestration-log/2026-05-08T18:49:02Z-boromir.md
- .squad/log/2026-05-08T18:49:02Z-release-pr272.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- remove the remaining backend, infra, and test-project Release analyzer warnings
- document the zero-warning baseline and verification pass in docs/build-log.txt

Closes #280

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 10, 2026 18:45
@github-actions github-actions Bot added the squad Squad triage inbox — Lead will assign to a member label May 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🏗️ PR Added to Squad Triage Queue

This PR has been labeled with squad and added to the triage queue.

Next steps:

  • The squad Lead will review and assign to an appropriate team member
  • A squad:member label will be added after triage

If you know which squad member should handle this, you can add the appropriate squad:member label yourself.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets issue #280 by removing the remaining Release analyzer warnings across backend/web infrastructure, service defaults, and the Domain test project, and then recording the resulting zero-warning Release baseline in the build log.

Changes:

  • Added ConfigureAwait(false) to key async paths to address CA2007 hotspots (validation pipeline, repository, caching).
  • Added targeted null-guards / suppressions to satisfy analyzers (e.g., CA1062/CA1515/CA1724) with explicit justification where retained.
  • Updated docs/build-log.txt with the final Release build/test verification results and the zero-warning baseline.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/Domain.Tests/Domain.Tests.csproj Adds test-project NoWarn suppressions for analyzer noise specific to unit tests.
src/Web/Infrastructure/Caching/BlogPostCacheService.cs Adds ConfigureAwait(false) to distributed cache and fetch awaits.
src/Web/Data/MongoDbBlogPostRepository.cs Adds ConfigureAwait(false) to EF Core async calls.
src/Web/Data/BlogDbContext.cs Adds CA1062 null guard and a justified CA1515 suppression for the public DbContext.
src/ServiceDefaults/Extensions.cs Renames the extension container type and adds a null guard to satisfy analyzers.
src/Domain/Behaviors/ValidationBehavior.cs Adds ConfigureAwait(false) for pipeline continuation awaits.
docs/build-log.txt Records the end-to-end “0 warnings” Release baseline and verification runs.

Comment on lines 26 to 30
// This project should be referenced by each service project in your solution.
// To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults
[ExcludeFromCodeCoverage(Justification = "Aspire infrastructure bootstrap — not business logic")]
public static class Extensions
public static class ServiceDefaultsExtensions
{

public static WebApplication MapDefaultEndpoints(this WebApplication app)
{
ArgumentNullException.ThrowIfNull(app);
Comment thread docs/build-log.txt Outdated
@github-actions

github-actions Bot commented May 10, 2026

Copy link
Copy Markdown
Contributor

Test Results Summary

341 tests  ±0   340 ✅ ±0   18s ⏱️ -1s
  6 suites ±0     1 💤 ±0 
  6 files   ±0     0 ❌ ±0 

Results for commit a3ca073. ± Comparison against base commit 7c1fea2.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented May 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.21%. Comparing base (7c1fea2) to head (a3ca073).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #283      +/-   ##
==========================================
+ Coverage   86.14%   86.21%   +0.07%     
==========================================
  Files          44       44              
  Lines        1097     1103       +6     
  Branches      132      132              
==========================================
+ Hits          945      951       +6     
  Misses        100      100              
  Partials       52       52              
Files with missing lines Coverage Δ
src/AppHost/MongoDbResourceBuilderExtensions.cs 94.96% <100.00%> (+0.08%) ⬆️
src/Domain/Abstractions/Result.cs 80.55% <ø> (ø)
src/Domain/Behaviors/ValidationBehavior.cs 100.00% <100.00%> (ø)
src/Web/Data/BlogDbContext.cs 100.00% <100.00%> (ø)
src/Web/Data/MongoDbBlogPostRepository.cs 100.00% <100.00%> (ø)
...Web/Infrastructure/Caching/BlogPostCacheService.cs 91.52% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Boromir and others added 3 commits May 10, 2026 12:31
Co-authored-by: GitHub Copilot <copilot@users.noreply.github.com>
Co-authored-by: GitHub Copilot <copilot@users.noreply.github.com>
@mpaulosky

Copy link
Copy Markdown
Owner Author

Tracking this shared blocker in #286. Both #283 and #285 are red on AppHost.Tests (Aspire + Playwright E2E) due to SeedMyBlogData Concurrent Invocations Allow Only One Run, and current triage treats it as shared AppHost/test instability rather than a PR-local regression.

@mpaulosky
mpaulosky merged commit 80a2ef1 into dev May 10, 2026
18 checks passed
@mpaulosky
mpaulosky deleted the squad/280-cleanup-release-build-warnings branch May 10, 2026 22:42
mpaulosky pushed a commit that referenced this pull request May 11, 2026
- Issue #286 (ci-failure) resolved: PRs #283, #285 merged with AppHost.Tests fix
- Issue #287 triaged to squad:boromir; PR #288 awaiting CI re-run
- Issues #289 (PR #290) and #276 (PR #277) ready for review; all tests passing
- Board state: 3 open issues, 5 open PRs; final state documented

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad Squad triage inbox — Lead will assign to a member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Sprint 19] clean up remaining repo-wide Release build analyzer warnings

2 participants