Add preview Cloud Hypervisor runtime support for sandbox.agent.runtime with docker-sbx parity - #52119
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
sandbox.agent.runtime with docker-sbx parity
PR Triage: #52119
Automated triage — see labels for machine-readable classification.
|
|
@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.
|
There was a problem hiding this comment.
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, andawf-supervisor), not for the tarball or manifest. This loop therefore always reports a missing entry; it also runssha256sum -coutsidebundle_root. Extract first, then verify the extracted files fromextract_diragainst 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
| 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" |
| 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) { |
| } 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) { |
| // 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) { |
| 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)") |
| 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)") |
The branch already contains the current |
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Addressed the identified Cloud Hypervisor compatibility issues in |
gh-awpreviously had no native path for AWF microVM runtimes beyonddocker-sbx/gvisorhandling. This change introduces first-classcloud-hypervisorsupport as a preview runtime and wires compiler output to AWF’s release-asset-based artifact + digest flow.Runtime surface + schema
sandbox.agent.runtime: cloud-hypervisoras a valid compiler/runtime enum./dev/kvm).Compiler-generated Cloud Hypervisor setup
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
--container-runtime cloud-hypervisor--cloud-hypervisor-preview--cloud-hypervisor-{binary,kernel,rootfs,supervisor}--cloud-hypervisor-*-sha256manifest.json/SHA256SUMS(not hardcoded ingh-aw).Parity integration points
cloud-hypervisor, consistent with existing microVM runtime expectations.runner.topology: arc-dind; enforce AWF container-runtime version gate).Focused tests
cloud_hypervisor-specific unit coverage for step generation order, AWF arg/config rendering, validation, and frontmatter compilation.