parallels-discord-roundtrip
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseParallels Discord Roundtrip
Parallels Discord往返测试
Use when macOS Parallels smoke must prove Discord two-way delivery end to end.
适用于需要验证macOS Parallels冒烟测试中Discord双向消息端到端送达的场景。
Goal
目标
Cover:
- install on fresh macOS snapshot
- onboard + gateway health
- guest to Discord
message send - host sees that message on Discord
- host posts a new Discord message
- guest sees that new message
message read
覆盖场景:
- 在全新macOS快照上安装
- 初始化 + 网关健康检查
- 访客机向Discord
发送消息 - 宿主机在Discord上看到该消息
- 宿主机发布一条新的Discord消息
- 访客机时能看到这条新消息
读取消息
Inputs
输入项
- host env var with Discord bot token
- Discord guild ID
- Discord channel ID
OPENAI_API_KEY
- 包含Discord机器人令牌的宿主机环境变量
- Discord guild ID
- Discord channel ID
OPENAI_API_KEY
Preferred run
推荐运行方式
bash
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 \
--jsonbash
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 \
--jsonNotes
注意事项
- Snapshot target: closest to .
macOS 26.3.1 fresh - Snapshot resolver now prefers matching clones when the base hint also matches. That lets the harness reuse disk-only recovery snapshots without passing a longer hint.
*-poweroff* - If Windows/Linux snapshot restore logs show , drop the suspended state once, create a
PET_QUESTION_SNAPSHOT_STATE_INCOMPATIBLE_CPUreplacement snapshot, and rerun. The smoke scripts now auto-start restored power-off snapshots.*-poweroff* - Harness configures Discord inside the guest; no checked-in token/config.
- Use the wrapper for guest
openclaw;message send/readdoes not expose the lazy message subcommands the same way.node openclaw.mjs message ... - Write in one JSON object (
channels.discord.guilds), not dotted--strict-jsonpaths; numeric snowflakes get treated like array indexes.config set channels.discord.guilds.<snowflake>... - Avoid / expect for long Discord setup scripts; it line-wraps/corrupts long commands. Use
prlctl enterfor the Discord config phase.prlctl exec --current-user /bin/sh -lc ... - Full 3-OS sweeps: the shared build lock is safe in parallel, but snapshot restore is still a Parallels bottleneck. Prefer serialized Windows/Linux restore-heavy reruns if the host is already under load.
- Harness cleanup deletes the temporary Discord smoke messages at exit.
- Per-phase logs:
/tmp/openclaw-parallels-smoke.* - Machine summary: pass
--json - If roundtrip flakes, inspect and
fresh.discord-roundtrip.login the run dir first.discord-last-readback.json
- 快照目标:最接近的版本。
macOS 26.3.1 全新安装 - 快照解析器现在会在基础提示匹配时优先选择匹配的克隆镜像。这让测试套件可以复用仅磁盘恢复的快照,无需传入更长的匹配提示。
*-poweroff* - 如果Windows/Linux快照恢复日志显示,请先删除一次挂起状态,创建一个
PET_QUESTION_SNAPSHOT_STATE_INCOMPATIBLE_CPU的替换快照后重新运行。冒烟测试脚本现在会自动启动恢复的关机状态快照。*-poweroff* - 测试套件会在访客机内配置Discord;没有内置提交的令牌/配置。
- 访客机请使用
发送/读取消息封装命令;openclaw不会以相同方式暴露延迟消息子命令。node openclaw.mjs message ... - 请将写入单个JSON对象(使用
channels.discord.guilds参数),不要使用点分格式的--strict-json路径;数值型snowflake ID会被当作数组索引处理。config set channels.discord.guilds.<snowflake>... - 长Discord配置脚本避免使用/ expect;它会对长命令进行换行/损坏。Discord配置阶段请使用
prlctl enter。prlctl exec --current-user /bin/sh -lc ... - 全3操作系统扫描:共享构建锁在并行运行时是安全的,但快照恢复仍然是Parallels的性能瓶颈。如果宿主机已经处于高负载状态,建议串行运行Windows/Linux的高恢复量重跑任务。
- 测试套件清理程序会在退出时删除Discord临时冒烟测试消息。
- 各阶段日志:
/tmp/openclaw-parallels-smoke.* - 机器可读摘要:传入参数
--json - 如果往返测试出现偶现失败,请先检查运行目录下的和
fresh.discord-roundtrip.log文件。discord-last-readback.json
Pass criteria
通过标准
- fresh lane or upgrade lane requested passes
- summary reports for that lane
discord=pass - guest outbound nonce appears in channel history
- host inbound nonce appears in output
openclaw message read
- 申请的全新安装链路或升级链路全部通过
- 摘要报告对应链路的
discord=pass - 访客机出站随机数(nonce)出现在频道历史中
- 宿主机入站随机数(nonce)出现在输出中
openclaw message read