Skip to content

Add preview Cloud Hypervisor runtime support for sandbox.agent.runtime with docker-sbx parity - #52119

Merged
lpcox merged 6 commits into
mainfrom
copilot/add-cloud-hypervisor-support
Aug 11, 2026
Merged

Add preview Cloud Hypervisor runtime support for sandbox.agent.runtime with docker-sbx parity#52119
lpcox merged 6 commits into
mainfrom
copilot/add-cloud-hypervisor-support

Conversation

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

gh-aw previously had no native path for AWF microVM runtimes beyond docker-sbx/gvisor handling. This change introduces first-class cloud-hypervisor support as a preview runtime and wires compiler output to AWF’s release-asset-based artifact + digest flow.

  • Runtime surface + schema

    • Added sandbox.agent.runtime: cloud-hypervisor as a valid compiler/runtime enum.
    • Updated schema/editor/docs to reflect preview status and strict host scope (GitHub-hosted Ubuntu x86_64 + /dev/kvm).
  • Compiler-generated Cloud Hypervisor setup

    • Added a host eligibility preflight step for the supported environment.
    • Added bundle provisioning that downloads AWF release assets (cloud-hypervisor-test-x86_64.tar.gz, SHA256SUMS, manifest.json), verifies checksums, resolves artifact paths/digests, and exports them for AWF invocation.
  • AWF invocation templating

    • Emits Cloud Hypervisor runtime flags:
      • --container-runtime cloud-hypervisor
      • --cloud-hypervisor-preview
      • --cloud-hypervisor-{binary,kernel,rootfs,supervisor}
      • --cloud-hypervisor-*-sha256
    • Digest/path values are sourced from release manifest.json/SHA256SUMS (not hardcoded in gh-aw).
  • Parity integration points

    • Extended microVM-aware behavior (network/isolation/domain routing and MCP gateway host routing) to include cloud-hypervisor, consistent with existing microVM runtime expectations.
    • Added runtime validation guards (e.g., reject runner.topology: arc-dind; enforce AWF container-runtime version gate).
  • Focused tests

    • Added cloud_hypervisor-specific unit coverage for step generation order, AWF arg/config rendering, validation, and frontmatter compilation.
    • Added shell-script content assertions for the new setup/preflight scripts.
sandbox:
  agent:
    id: awf
    runtime: cloud-hypervisor
    version: v0.28.0

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 12.5 AIC · ⌖ 3.4 AIC · ⊞ 8.5K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 7.47 AIC · ⌖ 11.6 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Copilot AI and others added 2 commits August 11, 2026 17:49
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Add native Cloud Hypervisor sandbox runtime support Add preview Cloud Hypervisor runtime support for sandbox.agent.runtime with docker-sbx parity Aug 11, 2026
Copilot AI requested a review from lpcox August 11, 2026 17:53
@lpcox
lpcox marked this pull request as ready for review August 11, 2026 18:33
Copilot AI balanced review requested due to automatic review settings August 11, 2026 18:33
@github-actions

Copy link
Copy Markdown
Contributor

PR Triage: #52119

  • Category: feature
  • Risk: high
  • Priority score: 50/100 (impact 20/50, urgency 10/30, quality 20/20) → medium
  • Recommended action: defer

Automated triage — see labels for machine-readable classification.

Generated by 🔧 PR Triage Agent · auto · 45 AIC · ⌖ 2.09 AIC · ⊞ 7.8K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

No failed checks were reported in the compact candidate set for this run.
Branch update was requested by sous-chef in run https://github.com/github/gh-aw/actions/runs/31523880210.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 12.5 AIC · ⌖ 3.4 AIC · ⊞ 8.5K ·
Comment /souschef to run again

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.

Pull request overview

Adds preview Cloud Hypervisor support as an AWF agent runtime, spanning provisioning, compiler output, validation, observability, and documentation.

Changes:

  • Adds runtime validation, setup steps, artifact flags, and microVM routing behavior.
  • Extends schema, editor autocomplete, logs/audit filters, and documentation.
  • Adds focused compiler and shell-content tests.
Show a summary per file
File Description
pkg/workflow/sandbox.go Defines the runtime enum.
pkg/workflow/sandbox_validation.go Adds compatibility validation.
pkg/workflow/nodejs.go Adds setup steps and CLI staging.
pkg/workflow/mcp_setup_gateway.go Extends microVM gateway routing.
pkg/workflow/firewall.go Adds runtime detection and isolation behavior.
pkg/workflow/compiler_yaml_step_lifecycle.go Records the runtime in metadata.
pkg/workflow/codex_engine.go Integrates Codex installation.
pkg/workflow/cloud_hypervisor_test.go Adds focused runtime tests.
pkg/workflow/cloud_hypervisor_install.go Generates provisioning steps.
pkg/workflow/claude_engine.go Stages Claude for the microVM.
pkg/workflow/awf_config.go Extends AWF configuration generation.
pkg/workflow/awf_command_builder.go Emits Cloud Hypervisor flags.
pkg/parser/schemas/main_workflow_schema.json Adds the schema enum.
pkg/cli/logs_orchestrator_filters.go Updates runtime filter documentation.
pkg/cli/logs_models.go Documents runtime metadata.
pkg/cli/logs_command.go Advertises the logs filter value.
pkg/cli/audit.go Advertises the audit filter value.
docs/src/content/docs/reference/glossary.md Defines the runtime.
docs/src/content/docs/reference/frontmatter-full.md Documents frontmatter usage.
docs/src/content/docs/reference/agent-runtimes.md Adds selection and setup guidance.
docs/src/content/docs/introduction/architecture.mdx Adds the runtime architecture.
docs/public/editor/autocomplete-data.json Adds editor autocomplete.
actions/setup/sh/cloud_hypervisor_setup_bundle.sh Downloads and resolves artifacts.
actions/setup/sh/cloud_hypervisor_host_preflight.sh Validates host eligibility.

Review details

Suppressed comments (2)

actions/setup/sh/cloud_hypervisor_setup_bundle.sh:39

  • The published SHA256SUMS contains entries for the four extracted files (cloud-hypervisor, vmlinux.bin, rootfs.ext4, and awf-supervisor), not for the tarball or manifest. This loop therefore always reports a missing entry; it also runs sha256sum -c outside bundle_root. Extract first, then verify the extracted files from extract_dir against the release checksum file.
for required_file in "${asset_name}" "manifest.json"; do
  if ! grep -Eq "(^|[[:space:]])(\./)?${required_file}$" "${bundle_root}/SHA256SUMS"; then

actions/setup/sh/cloud_hypervisor_setup_bundle.sh:117

  • The canonical AWF manifest has metadata such as cloudHypervisor.binarySha256, but it does not contain any artifact path objects, so all four queries return empty and the script exits at line 134. The release tar contract uses fixed filenames; resolve those names and obtain their digests from SHA256SUMS.
binary_rel="$(pick_first_query "${manifest_path}" \
  '.cloud_hypervisor.binary.path' \
  '.cloudHypervisor.binary.path' \
  '.artifacts.cloud_hypervisor.binary.path' \
  '.files[] | select((.role // .name // "") | test("binary"; "i")) | .path' || true)"
  • Files reviewed: 24/24 changed files
  • Comments generated: 7
  • Review effort level: Balanced

Comment on lines +31 to +33
curl -fsSL -o "${bundle_root}/${asset_name}" "${asset_base_url}/${asset_name}"
curl -fsSL -o "${bundle_root}/SHA256SUMS" "${asset_base_url}/SHA256SUMS"
curl -fsSL -o "${bundle_root}/manifest.json" "${asset_base_url}/manifest.json"
Comment thread pkg/workflow/sandbox_validation.go Outdated
if firewallConfig != nil {
configuredVersion = firewallConfig.Version
}
if !versionAtLeast(configuredVersion, string(constants.DefaultFirewallVersion), string(constants.AWFContainerRuntimeMinVersion)) {
} else if config.WorkflowData != nil && config.WorkflowData.ServicePortExpressions != "" {
awfHelpersLog.Print("Skipping --allow-host-service-ports: requires legacy-security mode")
}
if isCloudHypervisorRuntime(config.WorkflowData) {
Comment thread pkg/workflow/awf_command_builder.go Outdated
} else if isDockerSbxRuntime(config.WorkflowData) {
awfHelpersLog.Printf("Skipping --container-runtime sbx: AWF version %q is older than required minimum %s", getAWFImageTag(firewallConfig), constants.AWFContainerRuntimeMinVersion)
}
if isCloudHypervisorRuntime(config.WorkflowData) && awfSupportsContainerRuntime(firewallConfig) {
Comment thread pkg/workflow/awf_config.go Outdated
// policy permits connections from the microVM to the api-proxy, MCP gateway, and
// Squid proxy that are all published on the host bridge.
if isDockerSbxRuntime(config.WorkflowData) {
if isDockerSbxRuntime(config.WorkflowData) || isCloudHypervisorRuntime(config.WorkflowData) {
Comment thread pkg/cli/logs_command.go
addOutputFlag(logsCmd, defaultLogsOutputDir)
addEngineFilterFlag(logsCmd)
logsCmd.Flags().String("runtime", "", "Filter to runs using a specific sandbox agent runtime (e.g., gvisor, docker-sbx)")
logsCmd.Flags().String("runtime", "", "Filter to runs using a specific sandbox agent runtime (e.g., gvisor, docker-sbx, cloud-hypervisor)")
Comment thread pkg/cli/audit.go
cmd.Flags().String("experiment", "", "Filter to runs that include this experiment name")
cmd.Flags().String("variant", "", "Filter to runs with a specific variant value (requires --experiment)")
cmd.Flags().String("runtime", "", "Filter to runs using a specific sandbox agent runtime (e.g., gvisor, docker-sbx)")
cmd.Flags().String("runtime", "", "Filter to runs using a specific sandbox agent runtime (e.g., gvisor, docker-sbx, cloud-hypervisor)")

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

No failed checks were reported in the compact candidate set for this run....

The branch already contains the current main tip (3b4ef7e), so no update was needed. Verified local make fmt, make lint, make test-unit, make test, and make recompile all pass. The latest Copilot review run completed successfully; CI on the existing head remains the last-known result.

Copilot AI requested a review from gh-aw-bot August 11, 2026 19:02
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

Unresolved review threads to address (newest first):

No failed checks were reported in the compact candidate set for this run.

Branch update was requested by sous-chef in run https://github.com/github/gh-aw/actions/runs/31527012599.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 7.47 AIC · ⌖ 11.6 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

Unresolved review threads to address (newest first):...

Addressed the identified Cloud Hypervisor compatibility issues in cf46ddd: corrected release assets/checksums, enforced AWF v0.28.0+, removed unsupported mounts/TTY/MCP topology routing, and accepted the runtime in shared logs/audit validation. Scoped validation passes.

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.

Add native Cloud Hypervisor sandbox runtime support (parity with docker-sbx)

4 participants