Skip to content

Ralph cleanup#450

Merged
mpaulosky merged 8 commits into
mainfrom
squad/448-fix-apphost-ci-null-ref-and-package-upgrades
Jul 20, 2026
Merged

Ralph cleanup#450
mpaulosky merged 8 commits into
mainfrom
squad/448-fix-apphost-ci-null-ref-and-package-upgrades

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Automated squad workflow PR

mpaulosky and others added 7 commits July 20, 2026 08:01
…reorg

Closes #448

- CRITICAL: ClearCommandAppFixture.DisposeAsync — null-safe App?.DisposeAsync()
  (unconditional call caused NullReferenceException in CI where App=null!)
- Package upgrades in Directory.Packages.props:
    Auth0.AspNetCore.Authentication 1.8.0 → 1.9.0
    Auth0.ManagementApi 8.6.0 → 9.0.0
    MongoDB.Driver/Bson 3.9.0 → 3.10.0
    NSubstitute 5.3.0 → 6.0.0
    OpenTelemetry suite 1.16.0 → 1.17.0
    Microsoft.NET.Test.Sdk 18.7.0 → 18.8.1
    Microsoft.Extensions.Http.Resilience/ServiceDiscovery 10.7 → 10.8
- AppHost.cs: namespace AppHost (was MyBlog.AppHost); startup resource ordering
- MongoDbResourceBuilderExtensions.cs: partial class, bodyless LoggerMessage methods
- AppHost.Tests.csproj: RootNamespace=AppHost
- Test files moved: Tests/Auth/, Tests/Layout/, Tests/Pages/ → Auth/, Layout/, Pages/
- Copyright headers: 10 files corrected IssueManager → MyBlog
- AspireManager retry log corrected: '/3' → '/5'
- Web.Tests.Bunit: NSubstitute 6 null-safe Arg.Is predicates + TestSender helper
- Directory.Packages.props: trailing newline restored
- decisions.md: Decision 5 (AppHost.Tests CI-Safety Pattern)
- docs/build-log.txt: verification entries

Build: 0 errors, 0 warnings
Tests: 557/557 passed (61/61 AppHost.Tests on warm DCP)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…t patterns

- Documents ClearCommandAppFixture rules (no pre-warm, StopAsync before Dispose,
  WaitForResourceAsync inside retry boundary)
- Documents BasePlaywrightTests.RetryOnNetworkChangedAsync pattern
- Documents ThemeToggleTestRuntime trustworthy-state probe pattern
- Corrects 'No Playwright project exists' claim — AppHost.Tests now ships E2E coverage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 20, 2026 22:26
@github-actions github-actions Bot added the squad Squad triage inbox — Lead will assign to a member label Jul 20, 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.

@mpaulosky
mpaulosky enabled auto-merge (squash) July 20, 2026 22:28
@mpaulosky
mpaulosky merged commit 684d939 into main Jul 20, 2026
16 of 18 checks passed
@mpaulosky
mpaulosky deleted the squad/448-fix-apphost-ci-null-ref-and-package-upgrades branch July 20, 2026 22:31
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.78%. Comparing base (f765bb0) to head (9b2b386).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #450   +/-   ##
=======================================
  Coverage   76.78%   76.78%           
=======================================
  Files          71       71           
  Lines        1775     1775           
  Branches      214      214           
=======================================
  Hits         1363     1363           
  Misses        336      336           
  Partials       76       76           
🚀 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.

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 performs a broad “cleanup” pass across the solution: updating package/tooling versions, normalizing test namespaces/root namespaces, improving test determinism in bUnit by introducing a custom ISender test double, and hardening Aspire/Playwright test infrastructure against common transient failures.

Changes:

  • Added TestSender and migrated several bUnit tests away from NSubstitute ISender setups to deterministic registrations (including sequential responses).
  • Normalized test project namespaces/root namespaces (Domain.Tests and AppHost.Tests) and corrected stale “IssueManager” header/doc references.
  • Updated dependencies/tooling (NuGet packages, Aspire AppHost SDK, .NET SDK via global.json, markdownlint-cli2) and improved AppHost test reliability (timeouts/retry behaviors).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/Web.Tests.Bunit/Testing/TestSender.cs Adds deterministic MediatR test sender
tests/Web.Tests.Bunit/Features/ObjectIdWorkflowTests.cs Null-safe predicates + sender adjustments
tests/Web.Tests.Bunit/Features/EditCategoryRegressionTests.cs Swap to TestSender + registrations
tests/Web.Tests.Bunit/Features/EditAclTests.cs Swap to TestSender + registrations
tests/Web.Tests.Bunit/Components/RazorSmokeTests.cs Swap to TestSender + sequence registrations
tests/Domain.Tests/Entities/CategoryTests.cs Namespace normalization
tests/Domain.Tests/Entities/BlogPostTests.cs Namespace normalization
tests/Domain.Tests/Entities/BlogPostCategoryTests.cs Namespace normalization
tests/Domain.Tests/Domain.Tests.csproj RootNamespace change
tests/Domain.Tests/Behaviors/ValidationBehaviorTests.cs Namespace normalization
tests/Domain.Tests/Abstractions/ResultTests.cs Namespace normalization
tests/AppHost.Tests/WebPlaywrightTests.cs Namespace/using/header corrections
tests/AppHost.Tests/Pages/NotFoundPageTests.cs Namespace/using/header corrections
tests/AppHost.Tests/Pages/HomePageTests.cs Namespace/using/header corrections
tests/AppHost.Tests/MongoShowStatsIntegrationTests.cs Namespace/using corrections
tests/AppHost.Tests/MongoSeedDataIntegrationTests.cs Timeout plumbing + minor wording fixes
tests/AppHost.Tests/MongoDbStatsCommandTests.cs Namespace normalization
tests/AppHost.Tests/MongoDbSeedCommandTests.cs Namespace normalization
tests/AppHost.Tests/MongoDbContainerConfigurationTests.cs Namespace normalization
tests/AppHost.Tests/MongoDbClearCommandTests.cs Namespace normalization
tests/AppHost.Tests/MongoClearDataIntegrationTests.cs Namespace/using corrections
tests/AppHost.Tests/Layout/ThemeToggleTestRuntime.cs Namespace normalization
tests/AppHost.Tests/Layout/ThemeToggleInteractionTests.cs Namespace/using corrections
tests/AppHost.Tests/Layout/LayoutThemeToggleTests.cs Namespace/using corrections
tests/AppHost.Tests/Layout/LayoutAuthenticatedTests.cs Stronger assertion + header fixes
tests/AppHost.Tests/Layout/LayoutAnonymousTests.cs Namespace/using/header corrections
tests/AppHost.Tests/Infrastructure/SkipInCITheoryAttribute.cs Namespace normalization
tests/AppHost.Tests/Infrastructure/SkipInCIFactAttribute.cs Namespace normalization
tests/AppHost.Tests/Infrastructure/PlaywrightManager.cs Namespace normalization + header fixes
tests/AppHost.Tests/Infrastructure/MongoStatsIntegrationCollection.cs Namespace normalization
tests/AppHost.Tests/Infrastructure/MongoSeedIntegrationCollection.cs Namespace normalization
tests/AppHost.Tests/Infrastructure/MongoClearIntegrationCollection.cs Namespace normalization
tests/AppHost.Tests/Infrastructure/ClearCommandAppFixture.cs Retry/cleanup behavior adjustments
tests/AppHost.Tests/Infrastructure/AspireManager.cs Retry tuning + timeout adjustments
tests/AppHost.Tests/Infrastructure/AppHostTestCollection.cs Namespace normalization + header fixes
tests/AppHost.Tests/EnvVarTests.cs Namespace normalization + header fixes
tests/AppHost.Tests/BasePlaywrightTests.cs Add retry wrapper + HttpClient timeout tweak
tests/AppHost.Tests/Auth/LoginFallbackTests.cs Namespace/using corrections
tests/AppHost.Tests/AppHostStartupSmokeTests.cs HttpClient timeout set before polling
tests/AppHost.Tests/AppHost.Tests.csproj RootNamespace added
src/Web/package-lock.json markdownlint-cli2 bump
src/AppHost/MongoDbResourceBuilderExtensions.cs Namespace change + comment punctuation tweak
src/AppHost/AppHost.csproj Aspire AppHost SDK version bump
src/AppHost/AppHost.cs Reference/wait ordering adjustments
global.json .NET SDK patch bump
docs/build-log.txt Adds build repair/verification log entry
Directory.Packages.props Dependency updates (Auth0/MongoDB/OTel/etc.)
.squad/skills/webapp-testing/SKILL.md Updates testing-skill content (but still inconsistent)
.squad/log/20260417-092921-transactions-concurrency.md Markdown spacing cleanup
.squad/decisions/inbox/boromir-release-board-selection.md Removes inbox decision file
.squad/decisions/decisions.md Markdown formatting cleanup
.squad/decisions.md Adds “Decision 5” CI-safety pattern doc
.squad/agents/ralph/history.md Trailing whitespace cleanup
.squad/agents/legolas/history.md Adds blank line for readability
.github/workflows/squad-dependabot-auto-merge.yml Adds retry for transient auto-merge enable failures
.github/workflows/project-board-automation.yml Token fallback expression added
.github/agents/squad.agent.md Minor formatting (blank line)

Comment on lines +80 to 83
- `tests/Unit.Tests/Features/UserManagement/ProfileTests.cs` — Profile component claim assertions
- bUnit tests use `BunitContext` (base class from bUnit; test-specific helpers in `TestAuthorizationService.cs`)

- **No** Playwright or dedicated browser-test project exists today.
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.

2 participants