fix(infra): resolve remaining database runtime issues (#348)#349
Merged
Conversation
…efect Full backend audit performed for issue #348. All Sam-owned code (MongoDbBlogPostRepository, MongoDbCategoryRepository, BlogDbContext, Program.cs) verified correct. All tests pass (210 unit, 16 arch, 29 integration). No production code change required. Remaining runtime issues are AppHost/environment concerns for Boromir/Gimli, not backend code defects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Boromir: root cause identified as stale main repo AppHost DLL running mongo:8.2 after PR #346 fix was merged but not pulled locally. Pulled and rebuilt main repo AppHost (mongo:7 + mongo-data-v7, 0 errors). Added running-environment sync rule to MongoDB DBA skill and history. - Gimli: added AppHost integration test asserting seeded posts are visible on the public blog page through the real AppHost-wired path. Confirms runtime MongoDB → Web connectivity end-to-end. All AppHost.Tests build cleanly (0 errors, 0 warnings). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🏗️ PR Added to Squad Triage QueueThis PR has been labeled with Next steps:
|
There was a problem hiding this comment.
Pull request overview
Adds runtime regression coverage for the MongoDB/Aspire database path after PR #346 and documents the operational lesson (stale main-repo build silently running pre-#346 infra) in the MongoDB DBA skill and agent histories. No production code change.
Changes:
- New
SeedMyBlogData_Makes_Seeded_Posts_Visible_On_The_Blog_Pageintegration test inMongoSeedDataIntegrationTeststhat boots the real AppHost, seeds Mongo, and asserts seeded titles appear on/blog(with an/alive-based readiness probe). - New rule #6 in
.squad/skills/mongodb-dba-patterns/SKILL.mdrequiringgit pull origin dev+dotnet buildandps aux | grep AppHost.dllto verify the active Aspire build matches the current worktree. - History entries for Boromir, Sam, and Gimli capturing the investigation, findings, and standing learnings.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/AppHost.Tests/MongoSeedDataIntegrationTests.cs | Adds end-to-end test seeding Mongo then asserting /blog HTML contains seeded titles, plus a WaitForWebReadyAsync helper. |
| .squad/skills/mongodb-dba-patterns/SKILL.md | Adds rule #6 on syncing the main repo and using ps aux to identify the running AppHost DLL. |
| .squad/agents/sam/history.md | Logs Sam's backend audit findings concluding no production code change is needed. |
| .squad/agents/gimli/history.md | Logs Gimli's reasoning for the new runtime read regression test. |
| .squad/agents/boromir/history.md | Logs Boromir's stale-dev-branch root cause, remediation steps, and lessons. |
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #349 +/- ##
=======================================
Coverage 80.14% 80.14%
=======================================
Files 68 68
Lines 1682 1682
Branches 201 201
=======================================
Hits 1348 1348
Misses 244 244
Partials 90 90 🚀 New features to boost your workflow:
|
Address PR review feedback by making the AppHost blog-page regression require a positive seeded-title render, cleaning the Boromir history changed-files note, and merging Issue 348 decisions into the tracked ledger. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply dotnet format import ordering after the PR review fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #348
Working as Boromir (DevOps/Infra) + Sam (Backend) + Gimli (Tester).
Root Cause
After PR #346 (mongo:7 + mongo-data-v7 fix) was merged, MongoDB containers continued crashing in the running environment. Investigation revealed the active Aspire AppHost was built from the main repo's stale local
devbranch — 2 commits behindorigin/dev, still launchingmongo:8.2→ exit 139 (SIGSEGV/AVX).Identified via:
ps aux | grep AppHost.dll— DLL path revealed the wrong repo root.Changes
Boromir (DevOps/Infra)
git pull origin dev+dotnet build) — 0 errors, MongoDB now usesmongo:7+mongo-data-v7..squad/skills/mongodb-dba-patterns/SKILL.md: sync main repo before starting Aspire; useps aux | grep AppHost.dllto identify the active build.boromir/history.md.Sam (Backend)
MongoDbBlogPostRepository,MongoDbCategoryRepository,BlogDbContext,Program.cs— all correct. No production code change required.sam/history.md.Gimli (Tester)
SeedMyBlogData_Makes_Seeded_Posts_Visible_On_The_Blog_Pageintegration test toMongoSeedDataIntegrationTests— asserts seeded posts are visible via the real AppHost-wired Web/MongoDB path.gimli/history.md.Validation
MongoDbContainerConfigurationTests— 4/4 ✅Web.Tests.Integration(Testcontainers) — 29/29 ✅Volume State
mongo-datamongo-data-v7