fix(cli): show dry-run indicator in message send --dry-run output#80966
fix(cli): show dry-run indicator in message send --dry-run output#80966stutea02002-droid wants to merge 8 commits into
Conversation
- Translate index.md (homepage) - Translate start/getting-started.md (quick start guide) - Translate concepts/features.md (full feature list) These are the first three Chinese documentation pages, covering the most visible entry points for new Chinese-speaking users. Co-Authored-By: AI Assistant <[email protected]>
…, feishu, agent - Translate start/wizard.md (CLI onboarding guide, 3.5KB) - Translate channels/index.md (channels overview, 2.5KB) - Translate channels/feishu.md (Feishu/Lark channel docs, 9.5KB) - Translate concepts/agent.md (agent runtime, 3.3KB) Total 4 new pages covering onboarding, channel setup, Feishu-specific configuration, and agent runtime concepts. Co-Authored-By: AI Assistant <[email protected]>
The `openclaw message send --dry-run` command correctly skipped delivery but printed `✅ Sent via <channel>. Message ID: unknown`, misleading users into thinking a real message was sent. The formatMessageCliText function had a dead branch checking `result.handledBy === dry-run`, but the send/poll path never sets handledBy to dry-run — it always returns core or plugin with a separate `dryRun: true` boolean. Now the dryRun flag is checked first, producing: `[dry-run] would send via slack` Fixes openclaw#80507
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as duplicate/superseded: this PR is now a focused formatter change with useful terminal proof, but the same dry-run send/poll formatter fix is already tracked by the older open canonical PR with focused regression tests. So I’m closing this here and keeping the remaining discussion on the canonical linked item. Review detailsBest possible solution: Keep one canonical implementation on #80604 or a maintainer-chosen replacement, land the formatter fix with regression coverage, and preserve this PR’s terminal proof as supporting context if useful. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows send and poll dry-runs carry Is this the best way to solve the issue? No for this PR as the merge vehicle. The code direction is right, but the same fix is already under review in the older canonical PR with focused regression tests, so this duplicate branch should close rather than split review across two PRs. Security review: Security review cleared: The diff only changes CLI formatter output logic and does not touch dependencies, workflows, scripts, permissions, secrets, network calls, or package metadata. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against efacb918180a. |
|
Removed the zh-CN docs files that were unintentionally carried over from a previous branch. Please re-review. |
Summary
The
openclaw message send --dry-runcommand correctly skipped delivery but printed✅ Sent via <channel>. Message ID: unknown, misleading users into thinking a real message was sent.The
formatMessageCliTextfunction had a dead branch checkingresult.handledBy === "dry-run", but the send/poll path never sets handledBy to "dry-run" — it always returns "core" or "plugin" with a separatedryRun: trueboolean.Change Type
Scope
Linked Issue
openclaw message send --dry-runprints✅ Sent via <channel>. Message ID: unknown— pretty-text formatter never seeshandledBy: "dry-run"and falls through to the success message #80507What changed
src/commands/message-format.ts: Added aresult.dryRuncheck before the deadhandledBy === "dry-run"branch. When dry-run is true, the output is now:instead of:
Real behavior proof
Before:
$ openclaw message send --channel slack --target channel:C00000FAKE --message test --dry-run ✅ Sent via Slack. Message ID: unknownAfter:
$ openclaw message send --channel slack --target channel:C00000FAKE --message test --dry-run [dry-run] would send via slackSecurity Impact