Skip to content

fix(runtime): provision missing CLIs in Docker SOPs - #1077

Merged
crispinhu27 merged 4 commits into
mainfrom
fix/antigravity-workspace-launch
Nov 19, 2026
Merged

crispinhu27 merged 4 commits into
mainfrom
fix/antigravity-workspace-launch

Conversation

@crispinhu27

Copy link
Copy Markdown
Collaborator

Summary

  • Resolve the selected CLI on the Docker task user's PATH first. Reuse shared runtime installations where available and prepare missing CLIs with the same installer used by conversation workspaces.
  • Serialize installation in each container so parallel SOP nodes can share the installed CLI. Explicit executor paths and ordinary script tasks keep their existing launch arguments.
  • Download the complete Antigravity or Cursor installer over verified HTTPS before executing it. Retry one failed download and pass the sandbox's configured proxy to CLI setup.

Writable Docker sandboxes with the installer prerequisites can provision the supported CLIs. Read-only images can use a preinstalled CLI or mounted toolchain. ZCode uses the supplied official CLI.

Verification

  • Runtime installation, proxy, and retry regression tests with the Go race detector.
  • Disposable Linux arm64 Docker sandbox with a numeric user installed official Antigravity and Pi on demand, reused both on the next invocation, and ran the existing Codex binary.
  • End-to-end Runner SOP with a missing Antigravity CLI installed a test fixture and completed with a synthetic API key.
  • Runner SOP and conversation authentication regressions on native and Docker sandboxes.

Use the sandbox proxy for Docker CLI setup and retry a failed HTTPS download before invoking the official installer.
Reuse the conversation workspace installer after checking the sandbox PATH and shared runtime installations.

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

在 Linux Docker 中用 UID 1000 连续执行了两次 Antigravity SOP 命令。没有预装 CLI 的用例中,测试安装器只运行一次,两次调用都成功。镜像另有一份 root 私有的 CLI 时,首个节点启动失败。

if err != nil {
return command, "", err
}
command.Argv = append([]string{binary}, command.Argv[1:]...)

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.

[P1] 请用任务用户验证最终选中的 CLI。这里把 root 准备阶段返回的绝对路径写入 argv。实测镜像只在 root 的登录 PATH 中安装 agy 时,UID 1000 的首次探测报告缺失,但 root 的 command -v 命中私有安装并跳过安装。随后任务用户执行该路径得到 Permission denied,退出码 126。建议只复用任务用户可执行的路径,其余情况安装到共享前缀,再用任务用户验证。

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

复测通过。用真实 Docker 容器以 UID/GID 1000:1000 运行 SOP,并用离线安装脚本检查调用次数。镜像中没有 agy、以及只有 root 的登录 PATH 能找到旧 agy,这两种情况下,任务用户都能连续两次执行 agy,安装脚本都只运行一次。相关 runtime 回归测试也通过,上一轮的退出码 126 已修复。

@crispinhu27
crispinhu27 merged commit 684e79d into main Nov 19, 2026
16 checks passed
@crispinhu27
crispinhu27 deleted the fix/antigravity-workspace-launch branch November 19, 2026 12:32
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