Skip to content

test(e2e): add mounted-runner Substrate E2E suite for Antigravity - #10

Open
Lukeluds wants to merge 4 commits into
agentexecutor:mainfrom
Lukeluds:feat/antigravity-e2e
Open

Lukeluds wants to merge 4 commits into
agentexecutor:mainfrom
Lukeluds:feat/antigravity-e2e

Conversation

@Lukeluds

Copy link
Copy Markdown
Collaborator

Adds e2e/antigravity/, a portable KinD + Agent Substrate (gVisor) end-to-end test suite exercising agents/antigravity (#8, #9) with a static ax-task-runner mounted read-only at /opt/ax (ImageVolumeSource) against an out-of-sandbox fakes/mock-gemini Deployment (#6, #7):

  • Cases covered (7/7 verified locally on ax-e2e):
    1. Happy path (GEMINI_API_KEY direct :streamGenerateContent?alt=sse stream → MOCK_OK)
    2. Wrong key (400 rejected, non-zero exit)
    3. Missing key (0 authorized calls, non-zero exit)
    4. Egress denied (no EgressPolicy → 0 calls reach mock-gemini)
    5. Gateway credential injection (k8s.io provider injects ax-test/mock-gemini[key] on x-goog-api-key; verifies /proc/1/environ inside the sandbox never holds the key)
    6. Scripted multi-turn write_file functionCall writing /workspace/tool_ok.txt + outputFile writing /workspace/answer.md
    7. FAULT=503 transient retry and recovery via POST /_mock/config
  • Includes Kubernetes manifests (e2e/antigravity/k8s/mock-gemini.yaml, egress-policy-http.yaml, egress-policy-inject.yaml) and setup/usage docs (e2e/antigravity/README.md).

mayawang
mayawang previously approved these changes Nov 16, 2026

@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 as a start. Non-blocking: it needs #6/#7 first (fakes/mock-gemini), isn't wired into CI yet, and drives Substrate with a stand-in for AX rather than AX itself, so the HTTPS/egress-CA path the demo uses isn't exercised. Also, create errors go to /dev/null under set -e, so a failed create stops the suite silently.

@Lukeluds

Copy link
Copy Markdown
Collaborator Author

Thanks! Pushed two quick updates:

  • Added an opt-in run_real_gemini_e2e.sh that runs the hero-demo prompt against real generativelanguage.googleapis.com over Substrate's HTTPS/egress-CA path + x-goog-api-key secret injection (verified passing locally on KinD; also confirmed agy uses Path/Content/Overwrite for write_file).
  • Dropped 2>&1 on kubectl-ate create/resume in run_e2e.sh so errors print to stderr instead of failing silently.

The real-Gemini E2E sets AGY_RUNTIME_INSTALL=true, verifies the answer
lands in AX_OUTPUT_FILE, and drops the auto-updater host from the egress
policy since install-agy.sh now only downloads from storage.googleapis.com.

@MushuEE MushuEE left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agree with Maya that this is fine as a start, and that driving it through AX can come later. Two things I noticed reading run_e2e.sh at 5e21804 against google/ax main. I haven't run the suite.

1. The commands detection looks in the wrong file. Lines 51-57 grep pkg/apis/v1alpha1/ax.proto for repeated string commands, but on main that field is in task.proto. So against a current AX checkout the script picks command, which the runner no longer reads.

2. The goal doesn't reach the harness the way AX delivers it. The suite writes the goal as a Workspace file, points AX_GOAL_FILE at it through spec.env, and runs the harness as an explicit command. On main the runner always writes its own goal file from spec.goal.text and appends AX_GOAL_FILE=/run/ax/goal.md after the task's env (runner/runner.go, cmd.Env = append(commandEnv(...), files.env...)), so I'd expect the harness to see an empty goal and exit 2.

One change fixes both: set spec.goal.text and spec.config in the Task YAML and drop the explicit command. The runner then starts /usr/local/bin/ax-harness itself, which is the path real tasks use.

@MushuEE

MushuEE commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Tracking: this supports #16 (validating the published Antigravity image), under the release epic #12. It isn't a prerequisite for the first release.

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.

3 participants