ci: E2E integration test against latest OpenClaw#64
Merged
vincentkoc merged 17 commits intomainfrom Apr 21, 2026
Merged
Conversation
Installs OpenClaw fresh, builds the plugin from source, starts the gateway with a mock LLM + mock Opik server, runs a real agent turn, and asserts traces and spans were exported. Catches hook-lifecycle regressions that unit tests cannot detect. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
openclaw latest now requires Node >=22.14.0; pinning to 22.12.0 broke the plugin install step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
npm@latest self-upgrade breaks on Node 22.22.2 in GitHub Actions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- gateway.auth must be an object: {"mode": "none"}
- models.providers.openai.apiUrl -> baseUrl
- models.providers.openai.models is required (array)
- remove unrecognized keys: models.defaults, agents.defaults.provider
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Model config uses agents.defaults.model.primary with provider/model format. Credentials go under auth.profiles, not models.providers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
auth.profiles only accepts provider and mode — apiUrl and apiKey are loaded from OPENAI_API_KEY and OPENAI_BASE_URL env vars. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
openclaw agent requires --to, --session-id, or --agent to target a session. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use token auth so CLI has operator scope - Write per-agent auth-profiles.json for OpenAI API key - Pass OPENCLAW_GATEWAY_TOKEN to agent turn command Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
openclaw@latest install consistently takes 10+ minutes. Caching the npm global prefix directory cuts that to seconds on cache hits. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All steps that connect to the gateway need OPENCLAW_GATEWAY_TOKEN. Setting it at job level avoids missing it on health checks and stop steps. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Unit tests can't catch the class of bug fixed in #59 — hooks silently dropped due to OpenClaw plugin lifecycle changes. OpenClaw moves fast; we need a test that will break if a future OpenClaw release breaks the plugin again.
What this adds
A self-contained E2E workflow (
.github/workflows/e2e.yml) that:npm install -g openclaw@latest)scripts/mock-opik-server.mjs) that captures all trace/span API callsscripts/mock-llm-server.mjs) — OpenAI-compatible, returns a canned response so no real API key is neededopenclaw agent --message "ping")If the PR #59 regression had existed, step 6 would have caught it — zero traces would have reached the mock server.
No secrets required
Both LLM and Opik are mocked locally. The workflow is fully self-contained.
Matrix
The workflow runs against
openclaw@latesttoday. The matrix can be extended to pin specific versions as OpenClaw ships new releases.Files
.github/workflows/e2e.ymlscripts/mock-opik-server.mjse2e-result.jsonscripts/mock-llm-server.mjsscripts/check-e2e-result.mjs