Skip to content

feat: argumentizing OpenClaw version#1600

Closed
hunglp6d wants to merge 10 commits intoNVIDIA:mainfrom
hunglp6d:feat/openclaw-dynamic-version
Closed

feat: argumentizing OpenClaw version#1600
hunglp6d wants to merge 10 commits intoNVIDIA:mainfrom
hunglp6d:feat/openclaw-dynamic-version

Conversation

@hunglp6d
Copy link
Copy Markdown
Contributor

@hunglp6d hunglp6d commented Apr 8, 2026

Summary

Argumentizing the OpenClaw version in the base image build so it can be overridden at build time via --build-arg or workflow dispatch, while keeping the default version. This is the first step toward an OpenClaw version integration pipeline that validates how different OpenClaw releases adapt to NemoClaw.

Related Issue

Closes #1525

Changes

  • Dockerfile.base: Replace the hardcoded openclaw@2026.3.11 install with an ARG OPENCLAW_VERSION (default 2026.3.11). At build time, the provided version is validated against:
    1. The min_openclaw_version declared in nemoclaw-blueprint/blueprint.yaml.
    2. The npm registry, to confirm the version actually exists before attempting install.
  • .github/workflows/base-image.yaml: Add an openclaw_version input to workflow_dispatch and forward it as a build-args entry to the Docker build step, falling back to 2026.3.11 when left blank.

Type of Change

  • Code change for a new feature, bug fix, or refactor.
  • Code change with doc updates.
  • Doc only. Prose changes without code sample modifications.
  • Doc only. Includes code sample changes.

Testing

  • npx prek run --all-files passes (or equivalently make check).
  • npm test passes.
  • make check passes.

Checklist

General

Code Changes

  • Formatters applied — npx prek run --all-files auto-fixes formatting (or make format for targeted runs).
  • Tests added or updated for new or changed behavior.
  • No secrets, API keys, or credentials committed.
  • Doc pages updated for any user-facing behavior changes (new commands, changed defaults, new features, bug fixes that contradict existing docs).

Summary by CodeRabbit

  • New Features

    • Manual workflow now accepts an optional OpenClaw version and base-image builds also trigger when blueprint changes.
    • Base image build accepts a configurable OpenClaw version instead of a fixed release.
  • Improvements

    • Build now validates requested OpenClaw versions for format, minimum compatibility with the blueprint, and registry availability before installing.
    • Version-detection logic improved to consider build-time declarations as a fallback.
  • Tests

    • Tests updated to derive the expected OpenClaw version from configuration rather than using a hard-coded value.

Signed-off-by: Hung Le hple@nvidia.com

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Parameterizes OpenClaw via a build argument: GitHub Actions accepts an optional openclaw_version; Dockerfile.base adds ARG OPENCLAW_VERSION and performs format/minimum/registry validation before installing; scripts/install.sh and tests fall back to the ARG in Dockerfile.base.

Changes

Cohort / File(s) Summary
CI workflow
.github/workflows/base-image.yaml
Added optional workflow_dispatch input openclaw_version; extended push path filter to include nemoclaw-blueprint/blueprint.yaml; build step conditionally forwards OPENCLAW_VERSION as a Docker build-arg only when provided.
Docker image build
Dockerfile.base
Added ARG OPENCLAW_VERSION=2026.3.11; validate dotted numeric format; mount and read nemoclaw-blueprint/blueprint.yaml to extract min_openclaw_version; compare versions (sort -V); verify requested version exists via npm view before npm install -g openclaw@${OPENCLAW_VERSION}.
Scripts & tests
scripts/install.sh, test/install-preflight.test.js
resolve_openclaw_version() now extracts ARG OPENCLAW_VERSION=... from Dockerfile.base; test updated to derive expected version from Dockerfile.base instead of a hard-coded value.

Sequence Diagram

sequenceDiagram
    participant User
    participant GH as "GitHub Actions"
    participant Docker as "Docker Build"
    participant FS as "File System"
    participant Blueprint as "nemoclaw-blueprint/blueprint.yaml"
    participant NPM as "npm Registry"

    User->>GH: Trigger workflow (optional openclaw_version)
    GH->>Docker: Start build (with/without OPENCLAW_VERSION)
    Docker->>FS: Read `Dockerfile.base` (ARG/default)
    Docker->>Blueprint: Read `min_openclaw_version`
    Blueprint-->>Docker: Return minimum version
    Docker->>Docker: Validate OPENCLAW_VERSION format
    Docker->>Docker: Compare OPENCLAW_VERSION >= min_openclaw_version
    Docker->>NPM: npm view openclaw@{OPENCLAW_VERSION} version
    NPM-->>Docker: Version exists?
    Docker->>Docker: npm install -g openclaw@{OPENCLAW_VERSION}
    Docker-->>GH: Build complete (success/failure)
    GH-->>User: Notify result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I nudged a dotted number into the pot,
