Skip to content

build: add the runner volume image - #619

Merged
aprajitaarora13 merged 1 commit into
mainfrom
aprajitaarora/prebuilt-1-runner-volume-image
Nov 17, 2026
Merged

aprajitaarora13 merged 1 commit into
mainfrom
aprajitaarora/prebuilt-1-runner-volume-image

Conversation

@aprajitaarora13

@aprajitaarora13 aprajitaarora13 commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Adds Dockerfile.runner-volume, a FROM scratch image that holds only the static ax-task-runner binary. It is never run as a container: Agent Substrate mounts it read-only into a task's container as an image volume (wired up in the next PR). Agent images can then stay pure, and a runner update means changing one digest instead of rebuilding every agent image.

  • make images now also builds and pushes the runner volume image and records its digest in bin/ax-runner-volume.digest.
  • make push-runner-volume builds and pushes only that image.

There is no release workflow on main yet. Publishing the digest from CI can follow once the release-images workflow lands.

Part of #493.

Stack (review in order):

  1. This PR: runner volume image
  2. Mount the runner from the volume
  3. Hand the task to the image's launcher as files
  4. E2E: a pure image with a launcher on the mounted runner

@mayawang mayawang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Add Dockerfile.runner-volume, a FROM-scratch image that holds only the
static ax-task-runner binary. It is never run as a container: Agent
Substrate mounts it read-only into a task's container as an image volume
(wired up in the next change), so agent images can stay pure and a
runner update means changing one digest instead of rebuilding every
agent image.

`make images` now also builds and pushes the runner volume image and
records its digest in bin/ax-runner-volume.digest, and
`make push-runner-volume` builds and pushes only that image.

Part of #493 (prebuilt agent images).
@aprajitaarora13
aprajitaarora13 force-pushed the aprajitaarora/prebuilt-1-runner-volume-image branch from 14120e8 to f720abf Compare November 17, 2026 02:13
@aprajitaarora13
aprajitaarora13 merged commit 28c4147 into main Nov 17, 2026
10 checks passed
@aprajitaarora13
aprajitaarora13 deleted the aprajitaarora/prebuilt-1-runner-volume-image branch November 17, 2026 02:31
MushuEE added a commit that referenced this pull request Nov 17, 2026
main added Dockerfile.runner-volume (#619) and an AX_RUNNER_VOLUME_IMAGE
placeholder to deploy/ax-server.yaml (#620), which failed the render
step's leftover-placeholder check.

Releases now also publish ghcr.io/google/ax/ax-runner-volume (multi-arch,
binary checked per platform) and list its digest in the notes. The
rendered manifest leaves AX_RUNNER_VOLUME_IMAGE empty, the same default
as the Makefile, so tasks keep running the runner baked into their image
until an operator opts in.
MushuEE added a commit that referenced this pull request Nov 17, 2026
The runner volume work (#619, #620) is not ready, so releases no longer
build or publish ax-runner-volume. The rendered ax-server.yaml still
fills the AX_RUNNER_VOLUME_IMAGE placeholder with an empty value, so
tasks run the runner baked into their image and the render step's
leftover-placeholder check passes.
MushuEE added a commit that referenced this pull request Nov 17, 2026
* ci: build and publish a release when a vX.Y.Z tag is pushed

Pushing a release tag now builds ax-server and ax-task-runner for
linux/amd64 and linux/arm64 and pushes them to ghcr.io/google/ax, then
publishes the GitHub release with the ax CLI (linux/darwin, amd64/arm64,
with sha256 files), ax-server.yaml rendered with both images pinned by
digest, and postgres.yaml. Pre-release tags publish pre-releases.

Pull requests that touch the release run it as a dry run against a
registry inside the job. ax version now prints the release version.

* release: publish ghcr.io/google/ax image refs and installer-compatible archives

Add internal/version (Version, ImageRepo, Image) so code that deploys AX,
such as ax install in #603, can default to the images of its own release,
or :latest for dev builds. The highest stable release now moves :latest.

Ship the CLI as ax_<os>_<arch>.tar.gz with checksums.txt, and attach
install.sh when the tag has one, matching what install.sh downloads.

* release: align with the build and release epic (#609)

Key concurrency by tag, dry-run on any Dockerfile.* change, fail the
existence check on registry errors instead of rebuilding, refuse
Dockerfiles that pin TARGETARCH, verify each platform image holds the
right binary, and write digests to the job summary. Export task_image
for stage 2 agent images and point the docs at #609 and #610.

* release: drop the agent image hook; agent images are built in agentexecutor/images

* release: address review of #616

- Never rebuild over a published tag on a registry error: the second
  inspect call fails closed, stderr is kept out of the manifest, and
  ghcr.io's DENIED for a never-pushed package is resolved through the
  packages API instead of failing the first release.
- Rebuild only missing or incomplete images, and nothing at all once the
  release is published; read the release state fail-closed.
- Refuse tags that are not on main or a release-* branch.
- Publish a leftover draft with this run's assets and notes instead of
  leaving it stale; upload only known assets.
- Refetch tags before moving :latest so an older release cannot take it
  back.
- Dry runs cover go.mod, install.sh, cmd and internal/version changes,
  and rerun the image step to check that it reuses the same digests.
- Reproducible CLI archives (fixed mtime, gzip -n); index annotations so
  GHCR links multi-arch packages; docs for older tags and prerequisites.

* release: publish ax-runner-volume and render AX_RUNNER_VOLUME_IMAGE

main added Dockerfile.runner-volume (#619) and an AX_RUNNER_VOLUME_IMAGE
placeholder to deploy/ax-server.yaml (#620), which failed the render
step's leftover-placeholder check.

Releases now also publish ghcr.io/google/ax/ax-runner-volume (multi-arch,
binary checked per platform) and list its digest in the notes. The
rendered manifest leaves AX_RUNNER_VOLUME_IMAGE empty, the same default
as the Makefile, so tasks keep running the runner baked into their image
until an operator opts in.

* release: don't publish ax-runner-volume yet

The runner volume work (#619, #620) is not ready, so releases no longer
build or publish ax-runner-volume. The rendered ax-server.yaml still
fills the AX_RUNNER_VOLUME_IMAGE placeholder with an empty value, so
tasks run the runner baked into their image and the render step's
leftover-placeholder check passes.
MushuEE added a commit that referenced this pull request Nov 18, 2026
…lt (#626)

* release: publish ax-runner-volume, with a switch to mount it by default

Releases also build and publish ghcr.io/google/ax/ax-runner-volume
(Dockerfile.runner-volume, #619) for linux/amd64 and linux/arm64, with
the same per-platform binary check as the other images, and list its
digest in the release notes.

The rendered ax-server.yaml sets AX_RUNNER_VOLUME_IMAGE to that digest
only when the repository variable AX_RELEASE_RUNNER_VOLUME is true;
otherwise it stays empty and tasks run the runner baked into their
image, as today.

Part of #625.

* release: address review of #626

- Release notes read the AX_RUNNER_VOLUME_IMAGE that render-manifests.sh
  rendered (recorded in images.env) instead of parsing the YAML.
- When the runner volume is off, the notes call it experimental and
  point to #625 rather than inviting users to opt in.
- Dry runs also render with the runner volume on and check the pinned
  value, so the switch's on path runs in CI.
- Fix comments and docs that still said the manifest always leaves it
  empty or pins only two images; note that ax install does not set it.

* release: address review nits on #626

- render-manifests.sh rewrites images.env through a temp file instead of
  sed -i, which differs between GNU and BSD (macOS) sed.
- create-release.sh unsets AX_RUNNER_VOLUME_IMAGE before sourcing
  images.env and reads it without a default, so an images.env that
  render-manifests.sh has not updated fails instead of taking an
  exported value.
- Dry runs render with the runner volume off and on and check the
  recorded value and the manifest for each, so both paths stay covered
  whichever way AX_RELEASE_RUNNER_VOLUME is set.
- docs/releasing.md: ax install can opt in with --runner-volume-image
  (#634) but does not enable it by default; fix the repeated clause in
  the package visibility note.
aprajitaarora13 added a commit that referenced this pull request Nov 19, 2026
Update hack/hero-demo/task-starter.yaml, run.sh, and README.md (Step 3:
Starter Task, Session & Resume) to use the prebuilt image launcher
contract from #619–#622:

- Move `spec.config.prompt` to `spec.goal.text` and set
  `spec.sessionId: hero-demo-session` in `hack/hero-demo/task-starter.yaml`.
- Allow overriding the starter image digest via `STARTER_IMAGE` in
  `hack/hero-demo/run.sh` before the published GHCR digest is pinned in
  `task-starter.yaml`.
- In `step3_starter_task_session`, wait for Turn 1 to write
  `$AX_OUTPUT_FILE` (`/workspace/.ax/output`) and
  `/workspace/.ax/launcher-done`, verify the output is preserved across
  `ax suspend` and `ax resume`, and keep the second Session turn as
  STUB until a follow-up turn can run on the same task's workspace.
- Document in `hack/hero-demo/README.md` that pure starter images need
  `ax-server` configured with a runner volume image
  (`ax install --runner-volume-image` or `AX_RUNNER_VOLUME_IMAGE`).

Part of #493.
aprajitaarora13 added a commit that referenced this pull request Nov 19, 2026
Update hack/hero-demo/task-starter.yaml, run.sh, and README.md (Step 3:
Starter Task, Session & Resume) to use the prebuilt image launcher
contract from #619–#622:

- Move `spec.config.prompt` to `spec.goal.text` and set
  `spec.sessionId: hero-demo-session` in `hack/hero-demo/task-starter.yaml`.
- Allow overriding the starter image digest via `STARTER_IMAGE` in
  `hack/hero-demo/run.sh` before the published GHCR digest is pinned in
  `task-starter.yaml`.
- In `step3_starter_task_session`, wait for Turn 1 to write
  `$AX_OUTPUT_FILE` (`/workspace/.ax/output`) and
  `/workspace/.ax/launcher-done`, verify the output is preserved across
  `ax suspend` and `ax resume`, and keep the second Session turn as
  STUB until a follow-up turn can run on the same task's workspace.
- Document in `hack/hero-demo/README.md` that pure starter images need
  `ax-server` configured with a runner volume image
  (`ax install --runner-volume-image` or `AX_RUNNER_VOLUME_IMAGE`).

Part of #493.
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