Agent-tools OCI images + registry CI pipeline #203

Closed
opened 2026-07-22 11:43:49 +02:00 by dominik.polakovics · 1 comment

What to build

Per-provider agent-tools images that get injected (via podman run --mount type=image) into ANY user-chosen dev image. Each image ships /opt/lab/bin with: the provider CLI as a self-contained bundle (own runtime/loader — must run on glibc and musl base images), a fully static labctl, and any static helpers. Containerfiles + build scripts live in this repo; a CI workflow builds and pushes digest-pinned tags (e.g. agent-tools:claude-<ver>) to the Forgejo registry at git.cloonar.com. Registry write token is an operator-provisioned CI secret (FORGE_REGISTRY_TOKEN); the workflow must fail with a clear message when it is absent.

Include an injection smoke test: podman build the tools image locally, then mount it into stock debian:stable-slim and alpine containers and run claude --version / codex --version / labctl --help.

Acceptance criteria

  • Containerfiles + scripts produce per-provider tools images pinned to the catalog versions (claude, codex; gemini when its adapter lands)
  • Injected CLIs run in both glibc (debian) and musl (alpine) base images without using the base image's libc
  • labctl in the image is statically linked
  • CI workflow pushes digest-pinned tags to the Forgejo registry; smoke test runs in CI via local build (no push) on PRs
  • Image contents and tagging scheme documented in docs/ops.md

Blocked by

None - can start immediately

## What to build Per-provider `agent-tools` images that get injected (via `podman run --mount type=image`) into ANY user-chosen dev image. Each image ships `/opt/lab/bin` with: the provider CLI as a self-contained bundle (own runtime/loader — must run on glibc and musl base images), a fully static labctl, and any static helpers. Containerfiles + build scripts live in this repo; a CI workflow builds and pushes digest-pinned tags (e.g. `agent-tools:claude-<ver>`) to the Forgejo registry at git.cloonar.com. Registry write token is an operator-provisioned CI secret (`FORGE_REGISTRY_TOKEN`); the workflow must fail with a clear message when it is absent. Include an injection smoke test: `podman build` the tools image locally, then mount it into stock `debian:stable-slim` and `alpine` containers and run `claude --version` / `codex --version` / `labctl --help`. ## Acceptance criteria - [ ] Containerfiles + scripts produce per-provider tools images pinned to the catalog versions (claude, codex; gemini when its adapter lands) - [ ] Injected CLIs run in both glibc (debian) and musl (alpine) base images without using the base image's libc - [ ] labctl in the image is statically linked - [ ] CI workflow pushes digest-pinned tags to the Forgejo registry; smoke test runs in CI via local build (no push) on PRs - [ ] Image contents and tagging scheme documented in docs/ops.md ## Blocked by None - can start immediately
Author
Owner

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: Per-provider agent-tools OCI images (self-contained CLI + static labctl under /opt/lab/bin) with a Forgejo Actions pipeline that pushes digest-pinned tags to the git.cloonar.com registry.

The issue body's "What to build" and acceptance-criteria checklist are the authoritative spec (grilled 2026-07-22). This brief adds the interface map, the operator prerequisites, and scope fences.

Current behavior:
No Containerfile or OCI tooling exists anywhere in the repo (the nix-flake ADR explicitly deferred OCI); provider CLIs are installed on the host and found on PATH.

Desired behavior:
Per the issue body: Containerfiles + build scripts in-repo producing per-provider tools images; contents run injected into arbitrary glibc and musl base images without touching the base libc; CI builds and pushes digest-pinned tags on the release path, and on PRs does a local build plus the debian/alpine injection smoke test with no push.

Key interfaces:

  • The provider version catalog (pinned CLI versions) — image tags must derive from it, e.g. agent-tools:claude-<ver>.
  • labctl's build — needs a fully static build target (no cgo / no dynamic libc) for the image copy.
  • The injection contract consumed by the runner (#205): everything under /opt/lab/bin, mounted via podman run --mount type=image, PATH-prepended; binaries ship their own runtime/loader.
  • The CI workflow: push jobs gated on the FORGE_REGISTRY_TOKEN secret and failing with an explicit, actionable message when it is absent.

Operator prerequisites (human, not the agent):

  • Provision FORGE_REGISTRY_TOKEN as a CI secret with registry write access.
  • Confirm the CI runner can execute rootless podman builds. The lab agent sandbox cannot run podman, so CI is the only verification loop for this issue — if the runner can't run podman either, stop and flag the issue back for re-triage instead of shipping unverified.

Acceptance criteria: the checklist in the issue body.

Out of scope:

  • The container runner that consumes the images (#205) and dev-image selection (#207).
  • A gemini tools image until the gemini adapter (#126) lands — leave the seam, don't build the image.
  • Host packaging changes; host CLI installs remain until #206 retires them.
> *This was generated by AI during triage.* ## Agent Brief **Category:** enhancement **Summary:** Per-provider agent-tools OCI images (self-contained CLI + static labctl under /opt/lab/bin) with a Forgejo Actions pipeline that pushes digest-pinned tags to the git.cloonar.com registry. The issue body's "What to build" and acceptance-criteria checklist are the authoritative spec (grilled 2026-07-22). This brief adds the interface map, the operator prerequisites, and scope fences. **Current behavior:** No Containerfile or OCI tooling exists anywhere in the repo (the nix-flake ADR explicitly deferred OCI); provider CLIs are installed on the host and found on PATH. **Desired behavior:** Per the issue body: Containerfiles + build scripts in-repo producing per-provider tools images; contents run injected into arbitrary glibc and musl base images without touching the base libc; CI builds and pushes digest-pinned tags on the release path, and on PRs does a local build plus the debian/alpine injection smoke test with no push. **Key interfaces:** - The provider version catalog (pinned CLI versions) — image tags must derive from it, e.g. `agent-tools:claude-<ver>`. - labctl's build — needs a fully static build target (no cgo / no dynamic libc) for the image copy. - The injection contract consumed by the runner (#205): everything under `/opt/lab/bin`, mounted via `podman run --mount type=image`, PATH-prepended; binaries ship their own runtime/loader. - The CI workflow: push jobs gated on the `FORGE_REGISTRY_TOKEN` secret and failing with an explicit, actionable message when it is absent. **Operator prerequisites (human, not the agent):** - Provision `FORGE_REGISTRY_TOKEN` as a CI secret with registry write access. - Confirm the CI runner can execute rootless podman builds. The lab agent sandbox cannot run podman, so CI is the only verification loop for this issue — if the runner can't run podman either, stop and flag the issue back for re-triage instead of shipping unverified. **Acceptance criteria:** the checklist in the issue body. **Out of scope:** - The container runner that consumes the images (#205) and dev-image selection (#207). - A gemini tools image until the gemini adapter (#126) lands — leave the seam, don't build the image. - Host packaging changes; host CLI installs remain until #206 retires them.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cloonar/coding-lab#203
No description provided.