parallels-discord-roundtrip

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Parallels 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
    message send
    to Discord
  • host sees that message on Discord
  • host posts a new Discord message
  • guest
    message read
    sees that new message
覆盖场景:
  • 在全新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 \
  --json
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 \
  --json

Notes

注意事项

  • Snapshot target: closest to
    macOS 26.3.1 fresh
    .
  • Snapshot resolver now prefers matching
    *-poweroff*
    clones when the base hint also matches. That lets the harness reuse disk-only recovery snapshots without passing a longer hint.
  • If Windows/Linux snapshot restore logs show
    PET_QUESTION_SNAPSHOT_STATE_INCOMPATIBLE_CPU
    , drop the suspended state once, create a
    *-poweroff*
    replacement snapshot, and rerun. The smoke scripts now auto-start restored power-off snapshots.
  • Harness configures Discord inside the guest; no checked-in token/config.
  • Use the
    openclaw
    wrapper for guest
    message send/read
    ;
    node openclaw.mjs message ...
    does not expose the lazy message subcommands the same way.
  • Write
    channels.discord.guilds
    in one JSON object (
    --strict-json
    ), not dotted
    config set channels.discord.guilds.<snowflake>...
    paths; numeric snowflakes get treated like array indexes.
  • Avoid
    prlctl enter
    / expect for long Discord setup scripts; it line-wraps/corrupts long commands. Use
    prlctl exec --current-user /bin/sh -lc ...
    for the Discord config phase.
  • 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
    fresh.discord-roundtrip.log
    and
    discord-last-readback.json
    in the run dir first.
  • 快照目标:最接近
    macOS 26.3.1 全新安装
    的版本。
  • 快照解析器现在会在基础提示匹配时优先选择匹配
    *-poweroff*
    的克隆镜像。这让测试套件可以复用仅磁盘恢复的快照,无需传入更长的匹配提示。
  • 如果Windows/Linux快照恢复日志显示
    PET_QUESTION_SNAPSHOT_STATE_INCOMPATIBLE_CPU
    ,请先删除一次挂起状态,创建一个
    *-poweroff*
    的替换快照后重新运行。冒烟测试脚本现在会自动启动恢复的关机状态快照。
  • 测试套件会在访客机内配置Discord;没有内置提交的令牌/配置。
  • 访客机
    发送/读取消息
    请使用
    openclaw
    封装命令;
    node openclaw.mjs message ...
    不会以相同方式暴露延迟消息子命令。
  • 请将
    channels.discord.guilds
    写入单个JSON对象(使用
    --strict-json
    参数),不要使用点分格式的
    config set channels.discord.guilds.<snowflake>...
    路径;数值型snowflake ID会被当作数组索引处理。
  • 长Discord配置脚本避免使用
    prlctl enter
    / expect;它会对长命令进行换行/损坏。Discord配置阶段请使用
    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
    discord=pass
    for that lane
  • guest outbound nonce appears in channel history
  • host inbound nonce appears in
    openclaw message read
    output
  • 申请的全新安装链路或升级链路全部通过
  • 摘要报告对应链路的
    discord=pass
  • 访客机出站随机数(nonce)出现在频道历史中
  • 宿主机入站随机数(nonce)出现在
    openclaw message read
    输出中