Skip to content

Fix schema reloads disposing application services - #10450

Merged
tobias-tengler merged 1 commit into
mainfrom
fix/mcp-root-logger-factory-disposal
Sep 29, 2026
Merged

tobias-tengler merged 1 commit into
mainfrom
fix/mcp-root-logger-factory-disposal

Conversation

@tobias-tengler

Copy link
Copy Markdown
Member

No description provided.

@tobias-tengler
tobias-tengler force-pushed the fix/mcp-root-logger-factory-disposal branch from 21c4ca5 to 44e65dc Compare September 29, 2026 14:10
@tobias-tengler
tobias-tengler marked this pull request as ready for review September 29, 2026 14:18
Copilot AI balanced review requested due to automatic review settings September 29, 2026 14:18
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Patch coverage

100.0% of changed lines covered (16/16)

File Covered Changed Patch %
…/Adapters.Mcp.Core/Extensions/ServiceCollectionExtensions.cs 9 9 100.0% 🟢
…/RequestExecutorBuilderExtensions.Caches.cs 3 3 100.0% 🟢
…/CoreFusionGatewayBuilderExtensions.ErrorFilter.cs 1 1 100.0% 🟢
…/HotChocolateFusionServiceCollectionExtensions.cs 3 3 100.0% 🟢

Project coverage: 57.8% (299149/517913 lines)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The ownership corrections are consistent and covered by targeted disposal regression tests.

Review effort: Balanced
Findings: None

What changed in this PR

Prevents schema executor disposal during reloads from disposing application-owned singleton services.

Changes:

  • Registers shared caches, error filters, logging, and host lifetime services as non-owned instances.
  • Adds Core, Fusion, and MCP disposal regression tests.
  • Adds a reusable disposal probe for MCP tests.
File Description
FusionDocumentCacheTests.cs Tests Fusion cache ownership.
ErrorFilterTests.cs Tests Fusion error-filter ownership.
HotChocolateFusionServiceCollectionExtensions.cs Prevents schema ownership of document caches.
CoreFusionGatewayBuilderExtensions.ErrorFilter.cs Prevents schema ownership of error filters.
DocumentCacheTests.cs Tests Core cache ownership.
RequestExecutorBuilderExtensions.Caches.cs Corrects Core cache registration ownership.
FusionIntegrationTests.cs Tests MCP behavior across Fusion reloads.
DisposalProbe.cs Signals schema-service disposal in tests.
CoreIntegrationTests.cs Tests MCP behavior across Core eviction.
ServiceCollectionExtensions.cs Forwards root host services without transferring ownership.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tobias-tengler
tobias-tengler force-pushed the fix/mcp-root-logger-factory-disposal branch from 44e65dc to 5dbc2d7 Compare September 29, 2026 14:24
@tobias-tengler
tobias-tengler merged commit 991674b into main Sep 29, 2026
158 checks passed
@tobias-tengler
tobias-tengler deleted the fix/mcp-root-logger-factory-disposal branch September 29, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants