From a47f155dbd44c20b2e8508a626c8d30e338360f4 Mon Sep 17 00:00:00 2001 From: Test User Date: Wed, 20 May 2026 08:42:41 +0800 Subject: [PATCH] fix(openclaw): bump duplicate message fix version --- Dockerfile.base | 2 +- agents/openclaw/manifest.yaml | 2 +- nemoclaw-blueprint/blueprint.yaml | 2 +- test/openclaw-version-pin.test.ts | 61 +++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 test/openclaw-version-pin.test.ts diff --git a/Dockerfile.base b/Dockerfile.base index 4d920cb614b..7a49b2c1828 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -177,7 +177,7 @@ RUN printf '%s\n' \ # OpenClaw version: change the OPENCLAW_VERSION ARG default so CI rebuilds # the base image on push to main, or use workflow_dispatch on base-image.yaml # with the openclaw_version input for a one-off build without editing this file. -ARG OPENCLAW_VERSION=2026.4.24 +ARG OPENCLAW_VERSION=2026.4.25 SHELL ["/bin/bash", "-o", "pipefail", "-c"] diff --git a/agents/openclaw/manifest.yaml b/agents/openclaw/manifest.yaml index 8847e529f04..d1d6e2f84d2 100644 --- a/agents/openclaw/manifest.yaml +++ b/agents/openclaw/manifest.yaml @@ -19,7 +19,7 @@ homepage: "https://openclaw.ai" install_method: npm # npm install -g openclaw@ binary_path: /usr/local/bin/openclaw version_command: "openclaw --version" -expected_version: "2026.4.24" +expected_version: "2026.4.25" gateway_command: "openclaw gateway run" # ── Health probe ──────────────────────────────────────────────── diff --git a/nemoclaw-blueprint/blueprint.yaml b/nemoclaw-blueprint/blueprint.yaml index 2f184c85168..4cf8f4beb3b 100644 --- a/nemoclaw-blueprint/blueprint.yaml +++ b/nemoclaw-blueprint/blueprint.yaml @@ -4,7 +4,7 @@ version: "0.1.0" min_openshell_version: "0.0.39" max_openshell_version: "0.0.39" -min_openclaw_version: "2026.4.24" +min_openclaw_version: "2026.4.25" # Mirrors the components.sandbox.image manifest digest below. Lets a # downstream consumer (or release tooling) verify the blueprint declares # a specific sandbox image without parsing the components tree, and diff --git a/test/openclaw-version-pin.test.ts b/test/openclaw-version-pin.test.ts new file mode 100644 index 00000000000..40b04f51548 --- /dev/null +++ b/test/openclaw-version-pin.test.ts @@ -0,0 +1,61 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +import fs from "node:fs"; +import path from "node:path"; +import { describe, expect, it } from "vitest"; + +const ROOT = path.join(import.meta.dirname, ".."); +const DUPLICATE_MESSAGE_FIX_VERSION = "2026.4.25"; + +function versionGte(left: string, right: string): boolean { + const lhs = left.split(".").map((part) => Number.parseInt(part, 10) || 0); + const rhs = right.split(".").map((part) => Number.parseInt(part, 10) || 0); + const length = Math.max(lhs.length, rhs.length); + for (let index = 0; index < length; index += 1) { + const a = lhs[index] ?? 0; + const b = rhs[index] ?? 0; + if (a > b) return true; + if (a < b) return false; + } + return true; +} + +function readText(relativePath: string): string { + return fs.readFileSync(path.join(ROOT, relativePath), "utf8"); +} + +function matchVersion(contents: string, regex: RegExp, label: string): string { + const match = contents.match(regex); + if (!match?.[1]) throw new Error(`Could not parse ${label}`); + return match[1]; +} + +describe("OpenClaw version pin", () => { + it("pins fresh and rebuilt OpenClaw sandboxes to a version with the duplicate-message fix (#3789)", () => { + const dockerfileVersion = matchVersion( + readText("Dockerfile.base"), + /^ARG OPENCLAW_VERSION=([0-9.]+)$/m, + "Dockerfile.base OPENCLAW_VERSION", + ); + const minimumVersion = matchVersion( + readText("nemoclaw-blueprint/blueprint.yaml"), + /^min_openclaw_version:\s*"?([0-9.]+)"?$/m, + "blueprint min_openclaw_version", + ); + const manifestVersion = matchVersion( + readText("agents/openclaw/manifest.yaml"), + /^expected_version:\s*"([0-9.]+)"$/m, + "OpenClaw manifest expected_version", + ); + + for (const [label, version] of [ + ["Dockerfile.base OPENCLAW_VERSION", dockerfileVersion], + ["blueprint min_openclaw_version", minimumVersion], + ["OpenClaw manifest expected_version", manifestVersion], + ] as const) { + expect(versionGte(version, DUPLICATE_MESSAGE_FIX_VERSION), `${label}=${version}`).toBe(true); + } + expect(new Set([dockerfileVersion, minimumVersion, manifestVersion]).size).toBe(1); + }); +});