Skip to content

feat: add gVisor smoke test workflow#6092

Merged
lpcox merged 3 commits into
mainfrom
feat/gvisor-smoke-workflow
Jul 10, 2026
Merged

feat: add gVisor smoke test workflow#6092
lpcox merged 3 commits into
mainfrom
feat/gvisor-smoke-workflow

Conversation

@lpcox

@lpcox lpcox commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a gVisor (runsc) smoke test workflow to validate AWF's compatibility with alternative container runtimes. This is the first of two PRs — it establishes the workflow on main so the second PR can use it to test actual gVisor runtime plumbing in AWF.

What this does

The workflow (smoke-gvisor.md) is triggered via workflow_dispatch or the test-gvisor label on PRs. It:

Pre-agent step: Install gVisor

  1. Downloads runsc and containerd-shim-runsc-v1 from gVisor releases
  2. Registers runsc as a Docker runtime via runsc install
  3. Reloads Docker daemon
  4. Verifies gVisor works with docker run --rm --runtime=runsc hello-world

Agent step: Standard smoke test under gVisor environment

  • GitHub MCP connectivity
  • github.com HTTP connectivity
  • File write/read verification
  • Network isolation check (blocked domain)
  • gVisor runtime detection (/proc/version, dmesg availability)

Post-agent step: Verify gVisor was used

  • Checks agent logs for gVisor runtime indicators
  • Validates safe outputs were invoked

Design notes

  • No sandbox.agent.runtime field yet — the compiler doesn't support this. The second PR will add the AWF-side runtime: field to compose generation, at which point this workflow will actually run the agent container under gVisor.
  • Currently the agent still runs on runc — gVisor is installed and verified, but AWF doesn't yet pass runtime: runsc to Docker Compose. This PR validates the install + registration path works on GitHub-hosted runners.
  • Once the runtime plumbing lands, adding sandbox.agent.runtime: gvisor to this workflow's frontmatter will complete the end-to-end test.

Follow-up (second PR)

  • Add runtime?: string to DockerService interface in src/types/docker.ts
  • Add --container-runtime CLI flag
  • Thread runtime through compose generation
  • Update this workflow to use sandbox.agent.runtime: gvisor

Related: #3264

Adds a new workflow that installs gVisor (runsc), registers it as a
Docker runtime, and runs a standard AWF smoke test to validate
compatibility. This workflow will be used to test gVisor support once
the runtime field is plumbed through AWF's compose generation.

The pre-agent step:
1. Downloads and installs runsc + containerd-shim-runsc-v1
2. Registers runsc in Docker daemon.json via 'runsc install'
3. Verifies gVisor works with a hello-world container

The agent step runs the standard smoke test (MCP, connectivity, file
I/O) and adds a gVisor-specific runtime detection check.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 10, 2026 12:34
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 99.17% 99.22% 📈 +0.05%
Statements 99.13% 99.18% 📈 +0.05%
Functions 99.45% 99.45% ➡️ +0.00%
Branches 95.75% 96.00% 📈 +0.25%
📁 Per-file Coverage Changes (2 files)
File Lines (Before → After) Statements (Before → After)
src/compose-generator.ts 97.6% → 100.0% (+2.39%) 97.6% → 100.0% (+2.39%)
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.

Pull request overview

Adds a new agentic workflow to smoke-test gVisor (runsc) installation/registration on GitHub-hosted runners, as groundwork for a follow-up PR that will wire gVisor runtime selection into AWF’s compose generation.

Changes:

  • Introduces a new smoke-gvisor agentic workflow (workflow_dispatch + PR label trigger) with pre-agent gVisor install/verification steps and an agent prompt for reporting results.
  • Adds a post-agent verification job that downloads the agent artifact and performs basic runtime/log checks plus token-usage sanity validation.
  • Commits the compiled lock workflow (.lock.yml) for deterministic execution.
Show a summary per file
File Description
.github/workflows/smoke-gvisor.md New agentic workflow definition, including gVisor install/verification steps, prompt, and post-agent verification job.
.github/workflows/smoke-gvisor.lock.yml Compiled workflow output generated from smoke-gvisor.md.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 5
  • Review effort level: Low

Comment thread .github/workflows/smoke-gvisor.md

## Context

This workflow validates that AWF's network-isolation mode works correctly when the agent container runs under gVisor (`runsc`) instead of the default `runc` runtime. The pre-agent step installed gVisor and registered it as a Docker runtime.
Comment on lines +5 to +8
label_command:
name: test-gvisor
events: [pull_request]
remove_label: false
Comment on lines +34 to +35
add-labels:
allowed: [smoke-gvisor]
Comment thread .github/workflows/smoke-gvisor.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@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.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@lpcox lpcox merged commit 6034976 into main Jul 10, 2026
21 of 22 checks passed
@lpcox lpcox deleted the feat/gvisor-smoke-workflow branch July 10, 2026 12:43
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.

2 participants