Peeked at the blueprint to learn the lot,
I checked the registry for every dot,
Hopped through the build with a confident trot,
Small changes, big hops — a carrot-y plot. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: argumentizing OpenClaw version' directly summarizes the main change: making the OpenClaw version configurable via a build argument instead of hardcoded.
Linked Issues check ✅ Passed Changes fully implement issue #1525 requirements: argumentizing OpenClaw version with ARG, default value 2026.3.11, workflow_dispatch support, npm registry version validation, and min_openclaw_version compliance check against blueprint.yaml.
Out of Scope Changes check ✅ Passed All changes directly support the core objective of argumentizing OpenClaw version: Dockerfile.base adds ARG and validation logic, workflow adds inputs/build-args, and script/test updates enable version resolution and testing.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@hunglp6d hunglp6d force-pushed the feat/openclaw-dynamic-version branch from 84b5086 to b8b8e05 Compare April 8, 2026 04:26
Copy link
Copy Markdown

@thaihuynhxyz thaihuynhxyz left a comment

Choose a reason for hiding this comment

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

Can we have some tests prove this change work?

Comment thread Dockerfile.base
Comment thread .github/workflows/base-image.yaml Outdated
Copy link
Copy Markdown

@namng-n4a namng-n4a left a comment

Choose a reason for hiding this comment

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

Please check my review.

Comment thread Dockerfile.base
Comment thread Dockerfile.base Outdated
Comment thread Dockerfile.base Outdated
@namng-n4a
Copy link
Copy Markdown

LGTM!

Comment thread Dockerfile.base Outdated
@hunglp6d hunglp6d marked this pull request as ready for review April 8, 2026 15:45
@hunglp6d hunglp6d force-pushed the feat/openclaw-dynamic-version branch from 561844c to 9c66129 Compare April 8, 2026 15:49
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/base-image.yaml (1)

17-26: ⚠️ Potential issue | 🟠 Major

Also rebuild the base image when the blueprint minimum changes.

Dockerfile.base now reads nemoclaw-blueprint/blueprint.yaml during the build, so a push that only changes min_openclaw_version will skip this workflow and leave sandbox-base:latest behind the repo's declared minimum until somebody manually dispatches a rebuild.

🐛 Proposed fix
   push:
     branches: [main]
     paths:
       - "Dockerfile.base"
+      - "nemoclaw-blueprint/blueprint.yaml"

