Repository navigation
Extract backend-neutral enclave execution policy and lifecycle - #10342
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The security-sensitive lifecycle and recovery refactor needs maintainer review and confirmed backend regression results.
1 open issue
What changed in this PR
Extracts reusable enclave execution policy and lifecycle machinery from Cloud Hypervisor, keeping backend-specific confinement and resource management in its adapter.
Changes:
- Adds shared policy, input staging, bounded results, and storage contracts.
- Extracts host-service lifecycle coordination and separates trusted transport routing from backend identity.
- Adds regression coverage and documents adapter boundaries; Docker migration and NVX enablement remain out of scope.
| File | Description |
|---|---|
src/enclave/invocation-staging.ts |
Shared private input staging. |
src/enclave/invocation-staging.test.ts |
Staging and credential-isolation coverage. |
src/enclave/invocation-result.ts |
Bounded canonical result validation. |
src/enclave/invocation-result.test.ts |
Result bounds and unsafe-file coverage. |
src/enclave/host-service.ts |
Shared authenticated service startup. |
src/enclave/host-service.test.ts |
Startup ordering and failure coverage. |
src/enclave/host-executor-run-state.ts |
Trusted static run-state derivation. |
src/enclave/host-executor-routing.test.ts |
Transport routing and authority checks. |
src/enclave/host-executor-lifecycle.ts |
Shared ownership, readiness, and draining. |
src/enclave/host-executor-lifecycle.test.ts |
Lifecycle races and recovery coverage. |
src/enclave/execution-policy.ts |
Shared resource policies and identities. |
src/enclave/execution-policy.test.ts |
Policy and storage-contract coverage. |
src/enclave/cloud-hypervisor-lifecycle.ts |
Delegates shared lifecycle coordination. |
src/enclave/cloud-hypervisor-lifecycle.test.ts |
Backend-neutral run-state comparison. |
src/enclave/cloud-hypervisor-host-service.ts |
Uses shared service startup. |
src/enclave/bounded-storage.ts |
Defines storage verification contracts. |
src/cloud-hypervisor/workload-profile.ts |
Reuses shared policies and identities. |
src/cloud-hypervisor/host-enclave-executor.ts |
Reuses policy and result validation. |
src/cloud-hypervisor/enclave-invocation-staging.ts |
Delegates shared staging and verification. |
src/cloud-hypervisor/enclave-executor-types.ts |
Re-exports shared agent policy. |
docs/enclaves-architecture.md |
Documents shared core and adapter boundaries. |
containers/enclave/mcp-server/server.js |
Selects runners by trusted transport. |
containers/enclave/mcp-server/host-executor-runner.js |
Adds backend-independent routing predicate. |
containers/enclave/mcp-server/config.js |
Marks trusted host transport explicitly. |
Review effort: Max
| /** Must verify recovery journals after draining the backend. */ | ||
| drain(): Promise<boolean>; |
|
@copilot address review feedback |
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
|
✅ Copilot review passed with no inline comments. @copilot Add the |
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 2f31e67 |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (5 files)
✨ New Files (7 files)
Coverage comparison generated by |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
✅ Smoke Claude passed
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request... |
|
🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request... |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
Cloud Hypervisor + Copilot smoke test
|
|
Smoke test (Copilot)
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
Smoke services: Redis PING ✅ | pg_isready ✅ | psql SELECT 1 ✅ — PASS
|
🔄 Smoke Test: Copilot BYOK (Direct)✅ GitHub MCP - Verified PR data matches Status: PASS (Direct BYOK mode via
|
|
OTEL smoke test (re-run locally)
|
|
EGRESS_RESULT allow=pass deny=pass
|
Smoke Test
|
Chroot Version Comparison
Node.js differs, so the
|
Security Review: Executor Type Detection RefactoringFinding 1: Potential Logic Regression in
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — PASS Notes: Bun/Deno installed via npm (curl installers were not permitted); .NET needed
|

Extract reusable execution policy and lifecycle machinery from Cloud Hypervisor while preserving its protocol, settlement semantics, and backend-specific confinement guarantees.