Repository navigation
Refactor enclave MCP service into focused executor modules - #11704
Merged
Merged
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
lpcox
marked this pull request as ready for review
November 16, 2026 21:50
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The Cloud Hypervisor workflow’s stale path filter skips changes limited to the extracted modules, and its deterministic test list omits the new topology and script tests.
1 open issue
What changed in this PR
Refactors enclave MCP service construction into focused modules, leaving the main service responsible for assembly while preserving existing exports and test helpers.
Changes:
- Extract executor validation and runtime compatibility checks.
- Separate script setup from agent image, proxy, and environment construction.
- Add focused tests for extracted modules and shared assembly behavior.
| File | Description |
|---|---|
src/services/enclave-mcp-service.ts |
Delegate executor construction while retaining server assembly and compatibility exports. |
src/services/enclave-mcp-service.test.ts |
Verify helper exports and combined executor contributions. |
src/services/enclave-mcp-script-service.ts |
Isolate script image setup, resource settings, and dependencies. |
src/services/enclave-mcp-script-service.test.ts |
Cover script runtime branches and preservation of shared state. |
src/services/enclave-mcp-executor-topology.ts |
Centralize executor validation and runtime restrictions. |
src/services/enclave-mcp-executor-topology.test.ts |
Cover runtime combinations, disabled roles, and validation failures. |
src/services/enclave-mcp-agent-service.ts |
Isolate agent image setup, proxy credential filtering, and environment assembly. |
Review effort: Max (adaptive)
Comment on lines
+43
to
+44
| if (cloudHypervisorExecutor && containerExecutor) { | ||
| throw new Error('Cloud Hypervisor enclaves cannot be mixed with container enclave runtimes'); |
Collaborator
Author
|
@copilot address review feedback |
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Contributor
Updated the workflow filter and deterministic test list in |
Contributor
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
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.

buildEnclaveMcpServicemixed runtime validation, environment assembly, and security-sensitive service construction. This refactor separates those responsibilities, reducing the main module from 619 to 339 lines.enclaveMcpServiceTestHelpers; pass shared assembly state explicitly.