SuperAPI AI 工具集

parallels-discord-roundtrip

测试与质量

查看项目

更新于 10-16 09:35

技能介绍

用途:当需要在 macOS Parallels 冒烟测试中端到端证明 Discord 双向投递时使用。目标覆盖:在全新 macOS 快照上安装、onboard 与网关健康检查、客户机向 Discord 发送消息、主机在 Discord 看到该消息、主机发布新 Discord 消息、客户机读取到该新消息。

输入:主机环境变量形式的 Discord bot token、Discord guild ID、Discord channel ID、OPENAI_API_KEY。

推荐运行方式: export OPENCLAW_PARALLELS_DISCORD_TOKEN="$(ssh peters-mac-studio-1 'jq -r ".channels.discord.token" ~/.openclaw/openclaw.json' | tr -d '\n')" pnpm test:parallels:macos --discord-token-env OPENCLAW_PARALLELS_DISCORD_TOKEN --discord-guild-id 1456350064065904867 --discord-channel-id 1456744319972282449 --json

注意事项:快照目标尽量接近 macOS 26.3.1 全新状态;快照解析器会优先匹配 -poweroff 克隆;Windows/Linux 恢复日志若出现 PET_QUESTION_SNAPSHOT_STATE_INCOMPATIBLE_CPU,先丢弃挂起状态、创建 -poweroff 替换快照后重跑,冒烟脚本会自动启动恢复后的关机快照;harness 在客户机内配置 Discord,不签入 token/配置;客户机消息发送/读取使用 openclaw 包装器,node openclaw.mjs message ... 不暴露相同的惰性子命令;channels.discord.guilds 应作为一个 JSON 对象写入(--strict-json),不要用点分路径配置,数字雪花 ID 会被当作数组索引;长 Discord 配置脚本避免 prlctl enter / expect,改用 prlctl exec --current-user /bin/sh -lc ...;三系统全量扫描时共享构建锁可并行,但快照恢复仍是 Parallels 瓶颈,主机负载高时建议串行重跑 Windows/Linux 恢复;harness 退出时会删除临时 Discord 冒烟消息;Discord 往返成功后先关闭 macOS 客户机(prlctl stop "macOS Tahoe")再交接,不要留下已配置 Discord 的虚拟机运行,否则可能在 #maintainer 继续读写造成刷屏;各阶段日志在 /tmp/openclaw-parallels-smoke.*,加 --json 输出机器摘要;若往返不稳定,先查看运行目录中的 fresh.discord-roundtrip.log 与 discord-last-readback.json。

通过标准:所请求的 fresh 或 upgrade 泳道通过;摘要报告该泳道 discord=pass;客户机出站 nonce 出现在频道历史;主机的入站 nonce 出现在 openclaw message read 输出中。