Skip to content

feat: end-to-end working runtime with embedded dependencies - #4

Merged
luthermonson merged 5 commits into
mainfrom
feat/p0-e2e-runtime
Apr 5, 2026
Merged

feat: end-to-end working runtime with embedded dependencies#4
luthermonson merged 5 commits into
mainfrom
feat/p0-e2e-runtime

Conversation

@luthermonson

Copy link
Copy Markdown
Contributor

Summary

  • Single binary boots containerd in-process and runs GitHub Actions jobs end-to-end
  • Embeds containerd-shim-runc-v2, runc, and CNI plugins (downloaded at build time, extracted on startup)
  • Defaults to ghcr.io/actions/actions-runner:latest — no image config needed for Linux jobs
  • Custom EPHEMERD-FORWARD iptables chain avoids conflicts with Podman/Netavark
  • Auto-detects host MTU for container bridge (fixes WSL2 networking)
  • Configurable subnet via [network] subnet in TOML config
  • Generates container resolv.conf with public DNS, filtering unreachable private IPs
  • Serializes concurrent image pulls to avoid content store contention
  • Replaces hand-rolled YAML parser with yaml.Unmarshal for EPHEMERD_IMAGE lookup

Test plan

  • Built and ran on WSL2 Linux host
  • Triggered test-runner.yml via workflow_dispatch
  • Job completed successfully in 28 seconds
  • Runner registered, executed all steps, deregistered, container destroyed
  • Test on bare metal Linux (non-WSL2)
  • Test concurrent jobs

🤖 Generated with Claude Code

luthermonson and others added 5 commits April 5, 2026 12:50
Single binary that boots containerd in-process, provisions ephemeral
containers, and runs GitHub Actions jobs to completion.

Embedding:
- Embed containerd-shim-runc-v2 and runc, extracted next to binary on startup
- Embed CNI plugins (bridge, host-local, portmap), extracted to data dir
- Register containerd builtin plugins via blank import

Runtime:
- Default to ghcr.io/actions/actions-runner:latest (runner pre-installed)
- Custom images via EPHEMERD_IMAGE get embedded runner mounted in
- Per-job hardlink copy of runner dir for concurrent write safety
- Serialize image pulls with mutex to avoid content store contention

Networking:
- Custom EPHEMERD-FORWARD iptables chain (avoids CNI/Netavark conflicts)
- Auto-detect host MTU for bridge (fixes WSL2 1420 MTU)
- Configurable subnet via [network] subnet in TOML (default 10.89.0.0/16)
- Generate resolv.conf with public DNS, filtering unreachable private IPs
- DNS (port 53) allowed through firewall before private range deny rules

GitHub integration:
- Replace hand-rolled YAML parser with proper yaml.Unmarshal
- Add debug logging to poll loop for visibility
- Use gopkg.in/yaml.v3 (already an indirect dep)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
go:embed directives need the shim, runner, and CNI binaries present
even for go vet and golangci-lint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…age)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant