Skip to content

test/e2e: run a pure image with a launcher on the mounted runner - #622

Merged
aprajitaarora13 merged 1 commit into
mainfrom
aprajitaarora/prebuilt-4-launcher-e2e
Nov 17, 2026
Merged

aprajitaarora13 merged 1 commit into
mainfrom
aprajitaarora/prebuilt-4-launcher-e2e

Conversation

@aprajitaarora13

@aprajitaarora13 aprajitaarora13 commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Adds TestE2E_PureImageLauncher. It runs a task on an image built the way the prebuilt agent images are: no AX runner inside, only a launcher at /usr/local/bin/ax-harness. The test checks that:

  • the runner runs from the read-only runner volume at /opt/ax, and the image has none baked in;
  • the goal and session reach the launcher as files, and its answer lands in $AX_OUTPUT_FILE (/workspace/.ax/output);
  • suspend and resume keep the answer without running the launcher again.

The launcher is a stand-in that echoes its input instead of running an agent, so the test needs no model or API key. hack/setup-e2e-kind.sh builds the runner volume image and the test image. The E2E ax-server now mounts the runner volume into every task, so the rest of the suite also runs on the mounted runner.

Once the starter images in agentexecutor/images are published by digest, a test against an image and its mock inference server (mock-anthropic, mock-gemini) can replace the stand-in.

Part of #493.

Stack (review in order):

  1. Runner volume image (build: add the runner volume image #619)
  2. Mount the runner from the volume (controller, substrate: mount the runner from a read-only image volume #620)
  3. Hand the task to the image's launcher as files (runner: hand the task to the image's launcher as files #621)
  4. This PR: E2E for a pure image with a launcher on the mounted runner

@aprajitaarora13
aprajitaarora13 force-pushed the aprajitaarora/prebuilt-4-launcher-e2e branch from b7ef8bc to b5065d2 Compare November 17, 2026 00:24
@aprajitaarora13
aprajitaarora13 marked this pull request as ready for review November 17, 2026 00:33

@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. Non-blocking: the ran-once check can pass before a wrong second run writes, since the output survives suspend; nothing covers the flag-unset path anymore; and python:3.12-slim from Docker Hub may hit rate limits.

@aprajitaarora13
aprajitaarora13 force-pushed the aprajitaarora/prebuilt-4-launcher-e2e branch from b5065d2 to d0b2b2e Compare November 17, 2026 02:13
@aprajitaarora13
aprajitaarora13 force-pushed the aprajitaarora/prebuilt-4-launcher-e2e branch 2 times, most recently from 063b849 to a4021d7 Compare November 17, 2026 02:20
Base automatically changed from aprajitaarora/prebuilt-3-launcher-files to main November 17, 2026 02:23
Add TestE2E_PureImageLauncher, which runs a task on an image built the
way the prebuilt agent images are: no AX runner inside, only a launcher
at /usr/local/bin/ax-harness. The test checks that:

- the runner runs from the read-only runner volume at /opt/ax and the
  image has none baked in;
- the goal and session reach the launcher as files, and its answer
  lands in $AX_OUTPUT_FILE (/workspace/.ax/output);
- suspend and resume keep the answer without running the launcher
  again.

The launcher is a stand-in that echoes its input instead of running an
agent, so the test needs no model or API key. hack/setup-e2e-kind.sh
builds the runner volume image and the test image, and the E2E
ax-server now mounts the runner volume into every task, so the rest of
the suite also runs on the mounted runner.

Running a published starter image from agentexecutor/images against its
mock inference server can replace the stand-in once those images are
published by digest.

Part of #493 (prebuilt agent images).
@aprajitaarora13
aprajitaarora13 force-pushed the aprajitaarora/prebuilt-4-launcher-e2e branch from a4021d7 to 442aaf7 Compare November 17, 2026 02:23
@aprajitaarora13
aprajitaarora13 merged commit 0761344 into main Nov 17, 2026
10 checks passed
@aprajitaarora13
aprajitaarora13 deleted the aprajitaarora/prebuilt-4-launcher-e2e branch November 17, 2026 02:31
aprajitaarora13 added a commit that referenced this pull request Nov 18, 2026
Follow up on the non-blocking review comments from #620, #621 and #622:

- Only record `<workspace>/.ax/launcher-done` when the launcher exits
  with status 0, so a failed launcher run is retried when the sandbox
  is resumed.
- Fall back to `<os.TempDir>/ax-run` when `Config.RunDir` is empty and
  `/run/ax` cannot be created (for example when a container image sets
  a non-root `USER`).
- Start the task command or launcher (or skip it via `launcher-done`)
  before marking `/readyz?check=workspace` ready, so callers waiting on
  `ax resume` never race the start of a launcher run.
- Reuse `${REGISTRY_ADDR}/ax-task-runner:base` (with
  `/usr/local/bin/ax-task-runner` removed) for `ax-e2e-launcher:e2e` so
  `hack/setup-e2e-kind.sh` avoids an extra Docker Hub pull.
- Document on `substrate.MountRunnerVolume` that enabling
  `--runner-volume-image` sets the container command on all AX-managed
  templates, leaves user-managed `ate_actor_template` references
  untouched, and still expects `/bin/sh` and `git` in pure images when
  workspace setup (`spec.setup`) runs.

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.
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