diff --git a/scripts/e2e/Dockerfile.qr-import b/scripts/e2e/Dockerfile.qr-import index a235a7f4bd2..e221e0278a9 100644 --- a/scripts/e2e/Dockerfile.qr-import +++ b/scripts/e2e/Dockerfile.qr-import @@ -10,6 +10,9 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ COPY ui/package.json ./ui/package.json COPY patches ./patches +# This image only exercises the root qrcode-terminal dependency path. +# Keep the pre-install copy set limited to the manifests needed for root +# workspace resolution so unrelated extension edits do not bust the layer. RUN --mount=type=cache,id=openclaw-pnpm-store,target=/root/.local/share/pnpm/store,sharing=locked \ pnpm install --frozen-lockfile diff --git a/src/docker-build-cache.test.ts b/src/docker-build-cache.test.ts index 08ff562099f..99df5d4e430 100644 --- a/src/docker-build-cache.test.ts +++ b/src/docker-build-cache.test.ts @@ -106,6 +106,14 @@ describe("docker build cache layout", () => { dockerfile.indexOf("COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./"), ).toBeLessThan(installIndex); expect(dockerfile.indexOf("COPY ui/package.json ./ui/package.json")).toBeLessThan(installIndex); + expect(dockerfile).toContain( + "This image only exercises the root qrcode-terminal dependency path.", + ); + expect( + dockerfile.indexOf( + "COPY extensions/memory-core/package.json ./extensions/memory-core/package.json", + ), + ).toBe(-1); expect(dockerfile.indexOf("COPY . .")).toBeGreaterThan(installIndex); }); });