Community程式設計與開發github.com

OpenClaw 預發佈外掛測試

規劃並執行 OpenClaw 外掛的預發佈驗證,涵蓋捆綁外掛、套件構件、生命週期指令、doctor/fix、配置往返、閘道啟動、SDK 相容性、Docker E2E、套件驗收與 Testbox 驗證。

OpenClaw 預發佈外掛測試 是什麼?

此技能專為 OpenClaw 外掛系統的預發佈驗證而設計,旨在確保外掛作為產品介面(而非僅原始碼測試)的穩定性與可靠性。它涵蓋了捆綁外掛的生命週期(安裝、檢查、啟用、停用、卸載)、套件構件行為、doctor/fix 配置驗證與冪等性、配置探索與往返、閘道啟動與引導、外部外掛的 SDK 相容性、以及僅在安全憑證存在時進行的即時提供者/頻道探測。 支援的平台包括 GitHub Actions(主要用於套件驗收)、Blacksmith Testbox(用於 Docker 與套件相關測試)以及本機執行。技能提供詳細的測試矩陣、執行選擇指南、以及標準化報告格式,幫助開發者在發佈前獲得信心。它還包含針對新 Testbox 測試案例、doctor/fix 矩陣、閘道啟動矩陣與配置往返代表性外掛的具體計劃,確保全面覆蓋。

相容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/.agents/skills/openclaw-pre-release-plugin-testing

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

OpenClaw 預發佈外掛測試 是做什麼的?

當使用者要求外掛發佈信心、外掛生命週期掃描、套件構件外掛驗證,或「發佈前我們還應該測試什麼?」時,使用此技能。它與 openclaw-testing 互補;在選擇最便宜的穩定執行器或偵錯失敗執行時,也應使用該技能。

目標

將外掛系統作為產品介面進行驗證,而不僅是原始碼測試:

  • 捆綁外掛生命週期:安裝、檢查、啟用、停用、卸載
  • 從乾淨的 HOME 路徑驗證套件構件行為
  • doctor/fix/配置驗證與冪等性
  • 配置探索與配置往返
  • 狀態/日誌可見性與診斷
  • 閘道啟動/引導及外掛中繼資料快照
  • 真實外部外掛的公開 SDK 相容性
  • 僅在安全憑證存在時進行即時提供者/頻道探測

初步檢查

從 OpenClaw 儲存庫根目錄執行:

pnpm docs:list
git status --short --branch
readlink node_modules
pnpm changed:lanes --json

在 Codex 工作樹(位於 .codex/worktrees 下)中,node_modules 必須是主 OpenClaw 簽出目錄的符號連結。請勿在其中執行 pnpm install。對於廣泛或大量套件的驗證,請使用 Blacksmith Testbox 或 GitHub Actions。

執行器選擇

建議優先順序如下:

  1. GitHub Package Acceptance 用於可安裝套件的產品驗證。
  2. ci-build-artifacts-testbox.yml Testbox 當 Docker/套件測試需要預先植入的 dist、dist-runtime 與套件快取時。
  3. ci-check-testbox.yml Testbox 用於原始碼檢查、目標 Vitest、套件邊界檢查或聚焦的 Docker 測試。
  4. 僅本機目標指令 用於小型格式/靜態/單元探測。

避免從過時的稀疏工作樹執行長時間的套件 Docker 執行。如果 Testbox 同步報告數百個已更改檔案或開始刪除套件輸入,請停止並從目前的 main 分支啟動一個新環境,或改用 Package Acceptance。

現有基線

在發明新的測試覆蓋範圍之前,請執行或驗證以下指令:

OPENCLAW_TESTBOX=1 pnpm check:changed
pnpm run test:extensions:package-boundary:canary
pnpm run test:extensions:package-boundary:compile
pnpm test:docker:plugins
OPENCLAW_PLUGINS_E2E_CLAWHUB=0 pnpm test:docker:plugins
pnpm test:docker:plugin-update
pnpm test:docker:bundled-channel-deps:fast

如需完整的捆綁安裝/卸載驗證,請將打包的掃描分片執行:

OPENCLAW_BUNDLED_PLUGIN_SWEEP_TOTAL=8 \
OPENCLAW_BUNDLED_PLUGIN_SWEEP_INDEX=<0-7> \
pnpm test:docker:bundled-plugin-install-uninstall

預期目前打包範圍:分片 0-7 中 116 個公開捆綁外掛。私有 QA 外掛僅為原始碼模式,除非套件明確包含它們。

信心矩陣

使用此矩陣進行預發佈簽核。記錄通過/失敗、執行 URL/Testbox ID、套件 SHA/版本,以及跳過的即時測試原因。

表面驗證方法建議執行器
套件構件Package Acceptance suite_profile=package 或自訂測試GitHub Actions
捆綁生命週期8 分片 test:docker:bundled-plugin-install-uninstallTestbox 或發佈 Docker
外部外掛test:docker:plugins 與 plugins-offlineTestbox/package acceptance
更新無操作test:docker:plugin-updateTestbox/package acceptance
通道執行時期依賴test:docker:bundled-channel-deps:fast 加上關鍵通道Testbox/package acceptance
Doctor/fix植入錯誤配置 + doctor --fix --non-interactive新的 Docker/Testbox 測試架構
配置往返config set/get、檢查、doctor、重新載入、差異雜湊新的 Docker/Testbox 測試架構
閘道啟動乾淨 HOME、外掛群組啟用/停用、狀態 JSON新的 Docker/Testbox 測試架構
SDK 相容性使用 SDK 子路徑的目錄、tgz 及 file: 外部外掛test:docker:plugins 加上新的冒煙測試
即時測試僅針對目前環境的已編輯提供者/頻道探測Testbox 即時測試

