Repository navigation
Load enclave Copilot native addons from a sealed image runtime - #10940
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Cleanup can mask container startup errors and leave privileged test resources behind, while post-copy permission sealing duplicates image contents, increasing image size and uncached pull time.
2 open issues
What changed in this PR
Moves enclave Copilot native addons into a sealed image runtime to address #10939 without relaxing Docker’s writable-storage noexec restrictions.
Changes:
- Extract and seal the pinned Copilot distribution during image builds.
- Configure the runtime path for Docker and Cloud Hypervisor, including the explicit guest environment.
- Add native-loading regression checks and document the runtime layout.
| File | Description |
|---|---|
tests/integration/enclave-copilot-native-load.test.ts |
Adds opt-in Copilot startup and executable-mapping checks under production restrictions. |
src/enclave/image-layout.test.ts |
Checks runtime extraction, selection, and sealing commands. |
src/cloud-hypervisor/host-enclave-executor.test.ts |
Checks the runtime path in the guest environment. |
src/cloud-hypervisor/enclave-invocation-staging.ts |
Passes the sealed runtime path to the guest. |
docs/enclaves-architecture.md |
Documents the immutable runtime and writable-storage constraints. |
containers/enclave/Dockerfile |
Extracts and seals Copilot’s runtime and configures its loader path. |
containers/enclave/agent-executor/enclave-runner-spec.js |
Updates the /agent storage description in a comment. |
containers/cloud-hypervisor/Dockerfile |
Configures and seals the copied Copilot runtime. |
Review effort: Max (auto)
| && chown -R 0:0 /usr/local/lib/node_modules/@github/copilot \ | ||
| && chmod -R a+rX,a-w /usr/local/lib/node_modules/@github/copilot \ |
Ensure container removal only if it exists. Co-authored-by: Copilot Autofix powered by AI <[email protected]>
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
@copilot address review feedback |
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 3319a44 |
Addressed in |
✅ Coverage Check PassedOverall Coverage
Coverage comparison generated by |
|
@copilot fix this failing ci check. make sure 'npm test' has no failures |
Fixed in |

Copilot 1.0.77 extracts native addons into invocation HOME, conflicting with Docker’s deliberately
noexecwritable storage and likely causing the reported mapping failure.COPILOT_CLI_DIST_DIR./agentand/tmpnoexec; leave runtime security controls unchanged.EPERM.