Also applies to: 71-83

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/base-image.yaml around lines 17 - 26, Update the GitHub
Actions trigger so changes to the blueprint's minimum version cause a rebuild:
include the blueprint file path (nemoclaw-blueprint/blueprint.yaml) and any
blueprint directory patterns in the push.paths array alongside "Dockerfile.base"
(and mirror the same addition in the other push trigger region around lines
71-83) so pushes that modify min_openclaw_version will run the workflow to
rebuild sandbox-base:latest.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Dockerfile.base`:
- Around line 132-140: The RUN step that extracts OPENCLAW_MIN_VERSION (via
grep/awk/tr) must fail the build if parsing yields an empty value; update the
Dockerfile RUN block to validate OPENCLAW_MIN_VERSION after assignment (check if
OPENCLAW_MIN_VERSION is non-empty and matches a semantic-version regex) and if
not, print a clear error and exit 1 before the sort -V comparison or npm check;
reference the variable name OPENCLAW_MIN_VERSION and the existing RUN pipeline
so you add a conditional that aborts when parsing fails.

---

Outside diff comments:
In @.github/workflows/base-image.yaml:
- Around line 17-26: Update the GitHub Actions trigger so changes to the
blueprint's minimum version cause a rebuild: include the blueprint file path
(nemoclaw-blueprint/blueprint.yaml) and any blueprint directory patterns in the
push.paths array alongside "Dockerfile.base" (and mirror the same addition in
the other push trigger region around lines 71-83) so pushes that modify
min_openclaw_version will run the workflow to rebuild sandbox-base:latest.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d3395301-d9a0-429c-b713-80bf3e38e4e7

📥 Commits

Reviewing files that changed from the base of the PR and between adbea05 and 561844c.

📒 Files selected for processing (4)
  • .github/workflows/base-image.yaml
  • Dockerfile.base
  • scripts/install.sh
  • test/install-preflight.test.js

Comment thread Dockerfile.base Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
Dockerfile.base (1)

132-140: ⚠️ Potential issue | 🟠 Major

Fail closed if min_openclaw_version cannot be parsed.

The OPENCLAW_MIN_VERSION extraction pipeline (grep | awk | tr) silently yields an empty string if the key is missing or renamed in blueprint.yaml. When empty, the sort -V comparison trivially passes because an empty string sorts before any version, effectively disabling the minimum-version guard without failing the build.

🐛 Proposed fix to validate OPENCLAW_MIN_VERSION is non-empty
 RUN --mount=type=bind,source=nemoclaw-blueprint/blueprint.yaml,target=/tmp/blueprint.yaml \
     echo "$OPENCLAW_VERSION" | grep -qxE '[0-9]+(\.[0-9]+)*' \
     || { echo "Error: OPENCLAW_VERSION='$OPENCLAW_VERSION' is invalid (expected e.g. 2026.3.11)."; exit 1; }; \
     OPENCLAW_MIN_VERSION=$(grep 'min_openclaw_version' /tmp/blueprint.yaml | awk '{print $2}' | tr -d '"') \
+    && [ -n "$OPENCLAW_MIN_VERSION" ] \
+    || { echo "Error: Could not parse min_openclaw_version from nemoclaw-blueprint/blueprint.yaml"; exit 1; }; \
     && if [ "$(printf '%s\n%s' "$OPENCLAW_MIN_VERSION" "$OPENCLAW_VERSION" | sort -V | head -n1)" != "$OPENCLAW_MIN_VERSION" ]; then \
         echo "Error: OpenClaw version ${OPENCLAW_VERSION} is below the minimum required version ${OPENCLAW_MIN_VERSION}"; \
         echo "Hint: Update min_openclaw_version in nemoclaw-blueprint/blueprint.yaml or use a newer version."; exit 1; \
     fi \
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Dockerfile.base` around lines 132 - 140, The min-version guard can be
bypassed when OPENCLAW_MIN_VERSION is empty; update the RUN step that sets
OPENCLAW_MIN_VERSION (the grep/awk/tr pipeline reading
nemoclaw-blueprint/blueprint.yaml) to validate the extracted
OPENCLAW_MIN_VERSION is non-empty and fail the build if it is missing or cannot
be parsed: after computing OPENCLAW_MIN_VERSION check if it is empty (e.g. test
-z "$OPENCLAW_MIN_VERSION") and emit a clear error message and exit non-zero
before proceeding to the sort -V comparison and npm view check so the build
fails fast when min_openclaw_version is absent or malformed.
🧹 Nitpick comments (1)
test/install-preflight.test.js (1)

1519-1523: Consider aligning regex with install.sh or adding a guard for missing match.

The regex /ARG OPENCLAW_VERSION=(\S+)/ doesn't allow whitespace around =, but the install.sh awk pattern does ([[:space:]]*=[[:space:]]*). If someone reformats the Dockerfile to ARG OPENCLAW_VERSION = 2026.3.11, the test would extract undefined and fail with a confusing assertion message.

🔧 Optional: Add guard or align regex
   it("resolve_openclaw_version: falls back to Dockerfile.base when package.json omits it", () => {
-    const expected = fs.readFileSync(path.join(import.meta.dirname, "..", "Dockerfile.base"), "utf-8")
-      .match(/ARG OPENCLAW_VERSION=(\S+)/)?.[1];
+    const dockerfileContent = fs.readFileSync(path.join(import.meta.dirname, "..", "Dockerfile.base"), "utf-8");
+    const expected = dockerfileContent.match(/ARG\s+OPENCLAW_VERSION\s*=\s*(\S+)/)?.[1];
+    expect(expected).toBeDefined(); // fail fast with clear message if format changes
     const r = callInstallerFn('resolve_openclaw_version "$PWD"');
     expect(r.stdout.trim()).toBe(expected);
   });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/install-preflight.test.js` around lines 1519 - 1523, The test in
resolve_openclaw_version uses a strict regex /ARG OPENCLAW_VERSION=(\S+)/ which
fails if there is whitespace around '='; update the extraction in the test that
reads Dockerfile.base to either use a whitespace-tolerant pattern (e.g. allow
\s* around '=') or check the match before indexing (guard match and fail with a
clear message), and keep the rest of the test using
callInstallerFn('resolve_openclaw_version "$PWD"') and
expect(r.stdout.trim()).toBe(expected) so the test either extracts the version
robustly or asserts a helpful error when expected is missing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@Dockerfile.base`:
- Around line 132-140: The min-version guard can be bypassed when
OPENCLAW_MIN_VERSION is empty; update the RUN step that sets
OPENCLAW_MIN_VERSION (the grep/awk/tr pipeline reading
nemoclaw-blueprint/blueprint.yaml) to validate the extracted
OPENCLAW_MIN_VERSION is non-empty and fail the build if it is missing or cannot
be parsed: after computing OPENCLAW_MIN_VERSION check if it is empty (e.g. test
-z "$OPENCLAW_MIN_VERSION") and emit a clear error message and exit non-zero
before proceeding to the sort -V comparison and npm view check so the build
fails fast when min_openclaw_version is absent or malformed.

---

Nitpick comments:
In `@test/install-preflight.test.js`:
- Around line 1519-1523: The test in resolve_openclaw_version uses a strict
regex /ARG OPENCLAW_VERSION=(\S+)/ which fails if there is whitespace around
'='; update the extraction in the test that reads Dockerfile.base to either use
a whitespace-tolerant pattern (e.g. allow \s* around '=') or check the match
before indexing (guard match and fail with a clear message), and keep the rest
of the test using callInstallerFn('resolve_openclaw_version "$PWD"') and
expect(r.stdout.trim()).toBe(expected) so the test either extracts the version
robustly or asserts a helpful error when expected is missing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bd71718b-5403-4b1f-9c3c-f8ac26659a46

📥 Commits

Reviewing files that changed from the base of the PR and between 561844c and 9c66129.

📒 Files selected for processing (4)
  • .github/workflows/base-image.yaml
  • Dockerfile.base
  • scripts/install.sh
  • test/install-preflight.test.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/base-image.yaml

@hunglp6d hunglp6d force-pushed the feat/openclaw-dynamic-version branch from afc9d58 to f812cb8 Compare April 8, 2026 17:25
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
Dockerfile.base (1)

146-146: Optional: Quote the variable for defensive consistency.

While the format validation ensures OPENCLAW_VERSION only contains safe characters, quoting the argument is a shell best practice that protects against future regex changes.

Suggested change
-    npm install -g openclaw@${OPENCLAW_VERSION} \
+    npm install -g "openclaw@${OPENCLAW_VERSION}" \
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Dockerfile.base` at line 146, The npm install line uses an unquoted variable
(OPENCLAW_VERSION)—change the npm install invocation that references
openclaw@${OPENCLAW_VERSION} to quote the version argument (e.g., wrap the
openclaw@... value in double quotes) so the shell treats it as a single,
defensive token even if regex/validation changes in the future; update the line
containing openclaw@${OPENCLAW_VERSION} accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Dockerfile.base`:
- Line 146: The npm install line uses an unquoted variable
(OPENCLAW_VERSION)—change the npm install invocation that references
openclaw@${OPENCLAW_VERSION} to quote the version argument (e.g., wrap the
openclaw@... value in double quotes) so the shell treats it as a single,
defensive token even if regex/validation changes in the future; update the line
containing openclaw@${OPENCLAW_VERSION} accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: be80cf7b-59ba-4120-bd2b-0b13bd7fc134

📥 Commits

Reviewing files that changed from the base of the PR and between afc9d58 and f812cb8.

📒 Files selected for processing (4)
  • .github/workflows/base-image.yaml
  • Dockerfile.base
  • scripts/install.sh
  • test/install-preflight.test.js
✅ Files skipped from review due to trivial changes (1)
  • scripts/install.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/base-image.yaml

@hunglp6d hunglp6d force-pushed the feat/openclaw-dynamic-version branch from f812cb8 to 8d49b82 Compare April 8, 2026 17:36
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
Dockerfile.base (1)

135-137: Anchor the blueprint version extraction to the actual YAML key for robustness.

While the current grep + awk extraction works correctly (exactly one uncommented min_openclaw_version entry exists), a more anchored extractor prevents accidental consumption of commented or similarly named lines in future maintenance. The suggested awk pattern with format validation adds defensive structure:

♻️ Suggested hardening
-    OPENCLAW_MIN_VERSION=$(grep 'min_openclaw_version' /tmp/blueprint.yaml | awk '{print $2}' | tr -d '"'); \
-    [ -n "$OPENCLAW_MIN_VERSION" ] \
-    || { echo "Error: Could not parse min_openclaw_version from nemoclaw-blueprint/blueprint.yaml"; exit 1; }; \
+    OPENCLAW_MIN_VERSION=$(awk -F': *' '/^[[:space:]]*min_openclaw_version:[[:space:]]*/ { gsub(/"/, "", $2); print $2; exit }' /tmp/blueprint.yaml); \
+    echo "$OPENCLAW_MIN_VERSION" | grep -qxE '[0-9]+(\.[0-9]+)*' \
+    || { echo "Error: Could not parse a valid min_openclaw_version from nemoclaw-blueprint/blueprint.yaml"; exit 1; }; \
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Dockerfile.base` around lines 135 - 137, The extraction of
OPENCLAW_MIN_VERSION should be made robust by anchoring to the YAML key and
validating the format: replace the current grep+awk pipeline that sets
OPENCLAW_MIN_VERSION with a single awk (or grep -P) command that matches lines
beginning with the literal key "min_openclaw_version" (e.g.
/^min_openclaw_version[[:space:]]*:/), extracts the value after the colon,
strips surrounding quotes, and assigns it to OPENCLAW_MIN_VERSION; keep the
existing check that the variable is non-empty and the error/exit branch
unchanged so a missing or malformed value still triggers the same failure path.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Dockerfile.base`:
- Around line 135-137: The extraction of OPENCLAW_MIN_VERSION should be made
robust by anchoring to the YAML key and validating the format: replace the
current grep+awk pipeline that sets OPENCLAW_MIN_VERSION with a single awk (or
grep -P) command that matches lines beginning with the literal key
"min_openclaw_version" (e.g. /^min_openclaw_version[[:space:]]*:/), extracts the
value after the colon, strips surrounding quotes, and assigns it to
OPENCLAW_MIN_VERSION; keep the existing check that the variable is non-empty and
the error/exit branch unchanged so a missing or malformed value still triggers
the same failure path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 537b5cd3-06e2-4a30-9b82-7fd9006cc462

📥 Commits

Reviewing files that changed from the base of the PR and between f812cb8 and 8d49b82.

📒 Files selected for processing (4)
  • .github/workflows/base-image.yaml
  • Dockerfile.base
  • scripts/install.sh
  • test/install-preflight.test.js
✅ Files skipped from review due to trivial changes (2)
  • scripts/install.sh
  • test/install-preflight.test.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/base-image.yaml

@cv cv added the v0.0.10 Release target label Apr 8, 2026
@cv cv self-assigned this Apr 8, 2026
Copy link
Copy Markdown
Contributor

@cv cv left a comment

Choose a reason for hiding this comment

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

Security Review — WARNING (non-blocking findings)

The version validation in Dockerfile.base is well done — strict regex with -x, minimum-version check against blueprint.yaml, and npm registry confirmation. Good defense-in-depth.

Requested change

Workflow input validation: The format('OPENCLAW_VERSION={0}', inputs.openclaw_version) expression in base-image.yaml doesn't validate the input before assembling build-args. A newline in the input could inject extra build-args that bypass the Dockerfile regex. Add an input validation step before the Docker build:

- name: Validate OpenClaw version input
  if: inputs.openclaw_version != ''
  run: echo "${{ inputs.openclaw_version }}" | grep -qxE '[0-9]+(\.[0-9]+)*'

Minor (non-blocking)

  • Consider quoting "openclaw@${OPENCLAW_VERSION}" in npm install for style (already safe due to regex gate)
  • make check and npm test boxes are unchecked in the PR description

@hunglp6d hunglp6d requested a review from namng-n4a April 9, 2026 02:11
@hunglp6d hunglp6d force-pushed the feat/openclaw-dynamic-version branch from 43c6b6a to b794547 Compare April 9, 2026 02:12
@ericksoa ericksoa added v0.0.11 Release target and removed v0.0.10 Release target labels Apr 9, 2026
@hunglp6d hunglp6d force-pushed the feat/openclaw-dynamic-version branch from 262f08e to 027c5b9 Compare April 9, 2026 04:13
Comment thread Dockerfile.base
@hunglp6d hunglp6d force-pushed the feat/openclaw-dynamic-version branch from f0ec12a to 16c49fd Compare April 9, 2026 06:41
@cv
Copy link
Copy Markdown
Contributor

cv commented Apr 9, 2026

I ported this branch across the JS→TS migration and merged the latest main into it.

Validation rerun:

  • npm run build:cli
  • npm run typecheck:cli
  • npm run lint
  • npm test

@hunglp6d hunglp6d force-pushed the feat/openclaw-dynamic-version branch from c0b95bc to 39d3d18 Compare April 9, 2026 20:08
@hunglp6d hunglp6d closed this Apr 9, 2026
@hunglp6d hunglp6d mentioned this pull request Apr 9, 2026
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.0.11 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Argumentize OpenClaw version

5 participants