Skip to content

Add Cloud Hypervisor enclave configuration model - #8682

Merged
lpcox merged 4 commits into
mainfrom
cloud-hypervisor-enclave-config
Sep 17, 2026
Merged

lpcox merged 4 commits into
mainfrom
cloud-hypervisor-enclave-config

Conversation

@lpcox

@lpcox lpcox commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add cloud-hypervisor to the trusted enclave runtime types, schemas, parser coverage, and documentation
  • distinguish primary-agent Cloud Hypervisor selection from enclave-only infrastructure requirements
  • preserve primary Docker mounts, TTY, and runtime behavior for enclave-only selections
  • require shared preview, host, and attested-artifact validation for every Cloud Hypervisor workload
  • reject dynamic microVM agents and custom enclave images while keeping static execution behind the ADR 0002 rollout gate
  • prevent unsupported-host Docker fallback whenever an enclave selects Cloud Hypervisor

Rollout behavior

This PR adds configuration recognition only. Static script and static agent entries fail closed before launch until the host executor, role-specific rootfs artifacts, networking, resource parity, and recovery work lands. Primary Cloud Hypervisor plus enclaves also remains behind the runtime-neutral lifecycle integration gate.

Validation

  • npm test -- --runInBand (364 suites, 5900 tests)
  • npm run build
  • commit-hook ESLint

Fixes #8678

Recognize reserved Cloud Hypervisor enclave runtimes and validate shared infrastructure.

Keep execution fail-closed behind the ADR 0002 rollout gates.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: aa4dffa0-b079-4200-8a01-012767f319ba
Copilot AI balanced review requested due to automatic review settings September 17, 2026 02:52
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-8682 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit dbf3b2e

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 94.18% 94.21% 📈 +0.03%
Statements 92.86% 92.88% 📈 +0.02%
Functions 93.47% 93.48% 📈 +0.01%
Branches 86.66% 86.73% 📈 +0.07%
📁 Per-file Coverage Changes (4 files)
File Lines (Before → After) Statements (Before → After)
src/enclave/preflight.ts 90.2% → 90.5% (+0.28%) 90.7% → 91.0% (+0.26%)
src/cloud-hypervisor/runtime-validation.ts 98.0% → 98.5% (+0.45%) 98.0% → 98.5% (+0.45%)
src/enclave/runtime-preflight.ts 64.7% → 66.7% (+1.96%) 66.7% → 68.4% (+1.76%)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

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

🟡 Changes recommended

Schema descriptions remain contradictory, and required mixed-runtime test coverage is missing.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity · 2 Low severity

Open (3)
What changed in this PR

Adds reserved Cloud Hypervisor enclave configuration while keeping execution fail-closed behind ADR 0002 gates.

Changes:

  • Extends enclave types, schemas, parsing, validation, and documentation.
  • Separates primary-agent selection from enclave infrastructure requirements.
  • Prevents fallback and rejects unsupported dynamic agents and image overrides.
File Description
src/​types/​runtime-options.ts Documents shared runtime configuration.
src/​types/​enclave-options.ts Adds the enclave runtime type.
src/​parsers/​enclave-parser.test.ts Tests parsing and schema acceptance.
src/​enclave/​runtime-preflight.ts Adds the terminal rollout gate.
src/​enclave/​runtime-preflight.test.ts Tests fail-closed behavior.
src/​enclave/​preflight.ts Rejects unsupported configurations.
src/​enclave/​preflight.test.ts Tests static and invalid entries.
src/​commands/​validators/​config-assembly.ts Applies shared validation and fallback rules.
src/​commands/​validators/​config-assembly-api-proxy.test.ts Tests unsupported-host behavior.
src/​cloud-hypervisor/​runtime-validation.ts Adds runtime-selection helpers.
src/​cloud-hypervisor/​runtime-validation.test.ts Tests enclave-only selection.
src/​cloud-hypervisor-runtime-backend.env-mapping.test.ts Updates validation expectations.
src/​awf-config-schema.json Adds the generated runtime enum.
docs/​enclaves-architecture.md Documents rollout restrictions.
docs/​awf-config.schema.json Adds the canonical schema enum.
docs/​awf-config-spec.md Documents enclave-only configuration.

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

Comment on lines +27 to +30
return Boolean(
(executors?.script.enabled && executors.script.runtime === 'cloud-hypervisor')
|| (executors?.agent.enabled && executors.agent.runtime === 'cloud-hypervisor'),
);
"gvisor",
"sbx"
"sbx",
"cloud-hypervisor"
"gvisor",
"sbx"
"sbx",
"cloud-hypervisor"
@lpcox
lpcox requested a balanced review from Copilot September 17, 2026 03:10
@lpcox

lpcox commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply the suggestion exactly.

Do not make changes beyond what is described in the linked review thread.

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

🔵 Needs a closer look

Public schema descriptions still incorrectly state that Cloud Hypervisor requires primary-agent runtime selection.

Review effort: Balanced
Findings: 1 Medium severity · 2 Low severity

Open (3)

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, app...

Addressed in ecd6646 (following d2b96e0 and 837621c): added both mixed-runtime cases and corrected/regenerated the schema descriptions.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@lpcox Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@lpcox
lpcox merged commit 703c699 into main Sep 17, 2026
29 of 30 checks passed
@lpcox
lpcox deleted the cloud-hypervisor-enclave-config branch September 17, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add cloud-hypervisor to the enclave configuration model

3 participants