From 7da6e10c4eeb7a51ffcfec6e44f9cfc944ad9213 Mon Sep 17 00:00:00 2001 From: Koosha Paridehpour <42529354+KooshaPari@users.noreply.github.com> Date: Fri, 4 Sep 2026 22:34:20 -0700 Subject: [PATCH] fix(docker): pin 4 CLI tools to exact versions (#12576) (#12703) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merged. Verified all four pins resolve on npm before landing: ``` @openai/codex@0.153.2 0.153.2 @anthropic-ai/claude-code@2.1.260 2.1.260 droid@0.212.0 0.212.0 openclaw@2026.9.1 2026.9.1 ``` The reproducibility argument holds — a floating `@latest` in a cached Docker layer means two builds of the same commit can ship different toolchains, and that is exactly the class of drift that makes a CI failure unattributable. Worth flagging for whoever maintains this next: pinning trades drift for staleness, so these four now need a periodic bump or the image ships increasingly old CLIs. The comment block you added explains the why, which makes that bump a safe mechanical change instead of a judgment call. Rebased onto `release/v3.8.51` (the PR was cut from `main`, ~3695 commits behind). Thanks. --- Dockerfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 471cbc86d5..235745535d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -331,7 +331,18 @@ RUN --mount=type=cache,id=s/92ca8a61-c1ba-421f-a389-d48ac7258c2d-apt-cache,targe && git config --system url."https://github.com/".insteadOf "ssh://git@github.com/" # Install CLI tools globally. Separate layer from apt for better cache reuse. +# Pinned to exact versions per Diego's diagnosis in #12576 — floating +# `@latest` causes two CI failures: +# 1. `openclaw` ships a breaking major ~weekly; overnight builds silently +# advance to a version that no longer matches the tested combo stack. +# 2. `codex` / `claude-code` dev pre-releases (`@next`, dist-tags) mutate +# API surface without notice; reproducible builds need a SHA-pinned dev +# build, not the floating `@latest`. RUN --mount=type=cache,id=s/92ca8a61-c1ba-421f-a389-d48ac7258c2d-npm-cache,target=/root/.npm \ - npm install -g --no-audit --no-fund @openai/codex @anthropic-ai/claude-code droid openclaw@latest + npm install -g --no-audit --no-fund \ + @openai/codex@0.153.2 \ + @anthropic-ai/claude-code@2.1.260 \ + droid@0.212.0 \ + openclaw@2026.9.1 USER node