Community编程与开发github.com

Discord E2E 测试

使用 Convex 管理的 QA 机器人测试 Discord:无需 Gateway 即可检查凭据,操作自有消息,或验证 OpenClaw 回复、文件、线程、反应、流和打字功能。区分 API 与 Gateway 的证据以及手动用户交互。

Discord E2E 测试 是什么?

此技能用于验证 Discord 集成的端到端行为,主要针对使用 Convex 管理租用 QA 机器人的项目。它提供了多个边界测试选项:从只读检查机器人身份、频道和历史访问,到使用现有生命周期测试机器人发起的操作(如消息、反应、文件、线程和清理),再到通过 QA Lab 流程证明 OpenClaw 行为(涉及真实 Discord 事件、独立 SUT Gateway 和选择的模型)。关键区别在于,API 探测不启动 Gateway 或模型,仅验证 Discord API 操作;而 QA Lab 流程则是一个完整的端到端测试,包含 Gateway 入场、模型调用和状态清理。该技能还提供了详细的诊断命令(如 `bot-readiness.mjs` 和 `qa discord --doctor`)来在运行完整场景前检查租用状态和权限。证据收集包括 API 调用记录、Gateway 事件日志、工具追踪和提供者请求证据;视觉交互(如人类斜杠命令、组件点击)需要通过授权的 Discord 客户端手动验证。该技能支持多种平台(Claude Code、Cursor 等),其结构化的 SKILL.md 文档指导用户根据测试目标选择适当的入口点,并提供具体的 Bash 命令来执行测试和解读结果。

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/.agents/skills/discord-e2e

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Discord E2E

选择能够证明所需行为的最小边界:

目标入口点证明内容
检查共享的 bot 对和频道下方的只读命令Bot 身份、固定的 SUT、公会文本频道和历史访问
测试 bot 发起的变更操作现有的 channelE2e 生命周期自有消息、反应、文件、线程和清理
证明 OpenClaw 行为现有的 QA Lab 流程真实 Discord 事件、独立的 SUT Gateway 和选定的模型车道
证明人类交互或渲染授权的手动 Discord 客户端实际用户操作或检查客户端截图

API 探测不启动 Gateway、事件记录器或模型。QA Lab 仍然是产品 E2E 的所有者:它控制其租用、临时 Gateway、提供者、取消和清理。两种方式都不会更改应用权限或配置凭据。

1. 选择证据

阅读功能配方了解更改的行为。原生 fixture 调用证明 Discord API 操作,不证明模型调用了工具。SUT 往返额外证明 Gateway 入场和存储的公开回复。模型-工具声明还需要工具追踪和提供者请求证据。

人类斜杠命令、组件点击、模态框、临时交互和人类与 bot 的私信需要授权的 manual 客户端。Bot 发布 /status 会发送文本,而不是斜杠交互。仅使用租约中的官方 bot 令牌。Discord 禁止用户令牌/自建 bot 自动化;Slack 的用户 OAuth 路由在这里没有对应功能。

2. 准备并检查当前租约

使用测试中依赖就绪的 OpenClaw 检出。设置前提是已通过身份验证的 Convex CLI 并有权访问发布的 QA 代理。现有的共享租约助手发现存储库的代理绑定和 CI 凭据(在内存中);您无需复制 bot 令牌、公会 ID 或代理秘密。如果身份验证缺失,请操作员运行 convex login(或已缓存的 bunx --no-install convex login)一次。不要代表操作员安装 CLI 或登录。网络/权限错误不是需要再次登录的证据。

如需快速检查而不使用 QA Lab:

node .agents/skills/discord-e2e/scripts/bot-readiness.mjs

该检查在 Discord 中为只读,但它会获取、续租并释放一个 Convex 租约。它不会创建任何 Discord 对象,也没有变更模式。阅读bot API 就绪了解负载、权限限制、私有结果和失败处理。

此探测不验证 Gateway 意图、事件投递、模型行为或所有原生 fixture 权限。对于 OpenClaw 声明,继续使用 QA Lab:

pnpm openclaw qa discord --list-scenarios
pnpm openclaw qa discord --doctor \
  --output-dir .artifacts/qa-e2e/discord-doctor

要求此车道的 QA Lab doctor 通过。它不发送任何 fixture 消息;它检查租用的身份、公会文本频道、有效权限、驱动程序 Gateway 意图和连接的 SUT Gateway。每个场景会在自己的租约上重复就绪检查;已释放的 doctor 结果绝不能用于后续运行。

--doctor 和 --scenario-file 默认使用 Convex、CI 角色和 mock-openai。现有的显式凭据/提供者标志仍然有效;普通的策划 qa discord 默认值保持不变。预配置的私有代理环境变量是发现的替代方案,而非前提条件。

3. 运行一个范围证明

对于原生生命周期加真实 Gateway 回复:

pnpm openclaw qa discord \
  --scenario-file qa/scenarios/channels/discord-e2e-lifecycle.yaml \
  --output-dir .artifacts/qa-e2e/discord-lifecycle

对于更改的功能,请使用功能配方修改该 YAML。--scenario-file 可重复使用,并使用现有的 QA 流程模式。对于原生写入场景,设置 retryCount: 0。每个证明使用新的输出目录。这些示例是可选加入的,而非策划默认套件的补充。

阅读运行时和恢复以了解如何更改配置、重启 SUT、选择真实提供者、诊断取消或协调清理失败。

4. 判断并报告

对于 API 探测,要求 status: ready 和 leaseReleased: true。空历史列表为 inconclusive(退出码 2):可能表示空频道或缺少 "读取消息历史" 权限。使用 QA Lab doctor 区分这些情况;不要将其视为确认的权限失败。将 ready 结果报告为 bot 身份和观察到的读访问证明,而非变更或 Gateway E2E。私有的 result.json 包含租用的身份和检查状态,而非令牌或历史记录。

对于 QA Lab,检查 qa-suite-summary.json、qa-suite-report.md、Gateway/提供者工件以及输出目录下每个私有的 discord-e2e-*/events.ndjson。将原生收据与记录器行通过消息 ID 关联;对于 SUT 声明,使用 actor: sut、频道、序列和触发器相关性。单个标记本身并不证明编辑、反应、打字、删除、格式化或模型工具调用。事件日志不是视觉证明;视觉声明需要实际的 Discord 客户端截图。

完成需要请求的证据以及在 Gateway 停止后、租约释放前的成功自有清理。现有权限决定自有线程是删除还是归档;报告记录的处置状态,绝不将归档称为删除。失败时保留私有证据。报告经过清理的命令、精确版本、声明、相关证据、仅手动操作部分以及清理结果。共享工件前需删除身份、无关内容、私有路径和凭据。

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.

相关技能