feat: integrate CI runner into single binary
Ports the full anvil-runner functionality from Elixir/Burrito into Rust:
Runner execution:
- anvil runner configure — register with server via registration token
- anvil runner start — polling loop with exponential backoff (5s-30s)
- anvil runner unconfigure — deregister and remove config
- anvil runner status — show runner config
Job execution:
- Docker container execution with workspace mounting
- Bare execution fallback (host shell)
- Streaming log reporter with buffering (100 lines) and 1s flush timer
- Log upload retry (2 retries, 500ms backoff)
- Job timeout support (default 600s)
Infrastructure:
- Service sidecar lifecycle (Docker network, health checks, cleanup)
- Health checks for postgres, redis, mysql, mongo
- Well-known port detection for 8 service types
- Stateful workspaces (no git clean — preserves build caches)
- Heartbeat loop (30s interval)
- Graceful shutdown with 30s grace period (ctrl+c)
- --once and --ephemeral modes
- Workspace cleanup policies (always/never/on-success)
OS service integration:
- macOS: launchd plist (~/Library/LaunchAgents/)
- Linux: systemd unit (user or system)
- install/uninstall/start/stop/status commands
Admin commands (PAT auth) preserved: list/view/update/remove/token
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SHA:
54545c135e3d6eedc3c13d240fa08dea27f86d42
Author:
Cole Christensen <cole.christensen@macmillan.com>
Date:
2026-03-11 02:26
Parents:
c62e1fb
13 files changed
+1728
-12
| Type | ||
|---|---|---|
|
|
Cargo.lock | +69 −0 |
|
||
|
|
Cargo.toml | +4 −1 |
|
||