套件驗收計劃

在驗證發佈分支、測試版或候選套件時使用:

gh workflow run package-acceptance.yml \
  --repo openclaw/openclaw \
  --ref main \
  -f workflow_ref=main \
  -f source=ref \
  -f package_ref=<branch-or-sha> \
  -f suite_profile=custom \
  -f docker_lanes='plugins-offline plugin-update bundled-channel-deps-compat doctor-switch update-channel-switch config-reload mcp-channels npm-onboard-channel-agent' \
  -f telegram_mode=mock-openai

使用 source=npm -f package_spec=openclaw@beta 進行已發佈測試版的驗證。除非發佈流程另有指示,否則將 workflow_ref 保留為目前可信的測試架構程式碼。

新的 Testbox 測試架構計劃

如果需要更高的確定性,請新增或執行一個 plugin-lifecycle-matrix Docker 測試,該測試使用一個套件 tarball 與分片的外掛清單。每個外掛:

  1. 從乾淨的 HOME 開始。
  2. 擷取 plugins list --json。
  3. 執行 plugins install <id>。
  4. 執行 plugins inspect <id> --json。
  5. 執行 plugins disable <id>,然後斷言停用的可見性。
  6. 執行 plugins enable <id>,但需要配置的外掛不在此限。
  7. 執行 plugins registry --refresh。
  8. 執行 doctor --non-interactive。
  9. 執行 plugins uninstall <id> --force。
  10. 斷言無殘留配置條目、允許/拒絕殘留、安裝記錄、受管理目錄或捆綁的 dist/extensions/... 載入路徑。
  11. 斷言診斷資訊中不包含 level: "error",且輸出會編輯掉看似機密的值。

請特別留意 memory-lancedb:它需要配置。首先斷言在沒有嵌入配置的情況下安裝不會啟用它,然後執行第二個已配置的案例。

Doctor/Fix 矩陣

植入錯誤狀態並要求 doctor --fix --non-interactive 進行修復,然後再次執行 doctor 並要求冪等性:

  • 過時的 plugins.allow
  • 過時的 plugins.entries
  • 缺少通道外掛時的過時通道配置
  • 無效的 plugins.entries.<id>.config
  • plugins.load.paths 中的打包捆綁路徑
  • 舊版 plugins.installs
  • 已停用但不得暫存執行時期依賴的通道/外掛配置
  • 必須保持不變的 root 擁有的全域套件樹

閘道啟動矩陣

在 Docker 中以乾淨狀態啟動打包的 OpenClaw:

  • 提供者外掛已啟用,無憑證:準備就緒但有警告,無崩潰
  • 通道外掛配置為已停用:未暫存執行時期依賴
  • 啟動時啟用的外掛:準備就緒並反映在狀態中
  • 無效的單一外掛配置:錯誤外掛被跳過/隔離,其餘外掛保持正常

斷言:

  • 閘道達到就緒狀態
  • openclaw status --json 包含外掛診斷
  • openclaw plugins inspect --all --json 可解析
  • 套件樹未被修改
  • 日誌中不包含原始 token

配置往返代表外掛

使用代表外掛系列而非每個外掛進行深度配置往返:

  • 提供者:openai、anthropic、mistral、openrouter
  • 通道:telegram、discord、slack、whatsapp
  • 記憶體:memory-lancedb
  • 功能/執行時期:browser、acpx、tokenjuice

對於每個代表外掛:

  1. 透過 CLI 寫入配置(如可行)。
  2. 透過 config get 或 JSON 讀回配置。
  3. 執行 plugins inspect。
  4. 執行 doctor --non-interactive。
  5. 觸發閘道配置重新載入(如適用)。
  6. 比較執行無操作指令前後的配置雜湊值。

外部 SDK 冒煙測試

在套件 Docker 測試中,建立小型外部外掛並從以下來源安裝:

  • 本機目錄
  • .tgz
  • file: npm 規範

涵蓋 CJS 與 ESM 格式,以及至少一個匯入聚焦的 openclaw/plugin-sdk/* 子路徑的外掛。斷言 plugins inspect 能看到其工具、閘道方法、CLI 指令或服務。

即時探測規則

在進行即時測試工作之前,在 Testbox 中設定允許的環境變數,並產生一個已編輯的可用性矩陣:僅顯示存在/缺失,絕不顯示值。

僅對存在的憑證執行探測。優先使用 auth/catalog/status 探測,而非發送使用者可見的訊息。如果探測可能接觸到外部使用者、通道或工作區,請停止並詢問使用者。

報告

以以下格式報告:

package/ref:
tbx ids / run urls:
matrix:
  bundled lifecycle:
  package acceptance:
  doctor/fix:
  gateway bootstrap:
  config round-trip:
  sdk external:
  live-ish:
failures:
skips:
next highest-value gap:

明確說明失敗原因是否為 Testbox 同步/環境損壞(而非產品行為),並透過乾淨的重新執行或與目前 main 分支比較來證明。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

相關技能