Repository navigation
fix(cli): unsuccessful message sends report success - #129202
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 25, 2026, 5:57 AM ET / 09:57 UTC. ClawSweeper reviewWhat this changesThis PR makes Merge readinessKeep open: the updated branch still bypasses its new formatter and JSON envelope for normal core Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe message CLI invokes the outbound send owner, then renders its delivery result for operators and automation. The structured delivery status determines text, JSON fields, and the process exit code. flowchart LR
A[Operator message send] --> B[CLI command parser]
B --> C[Message action runner]
C --> D[Durable outbound sender]
D --> E[Structured delivery outcome]
E --> F[Text and JSON output]
F --> G[Exit status and automation]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +24, Tests +173, Docs +6. Total +203 across 10 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Carry the durable owner’s terminal failed and partial-failed outcome through the default single-send path without weakening required-delivery or recovery semantics, prove it through the real CLI boundary, and remove the release-owned changelog entry. Do we have a high-confidence way to reproduce the issue? Yes—source establishes that omitted Is this the best way to solve the issue? No—the shared classifier is the right presentation abstraction, but it must receive the durable owner’s default failure outcome rather than only mocked or explicit best-effort results. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 79722d2353cd. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* fix(cli): report unsuccessful message sends accurately * fix(cli): preserve narrowed send result for failure JSON * chore(pr): leave release-owned changelog unchanged
What Problem This Solves
Fixes an issue where operators running
openclaw message sendwould see a green success message and exit code zero even when a message hook suppressed delivery. Structured failed and partially failed send results also lost their failure details at the same CLI boundary, making automation treat unsuccessful delivery as successful.Why This Change Was Made
The durable send owner already records truthful
suppressed,failed, andpartial_failedoutcomes, but the earlier broadcast repair in #125915 classified those outcomes only for broadcast targets. Move that existing classifier into the shared message-action contract and reuse it for single-send presentation, the documented JSON failure envelope, exit status, and unchanged broadcast behavior. Preserve the shipped successful JSON shape, legacy plugin/gateway results without delivery status, dry runs, stop-hook ordering, and platform message IDs for partial delivery.User Impact
Intentionally suppressed sends now explain why nothing was delivered and exit nonzero. Failed and partially delivered sends surface the real reason, retain confirmed message IDs, and emit a machine-readable
ok: falseerror envelope in JSON mode. Successful sends and existing broadcast results keep their established output.Evidence
0instead of1.✅ Sentor omitted their failure envelope; six focused regressions failed.node scripts/run-vitest.mjs src/commands/message-format.test.ts src/commands/message.test.ts src/cli/program/message/helpers.test.ts src/infra/outbound/message-action-runner.plugin-dispatch.test.ts src/infra/outbound/message.test.ts— 120 tests passed across five files and three shards.git diff --check, independent owner-boundary review, and structured Codex autoreview all passed.v2026.7.1successful JSON output was inspected and preserved exactly; the failure envelope followsdocs/cli/index.md.