Skip to content

fix(cli): show dry-run indicator in message send --dry-run output#80966

Closed
stutea02002-droid wants to merge 8 commits into
openclaw:mainfrom
stutea02002-droid:fix/message-dry-run-output
Closed

fix(cli): show dry-run indicator in message send --dry-run output#80966
stutea02002-droid wants to merge 8 commits into
openclaw:mainfrom
stutea02002-droid:fix/message-dry-run-output

Conversation

@stutea02002-droid

Copy link
Copy Markdown

Summary

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.

Change Type

  • Bug fix

Scope

  • CLI / DX

Linked Issue

What changed

src/commands/message-format.ts: Added a result.dryRun check before the dead handledBy === "dry-run" branch. When dry-run is true, the output is now:

[dry-run] would send via slack

instead of:

✅ Sent via Slack. Message ID: unknown

Real behavior proof

Before:

$ openclaw message send --channel slack --target channel:C00000FAKE --message test --dry-run
✅ Sent via Slack. Message ID: unknown

After:

$ openclaw message send --channel slack --target channel:C00000FAKE --message test --dry-run
[dry-run] would send via slack

Security Impact

  • New permissions/capabilities: No
  • Secrets/tokens handling changed: No
  • New/changed network calls: No
  • Command/tool execution surface changed: No
  • Data access scope changed: No

stutea02002-droid and others added 7 commits May 12, 2026 14:37
- 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
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 12, 2026
@clawsweeper

clawsweeper Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

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 details

Best 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 dryRun: true while handledBy remains core or plugin, and the linked issue includes live CLI output showing the misleading success line.

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:

  • @steipete: Current-main blame covers the formatter and outbound result-contract lines, and GitHub path history shows recent work on message formatter, outbound action runner, and dry-run-adjacent message delivery paths. (role: recent area contributor; confidence: high; commits: 067e83d121dd, 396768304979, 5e8e77ed83eb; files: src/commands/message-format.ts, src/infra/outbound/message-action-runner.ts, src/infra/outbound/message.ts)
  • @shakkernerd: GitHub path history shows recent work on src/commands/message-format.ts, the same CLI presentation surface touched by this PR. (role: recent formatter contributor; confidence: medium; commits: 8fe449c8834b; files: src/commands/message-format.ts)
  • @vincentkoc: GitHub path history shows recent terminal/CLI formatting work adjacent to the command output surface, though not the central dry-run contract. (role: adjacent CLI contributor; confidence: low; commits: 74e7b8d47b18, 04e103d10ef7; files: src/commands/message-format.ts, src/commands/message.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against efacb918180a.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the docs Improvements or additions to documentation label May 12, 2026
@stutea02002-droid

Copy link
Copy Markdown
Author

Removed the zh-CN docs files that were unintentionally carried over from a previous branch. Please re-review.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@clawsweeper clawsweeper Bot closed this May 12, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

1 participant