From 2a7ba582cbfdd9dd4c89748b932762c6088e6b84 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Tue, 28 Apr 2026 16:44:38 -0700 Subject: [PATCH] Use kitchen sink for ClawHub plugin E2E (#73821) --- docs/help/testing.md | 4 ++-- scripts/e2e/plugins-docker.sh | 37 ++++++++++++++++++++++------------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/docs/help/testing.md b/docs/help/testing.md index c396c384207..6d51dd957cd 100644 --- a/docs/help/testing.md +++ b/docs/help/testing.md @@ -613,8 +613,8 @@ The live-model Docker runners also bind-mount only the needed CLI auth homes (or - MCP channel bridge (seeded Gateway + stdio bridge + raw Claude notification-frame smoke): `pnpm test:docker:mcp-channels` (script: `scripts/e2e/mcp-channels-docker.sh`) - Pi bundle MCP tools (real stdio MCP server + embedded Pi profile allow/deny smoke): `pnpm test:docker:pi-bundle-mcp-tools` (script: `scripts/e2e/pi-bundle-mcp-tools-docker.sh`) - Cron/subagent MCP cleanup (real Gateway + stdio MCP child teardown after isolated cron and one-shot subagent runs): `pnpm test:docker:cron-mcp-cleanup` (script: `scripts/e2e/cron-mcp-cleanup-docker.sh`) -- Plugins (install smoke, ClawHub install/uninstall, marketplace updates, and Claude-bundle enable/inspect): `pnpm test:docker:plugins` (script: `scripts/e2e/plugins-docker.sh`) - Set `OPENCLAW_PLUGINS_E2E_CLAWHUB=0` to skip the live ClawHub block, or override the default package with `OPENCLAW_PLUGINS_E2E_CLAWHUB_SPEC` and `OPENCLAW_PLUGINS_E2E_CLAWHUB_ID`. +- Plugins (install smoke, ClawHub kitchen-sink install/uninstall, marketplace updates, and Claude-bundle enable/inspect): `pnpm test:docker:plugins` (script: `scripts/e2e/plugins-docker.sh`) + Set `OPENCLAW_PLUGINS_E2E_CLAWHUB=0` to skip the ClawHub block, or override the default kitchen-sink package/runtime pair with `OPENCLAW_PLUGINS_E2E_CLAWHUB_SPEC` and `OPENCLAW_PLUGINS_E2E_CLAWHUB_ID`. Without `OPENCLAW_CLAWHUB_URL`/`CLAWHUB_URL`, the test uses a hermetic local ClawHub fixture server. - Plugin update unchanged smoke: `pnpm test:docker:plugin-update` (script: `scripts/e2e/plugin-update-unchanged-docker.sh`) - Config reload metadata smoke: `pnpm test:docker:config-reload` (script: `scripts/e2e/config-reload-source-docker.sh`) - Bundled plugin runtime deps: `pnpm test:docker:bundled-channel-deps` builds a small Docker runner image by default, builds and packs OpenClaw once on the host, then mounts that tarball into each Linux install scenario. Reuse the image with `OPENCLAW_SKIP_DOCKER_BUILD=1`, skip the host rebuild after a fresh local build with `OPENCLAW_BUNDLED_CHANNEL_HOST_BUILD=0`, or point at an existing tarball with `OPENCLAW_CURRENT_PACKAGE_TGZ=/path/to/openclaw-*.tgz`. The full Docker aggregate and release-path bundled-channel chunks pre-pack this tarball once, then shard bundled channel checks into independent lanes, including separate update lanes for Telegram, Discord, Slack, Feishu, memory-lancedb, and ACPX. Release chunks split channel smokes, update targets, and setup/runtime contracts into `bundled-channels-core`, `bundled-channels-update-a`, `bundled-channels-update-b`, and `bundled-channels-contracts`; the aggregate `bundled-channels` chunk remains available for manual reruns. The release workflow also splits provider installer chunks and bundled plugin install/uninstall chunks; legacy `package-update`, `plugins-runtime`, and `plugins-integrations` chunks remain aggregate aliases for manual reruns. Use `OPENCLAW_BUNDLED_CHANNELS=telegram,slack` to narrow the channel matrix when running the bundled lane directly, or `OPENCLAW_BUNDLED_CHANNEL_UPDATE_TARGETS=telegram,acpx` to narrow the update scenario. The lane also verifies that `channels..enabled=false` and `plugins.entries..enabled=false` suppress doctor/runtime-dependency repair. diff --git a/scripts/e2e/plugins-docker.sh b/scripts/e2e/plugins-docker.sh index b7393c861bc..e482bef6afd 100755 --- a/scripts/e2e/plugins-docker.sh +++ b/scripts/e2e/plugins-docker.sh @@ -649,9 +649,9 @@ NODE if [ "${OPENCLAW_PLUGINS_E2E_CLAWHUB:-1}" = "0" ]; then echo "Skipping ClawHub plugin install and uninstall (OPENCLAW_PLUGINS_E2E_CLAWHUB=0)." else -echo "Testing ClawHub plugin install and uninstall..." -CLAWHUB_PLUGIN_SPEC="${OPENCLAW_PLUGINS_E2E_CLAWHUB_SPEC:-clawhub:openclaw-now4real}" -CLAWHUB_PLUGIN_ID="${OPENCLAW_PLUGINS_E2E_CLAWHUB_ID:-now4real}" +echo "Testing ClawHub kitchen-sink plugin install and uninstall..." +CLAWHUB_PLUGIN_SPEC="${OPENCLAW_PLUGINS_E2E_CLAWHUB_SPEC:-clawhub:openclaw-kitchen-sink}" +CLAWHUB_PLUGIN_ID="${OPENCLAW_PLUGINS_E2E_CLAWHUB_ID:-openclaw-kitchen-sink-fixture}" export CLAWHUB_PLUGIN_SPEC CLAWHUB_PLUGIN_ID start_clawhub_fixture_server() { @@ -669,9 +669,9 @@ const { createRequire } = require("node:module"); const portFile = process.argv[2]; const requireFromApp = createRequire(path.join(process.cwd(), "package.json")); const JSZip = requireFromApp("jszip"); -const packageName = "openclaw-now4real"; -const pluginId = "now4real"; -const version = "0.1.2"; +const packageName = "openclaw-kitchen-sink"; +const pluginId = "openclaw-kitchen-sink-fixture"; +const version = "0.1.0"; async function main() { const zip = new JSZip(); @@ -692,9 +692,18 @@ async function main() { "package/index.js", `module.exports = { id: "${pluginId}", - name: "Now 4 Real", + name: "OpenClaw Kitchen Sink", + description: "Docker E2E kitchen-sink plugin fixture", register(api) { - api.registerGatewayMethod("now4real.ping", async () => ({ ok: true })); + api.on("before_agent_start", async (event, context) => ({ + kitchenSink: true, + observedEventKeys: Object.keys(event || {}), + observedContextKeys: Object.keys(context || {}), + })); + api.registerTool(() => null, { name: "kitchen_sink_tool" }); + api.registerGatewayMethod("kitchen-sink.ping", async () => ({ ok: true })); + api.registerCli(() => {}, { commands: ["kitchen-sink"] }); + api.registerService({ id: "kitchen-sink-service", start: () => {} }); }, }; `, @@ -735,7 +744,7 @@ async function main() { json(response, { package: { name: packageName, - displayName: "Now 4 Real", + displayName: "OpenClaw Kitchen Sink", family: "code-plugin", channel: "official", isOfficial: true, @@ -744,8 +753,8 @@ async function main() { createdAt: 0, updatedAt: 0, compatibility: { - pluginApiRange: ">=2026.4.11", - minGatewayVersion: "2026.4.11", + pluginApiRange: ">=2026.4.26", + minGatewayVersion: "2026.4.26", }, }, }); @@ -758,11 +767,11 @@ async function main() { version: { version, createdAt: 0, - changelog: "Fixture package for Docker plugin E2E.", + changelog: "Kitchen-sink fixture package for Docker plugin E2E.", sha256hash, compatibility: { - pluginApiRange: ">=2026.4.11", - minGatewayVersion: "2026.4.11", + pluginApiRange: ">=2026.4.26", + minGatewayVersion: "2026.4.26", }, }, });