fix: show dry-run output for message send and poll#80863
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as duplicate: #80604 already tracks the same dry-run formatter/test fix for #80507. This PR now has useful redacted CLI proof and a narrow net diff, but its branch history still contains removed unrelated workspace/artifact commits, so it is not the best second merge vehicle. So I’m closing this here and keeping the remaining discussion on the canonical linked item. Review detailsBest possible solution: Keep one canonical clean implementation for #80507, land the formatter/test change after acceptable proof, and preserve this PR's redacted CLI output only as supporting context if useful. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source shows send and poll dry-runs can reach the formatter as Is this the best way to solve the issue? Yes for the code direction: checking Security review: Security review needs attention: The current net diff is clean, but this PR branch history still contains removed workspace/artifact commits that should not be preserved if code is reused.
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 5ed2a9a4e21b. |
This comment was marked as spam.
This comment was marked as spam.
|
🦞🧹 Reason: re-review requires an open issue or PR. |
Summary
openclaw message send --dry-runandmessage poll --dry-runwere formatting their pretty-text output like real deliveries whenever the runner still reportedhandledBy: "core". This patch makes the CLI formatter honor the stabledryRunflag so dry-run invocations print the muted preview text instead of a misleading success checkmark.Changes
result.dryRunas the primary dry-run signal informatMessageCliTexthandledBy: "dry-run"fallback for other action kindssendandpollformatter outputTesting
pnpm test src/commands/message-format.test.ts src/commands/message.test.ts src/infra/outbound/format.test.tspnpm exec oxfmt --check --threads=1 src/commands/message-format.ts src/commands/message-format.test.tsnode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/commands/message-format.ts src/commands/message-format.test.ts src/commands/message.test.ts src/infra/outbound/format.test.tspnpm buildImpact
This only changes CLI dry-run presentation for message send/poll. Actual dry-run delivery safeguards stay unchanged.
Fixes #80507
Real behavior proof
Redacted CLI dry-run output after this patch: