Skip to content

feat: add OpenClaw AI assistant stack - #695

Merged
michael-valdron merged 5 commits into
mainfrom
feat/openclaw-stack
Jul 30, 2026
Merged

feat: add OpenClaw AI assistant stack#695
michael-valdron merged 5 commits into
mainfrom
feat/openclaw-stack

Conversation

@akurinnoy

@akurinnoy akurinnoy commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

Adds an OpenClaw AI assistant stack to the devfile registry.

OpenClaw is a personal AI assistant that runs a Gateway service with a web Control UI and connects to 25+ messaging channels (WhatsApp, Telegram, Slack, Discord, etc.). TypeScript/Node.js, MIT license, 383K+ GitHub stars.

The stack follows the same two-container pattern as the existing AI agent stacks (hermes, picoclaw, zeroclaw):

  • tools container - universal developer image for editor/terminal
  • openclaw container - runs the Gateway service on port 18789

Key design decisions:

  • State relocated to /opt/data via OPENCLAW_CONFIG_DIR to handle OpenShift arbitrary UIDs (the official image uses uid 1000 with 700-permission dirs)
  • Gateway token auto-generated on first boot, persisted to PVC
  • gateway.trustedProxies set to RFC 1918 ranges so connections through the cluster network are treated as local
  • cookiesAuthEnabled: true on the Control UI endpoint
  • Skipped in odo v3 tests - the gateway requires token setup before responding

First boot flow:

  1. Open the Control UI endpoint
  2. Run show-token command in the terminal to get the gateway token
  3. Paste the token and click Connect
  4. Approve device pairing (one-time per browser)
  5. Run setup command to configure API keys and model provider

Related Issue(s)

None

Acceptance Criteria

  • Contributing guide

Read the contributing guide and followed the stack structure conventions.

  • Test automation

Schema validation passes. Stack skipped in odo v3 tests - the gateway requires onboarding before it can serve health checks within the 3-minute timeout.

  • Documentation

No documentation updates needed.

  • Check Tools Provider

Tested on CRC cluster with Dev Spaces. Gateway boots, Control UI accessible, WebSocket connection works after token + device pairing.

Tests Performed

  1. Ran bash tests/validate_devfile_schemas.sh - all stacks pass including openclaw
  2. Built the devfile registry image with the openclaw stack
  3. Deployed to a CRC cluster running Dev Spaces
  4. Created an openclaw DevWorkspace from the custom registry
  5. Verified the gateway starts and reaches ready state
  6. Accessed the Control UI via the endpoint route
  7. Connected with the auto-generated gateway token

How To Test

  1. Build the devfile registry image:
    podman build -t devfile-registry:openclaw -f .ci/Dockerfile .
    
  2. Deploy to a cluster with Dev Spaces and create a workspace using the openclaw stack
  3. Open the Control UI endpoint in a browser
  4. In the workspace terminal, run the show-token command to get the gateway token
  5. Paste the token into the Control UI and click Connect
  6. Approve device pairing when prompted
  7. Verify the dashboard loads

Notes To Reviewer

  • Image docker.io/openclaw/openclaw:2026.7.1 is the latest stable release, verified via skopeo
  • The gateway.auth.mode=none approach was tested but OpenClaw refuses to bind to non-loopback without auth - this is by design
  • Device pairing is a one-time approval per browser. There's no config to disable it, but it's a minor friction for a dev workspace
  • Image mirroring to quay.io is deferred to a follow-up (same as hermes, picoclaw, zeroclaw)

Summary by CodeRabbit

  • New Features
    • Added the OpenClaw AI assistant stack (version 1.0.0), including an OpenClaw gateway with a secure, public HTTPS control interface.
    • Enabled onboarding, health/readiness checks, diagnostics, token handling, and gateway restart workflows.
    • Configured persistent workspace and configuration storage with OpenShift-friendly arbitrary-UID support.
  • Chores / Maintenance
    • Updated code ownership rules for the OpenClaw stacks directory.
  • Tests
    • Excluded the OpenClaw stack from the ODOV3 Ginkgo test matrix.

@akurinnoy
akurinnoy requested a review from a team as a code owner July 21, 2026 14:14
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds the OpenClaw stack with version metadata, an OpenShift-compatible gateway Devfile, persistent storage, Control UI configuration, operator commands, ownership rules, and an ODOV3 test exclusion.

Changes

OpenClaw stack

Layer / File(s) Summary
Stack metadata and ownership
stacks/openclaw/stack.yaml, .github/CODEOWNERS
Registers OpenClaw version 1.0.0 as the default and assigns ownership for its stack directory.
Gateway runtime provisioning
stacks/openclaw/1.0.0/devfile.yaml
Defines tools and gateway containers, persistent data storage, OpenShift-compatible environment settings, token initialization, HTTPS Control UI exposure, health checks, onboarding, diagnostics, and restart commands.
ODOV3 test handling
tests/check_odov3.sh
Excludes the OpenClaw stack from the ODOV3 test matrix.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: thepetk, michael-valdron, ibuziuk

Sequence Diagram(s)

sequenceDiagram
  participant GatewayContainer
  participant PersistentVolume
  participant ControlUI
  GatewayContainer->>PersistentVolume: Read or write gateway token and state
  GatewayContainer->>GatewayContainer: Configure and start OpenClaw gateway
  ControlUI->>GatewayContainer: Request HTTPS Control UI on port 18789
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a new OpenClaw AI assistant stack.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/openclaw-stack

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@stacks/openclaw/1.0.0/devfile.yaml`:
- Around line 136-141: Update the restart-gateway command so it signals the
running node process rather than PID 1, preventing the openclaw container from
terminating. Ensure the startup flow keeps node under a while-true restart loop
so the process restarts in place while the container remains running.
- Line 75: Update the TOKEN generation command to read at least 48 bytes from
/dev/urandom before base64 encoding and filtering, so the final head -c 48
operation can produce the requested 48-character alphanumeric token.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 088de722-d9a2-4bfc-8a1f-b7de97dfab60

📥 Commits

Reviewing files that changed from the base of the PR and between 9ae5025 and 65fd0f7.

📒 Files selected for processing (4)
  • .github/CODEOWNERS
  • stacks/openclaw/1.0.0/devfile.yaml
  • stacks/openclaw/stack.yaml
  • tests/check_odov3.sh

Comment thread stacks/openclaw/1.0.0/devfile.yaml Outdated
Comment thread stacks/openclaw/1.0.0/devfile.yaml
Comment thread stacks/openclaw/1.0.0/devfile.yaml Outdated
@openshift-ci openshift-ci Bot added lgtm Looks good to me and removed lgtm Looks good to me labels Jul 24, 2026
@akurinnoy
akurinnoy force-pushed the feat/openclaw-stack branch from 23567a4 to cd77f7f Compare July 27, 2026 13:48

@michael-valdron michael-valdron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

Was able to launch the OpenClaw AI stack from my devfile registry build/deployment into DevSpaces.

Image Image Image Image

@michael-valdron

Copy link
Copy Markdown
Member

/needs-rebase

akurinnoy and others added 5 commits July 30, 2026 15:24
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Co-authored-by: Ilya Buziuk <ibuziuk@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
@akurinnoy
akurinnoy force-pushed the feat/openclaw-stack branch from cd77f7f to f65d47a Compare July 30, 2026 12:27
@openshift-ci openshift-ci Bot removed lgtm Looks good to me needs-rebase labels Jul 30, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
stacks/openclaw/1.0.0/devfile.yaml (1)

136-140: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Use a container-aware gateway restart.

The Gateway is launched as a foreground process at Line 89, not an installed OpenClaw service. gateway stop therefore cannot reliably stop it; its error is suppressed, then openclaw gateway can collide with the existing listener on port 18789. Use a supervisor-managed restart mechanism, or remove this command and instruct users to restart the workspace. OpenClaw documents gateway stop for managed services and foreground shutdown via process interruption. (docs.openclaw.ai)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@stacks/openclaw/1.0.0/devfile.yaml` around lines 136 - 140, Update the
restart-gateway exec command to use a container-aware, supervisor-managed
restart for the foreground Gateway process instead of invoking openclaw gateway
stop; alternatively remove this command and direct users to restart the
workspace. Do not suppress shutdown failures or launch a second gateway that
could conflict on port 18789.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@stacks/openclaw/1.0.0/devfile.yaml`:
- Around line 75-81: Remove the gateway token output from the token-generation
block after writing it to TOKEN_FILE, including the echo that prints ${TOKEN}
and any surrounding banner intended only to display it. Preserve secure file
creation and the existing show-token retrieval path.
- Line 86: Update the OpenClaw Control UI configuration command to replace the
wildcard allowedOrigins value with the deployment’s concrete HTTPS origin or an
explicitly workspace-supplied allowlist, preserving the existing configuration
flow and fallback behavior.

---

Duplicate comments:
In `@stacks/openclaw/1.0.0/devfile.yaml`:
- Around line 136-140: Update the restart-gateway exec command to use a
container-aware, supervisor-managed restart for the foreground Gateway process
instead of invoking openclaw gateway stop; alternatively remove this command and
direct users to restart the workspace. Do not suppress shutdown failures or
launch a second gateway that could conflict on port 18789.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f4c91d99-a176-4914-9233-ab55dfe5cf47

📥 Commits

Reviewing files that changed from the base of the PR and between 23567a4 and f65d47a.

📒 Files selected for processing (4)
  • .github/CODEOWNERS
  • stacks/openclaw/1.0.0/devfile.yaml
  • stacks/openclaw/stack.yaml
  • tests/check_odov3.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • stacks/openclaw/stack.yaml
  • .github/CODEOWNERS

Comment thread stacks/openclaw/1.0.0/devfile.yaml
Comment thread stacks/openclaw/1.0.0/devfile.yaml

@michael-valdron michael-valdron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Looks good to me label Jul 30, 2026
@openshift-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akurinnoy, ibuziuk, michael-valdron

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@michael-valdron
michael-valdron merged commit 661402a into main Jul 30, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm Looks good to me

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants