Skip to content

fix(#350): repair Aspire startup on fresh-machine clone#351

Merged
mpaulosky merged 1 commit into
devfrom
squad/350-repair-aspire-startup-on-new-machine
May 23, 2026
Merged

fix(#350): repair Aspire startup on fresh-machine clone#351
mpaulosky merged 1 commit into
devfrom
squad/350-repair-aspire-startup-on-new-machine

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

Fixes Aspire startup failures when cloning on a fresh machine.

Changes

  • src/AppHost/aspire.config.json — corrected .csproj reference from MyBlog.AppHost.csproj -> AppHost.csproj
  • src/AppHost/MongoDbResourceBuilderExtensions.cs — refactored MongoDB resource builder
  • Updated package versions in Directory.Packages.props
  • Updated src/AppHost/AppHost.csproj and src/Web/Web.csproj
  • Minor README and MCP config updates

Validation

  • AppHost build passes
  • Architecture.Tests: 16/16 passed

Closes #350

- Update Directory.Packages.props to centralize all NuGet versions
- Fix AppHost.csproj project references and package pins
- Refactor MongoDbResourceBuilderExtensions for cross-platform container config
- Update aspire.config.json with correct resource names and endpoints
- Fix Web.csproj package references to align with centralized versions
- Update README with fresh-machine setup prerequisites
- Update .copilot/mcp-config.json for environment portability
- Record Boromir and Sam agent history for this repair session

Closes #350

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 23, 2026 19:32
@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.

@github-actions github-actions Bot added the squad Squad triage inbox — Lead will assign to a member label May 23, 2026

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 addresses “fresh machine clone” failures that prevent Aspire/AppHost orchestration and local builds from starting cleanly, primarily by fixing Aspire config wiring, improving Web build self-healing for Tailwind, and aligning some Aspire package/apphost versions.

Changes:

  • Fixes Aspire CLI configuration to reference the correct AppHost .csproj.
  • Adds an MSBuild target in Web.csproj to restore npm packages automatically when node_modules is missing (fresh clone scenario).
  • Refactors MongoDB AppHost dev commands logging/await patterns and updates Aspire package/AppHost SDK versions.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Web/Web.csproj Adds an EnsureNpmPackages target to auto-restore npm deps before Tailwind build on non-CI machines.
src/AppHost/MongoDbResourceBuilderExtensions.cs Refactors logging to source-generated delegates and adds .ConfigureAwait(false) plus invariant formatting.
src/AppHost/aspire.config.json Fixes the AppHost project path used by Aspire CLI.
src/AppHost/AppHost.csproj Bumps Aspire AppHost SDK patch version.
README.md Updates fresh-machine npm install guidance (npm ci).
Directory.Packages.props Updates Aspire package versions (partial).
.squad/agents/sam/history.md Adds work-history entries related to Issue #350.
.squad/agents/boromir/history.md Adds work-history entries related to Issue #350.
.copilot/mcp-config.json Updates the GitHub MCP server package reference.

Comment thread src/Web/Web.csproj
Comment on lines +36 to +41
<!-- On a fresh machine, node_modules won't exist. Auto-run npm install before Tailwind builds. -->
<Target Name="EnsureNpmPackages" BeforeTargets="BuildTailwind"
Condition="'$(CI)' != 'true' AND !Exists('$(MSBuildProjectDirectory)/../../node_modules')">
<Message Importance="high" Text="node_modules not found — running npm install..." />
<Exec Command="npm install" WorkingDirectory="$(MSBuildProjectDirectory)/../.." />
</Target>
Comment thread Directory.Packages.props
<PackageVersion Include="Aspire.Hosting.Redis" Version="13.3.3" />
<PackageVersion Include="Aspire.Hosting.MongoDB" Version="13.3.5" />
<PackageVersion Include="Aspire.Hosting.Redis" Version="13.3.5" />
<PackageVersion Include="Aspire.Hosting.Testing" Version="13.3.3" />
@github-actions

Copy link
Copy Markdown
Contributor

Test Results Summary

480 tests  ±0   479 ✅ ±0   32s ⏱️ ±0s
  6 suites ±0     1 💤 ±0 
  6 files   ±0     0 ❌ ±0 

Results for commit 3e2b364. ± Comparison against base commit b079c0d.

@codecov

codecov Bot commented May 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.86%. Comparing base (b079c0d) to head (3e2b364).

Files with missing lines Patch % Lines
src/AppHost/MongoDbResourceBuilderExtensions.cs 90.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #351      +/-   ##
==========================================
- Coverage   80.14%   79.86%   -0.28%     
==========================================
  Files          68       68              
  Lines        1682     1659      -23     
  Branches      201      201              
==========================================
- Hits         1348     1325      -23     
  Misses        244      244              
  Partials       90       90              
Files with missing lines Coverage Δ
src/AppHost/MongoDbResourceBuilderExtensions.cs 95.10% <90.00%> (-0.33%) ⬇️
🚀 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.

@mpaulosky
mpaulosky merged commit 41c20a7 into dev May 23, 2026
21 checks passed
@mpaulosky
mpaulosky deleted the squad/350-repair-aspire-startup-on-new-machine branch May 23, 2026 19:49
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] Repair Aspire startup on new machine

2 participants