Skip to content

feat(agent): add configurable static helper image for volume ops#769

Merged
skevetter merged 1 commit into
mainfrom
proud-blowfish
Jul 27, 2026
Merged

feat(agent): add configurable static helper image for volume ops#769
skevetter merged 1 commit into
mainfrom
proud-blowfish

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

Summary

Adds a purpose-built agent-helper container image as a much smaller alternative to busybox for agent volume operations (population/cleanup), and makes the helper image reference easily configurable so users can stay on busybox or point at a custom image.

  • images/agent-helper/ — a single static Zig binary in a FROM scratch image (~130 KB/arch vs ~4.45 MB for busybox:latest). Implements just populate (stdin → file, chmod 0755) and clean (idempotent unlink) via raw Linux syscalls.
  • hack/agent_helper_image/ — Go tool that cross-compiles the helper for amd64/arm64 (matches the repo's go run ./hack/... convention).
  • .github/workflows/publish-agent-helper.yml — builds a multi-arch manifest and publishes to ghcr.io/<owner>/agent-helper on release/dispatch; PRs touching the image build-only. Uses the GitHub App token, actions pinned by SHA. Version is auto-resolved (release tag → latest git tag), with an optional dispatch override.
  • Configurable helper image — consolidated the previously-duplicated busybox:latest literal into config.DefaultHelperImage + a config.HelperImage() resolver. Precedence: explicit config/flag → DEVSY_HELPER_IMAGE env → default.

Notes

  • Default is unchanged (busybox:latest). The custom image can't become the default until the shell-based call sites (sh -c 'cat > …', version detect, rm -f) are ported to the helper's populate/clean subcommands — that cutover is a deliberate follow-up.
  • The publish workflow assumes GHCR and that the existing GitHub App has packages: write on this repo.

Verification

  • go build ./..., go vet, gofmt clean; affected package tests pass (added pkg/config/helper_test.go covering the resolver precedence).
  • Zig helper cross-compiles both arches; the FROM scratch image builds and passes populate/clean smoke tests locally.

Add a purpose-built agent-helper image (Zig, FROM scratch, ~130 KB) as a
smaller alternative to busybox for agent volume population/cleanup, plus a
publish workflow and Go build tool.

Consolidate the helper image reference into a single configurable source:
config.HelperImage resolves explicit config/flag, then DEVSY_HELPER_IMAGE,
then config.DefaultHelperImage. Default remains busybox until the shell-based
call sites are ported to the helper's subcommands.
@netlify

netlify Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit c891458
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a66922bf9cb370008909223

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@skevetter, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 89d7affc-1cad-4bd6-ad60-893668e92324

📥 Commits

Reviewing files that changed from the base of the PR and between 111d220 and c891458.

📒 Files selected for processing (12)
  • .github/workflows/publish-agent-helper.yml
  • cmd/internal/agentworkspace/clean.go
  • hack/agent_helper_image/main.go
  • images/agent-helper/.gitignore
  • images/agent-helper/Dockerfile
  • images/agent-helper/README.md
  • images/agent-helper/helper.zig
  • pkg/agent/delivery/local_docker.go
  • pkg/config/env.go
  • pkg/config/helper.go
  • pkg/config/helper_test.go
  • pkg/provider/provider.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit c891458
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a66922be9c5fe0008b52638

@skevetter
skevetter marked this pull request as ready for review July 27, 2026 02:17
@skevetter
skevetter merged commit 50e858d into main Jul 27, 2026
66 checks passed
@skevetter
skevetter deleted the proud-blowfish branch July 27, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant