Skip to content

fix(infra): resolve remaining database runtime issues (#348)#349

Merged
mpaulosky merged 4 commits into
devfrom
squad/348-resolve-database-runtime-issues
May 18, 2026
Merged

fix(infra): resolve remaining database runtime issues (#348)#349
mpaulosky merged 4 commits into
devfrom
squad/348-resolve-database-runtime-issues

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

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 dev branch — 2 commits behind origin/dev, still launching mongo:8.2 → exit 139 (SIGSEGV/AVX).

Identified via: ps aux | grep AppHost.dll — DLL path revealed the wrong repo root.

Changes

Boromir (DevOps/Infra)

  • Pulled and rebuilt main repo AppHost (git pull origin dev + dotnet build) — 0 errors, MongoDB now uses mongo:7 + mongo-data-v7.
  • Added rule 6 to .squad/skills/mongodb-dba-patterns/SKILL.md: sync main repo before starting Aspire; use ps aux | grep AppHost.dll to identify the active build.
  • Added investigation findings to boromir/history.md.

Sam (Backend)

  • Full backend audit: MongoDbBlogPostRepository, MongoDbCategoryRepository, BlogDbContext, Program.cs — all correct. No production code change required.
  • Added findings to sam/history.md.

Gimli (Tester)

  • Added SeedMyBlogData_Makes_Seeded_Posts_Visible_On_The_Blog_Page integration test to MongoSeedDataIntegrationTests — asserts seeded posts are visible via the real AppHost-wired Web/MongoDB path.
  • Added findings to gimli/history.md.

Validation

  • MongoDbContainerConfigurationTests — 4/4 ✅
  • Web.Tests.Integration (Testcontainers) — 29/29 ✅
  • All pre-push gates passed (markdownlint, build, unit tests, integration tests) ✅
  • AppHost.Tests build: 0 errors, 0 warnings ✅

Volume State

Volume Status
mongo-data ⚠️ FCV-contaminated (mongo:8.2 data, UUID-format). Do not use with mongo:7.
mongo-data-v7 ✅ Clean, numeric-ident format, lock file 0 bytes. Safe for mongo:7.

Boromir and others added 2 commits May 17, 2026 16:42
…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>
Copilot AI review requested due to automatic review settings May 17, 2026 23:49
@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 17, 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

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_Page integration test in MongoSeedDataIntegrationTests that 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.md requiring git pull origin dev + dotnet build and ps aux | grep AppHost.dll to 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.

Comment thread tests/AppHost.Tests/MongoSeedDataIntegrationTests.cs Outdated
Comment thread tests/AppHost.Tests/MongoSeedDataIntegrationTests.cs Outdated
Comment thread tests/AppHost.Tests/MongoSeedDataIntegrationTests.cs Outdated
Comment thread tests/AppHost.Tests/MongoSeedDataIntegrationTests.cs
Comment thread .squad/agents/boromir/history.md Outdated
@github-actions

github-actions Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Test Results Summary

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

Results for commit deee1ce. ± Comparison against base commit 883137f.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented May 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.14%. Comparing base (883137f) to head (deee1ce).

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:
  • ❄️ 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 2 commits May 17, 2026 17:08
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>
@mpaulosky
mpaulosky merged commit b079c0d into dev May 18, 2026
19 checks passed
@mpaulosky
mpaulosky deleted the squad/348-resolve-database-runtime-issues branch May 18, 2026 00:32
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] Resolve remaining database runtime issues

2 participants