Skip to content

fix(whatsapp): support edit and unsend actions - #70813

Closed
Lucenx9 wants to merge 2 commits into
openclaw:mainfrom
Lucenx9:codex/whatsapp-edit-unsend-actions
Closed

Lucenx9 wants to merge 2 commits into
openclaw:mainfrom
Lucenx9:codex/whatsapp-edit-unsend-actions

Conversation

@Lucenx9

@Lucenx9 Lucenx9 commented Apr 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

What problem does this PR solve?

  • WhatsApp message actions could not edit or revoke bot-owned messages.
  • The old PR also routed edit/unsend through PN-only JID conversion, which could misroute LID-addressed chats.

Why does this matter now?

  • WhatsApp outbound sends already use LID-aware routing. Message mutations need the same routing contract or they can target the wrong chat.

What is the intended outcome?

  • Add WhatsApp edit, delete, and unsend actions for bot-owned messages.
  • Keep upload-file support from current main while adding the new gateway actions.
  • Use resolveOutboundJid for edit/unsend so message keys use the resolved LID JID when available.
  • Validate edit text before forwarding the gateway action.

What is intentionally out of scope?

  • Editing or deleting other users' WhatsApp messages.
  • Live WhatsApp server compatibility guarantees beyond Baileys payload construction.

What does success look like?

  • edit sends a Baileys { edit } payload with fromMe: true.
  • delete and unsend send a Baileys { delete } payload with fromMe: true.
  • PN-to-LID mappings are honored for normal sends, reactions, edit, unsend, and typing presence.

What should reviewers focus on?

  • LID-aware routing in extensions/whatsapp/src/inbound/send-api.ts.
  • Gateway action dispatch in extensions/whatsapp/src/channel-react-action.ts.
  • actions.sendMessage gating and target authorization in extensions/whatsapp/src/action-runtime.ts.

Linked context

Which issue does this close?

Closes #14344

Which issues, PRs, or discussions are related?

Related #67378

Was this requested by a maintainer or owner?

  • This refresh addresses the existing PR review blocker about reusing LID-aware routing for edit and unsend.

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: WhatsApp edit/unsend now use the same LID-aware outbound JID resolution as normal sends and reactions.
  • Real environment tested: local OpenClaw checkout on Linux with Node/pnpm and the real WhatsApp send API seam; temp Baileys auth dir containing lid-mapping-15555550000.json.
  • Exact steps or command run after this patch:
OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test extensions/whatsapp/src/action-runtime.test.ts extensions/whatsapp/src/channel-actions.test.ts extensions/whatsapp/src/channel-react-action.test.ts extensions/whatsapp/src/inbound/send-api.test.ts extensions/whatsapp/src/send.test.ts extensions/whatsapp/src/active-listener.test.ts extensions/whatsapp/src/connection-controller.test.ts -- --reporter=verbose
  • Evidence after fix:
✓ createWebSendApi LID resolution (issue #67378) > resolves PN to LID for editMessage
✓ createWebSendApi LID resolution (issue #67378) > resolves PN to LID for unsendMessage
Test Files  7 passed (7)
Tests  144 passed (144)
  • Observed result after fix: edit and unsend calls send to 987654@lid; their message keys use remoteJid: "987654@lid", id: "msg-2", and fromMe: true.
  • What was not tested: live WhatsApp account behavior against WhatsApp servers.
  • Proof limitations or environment constraints: no linked live WhatsApp account was available in this local repair environment, so the proof covers OpenClaw routing, dispatch, gating, payload construction, log sanitization, and listener contracts, not server acceptance.
  • Before evidence (optional but encouraged): the old edit/unsend implementation called toWhatsappJid(to), so a PN target with a LID mapping stayed on [email protected] instead of 987654@lid.

Tests and validation

Which commands did you run?

pnpm docs:list
OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test extensions/whatsapp/src/action-runtime.test.ts extensions/whatsapp/src/channel-actions.test.ts extensions/whatsapp/src/channel-react-action.test.ts extensions/whatsapp/src/inbound/send-api.test.ts extensions/whatsapp/src/send.test.ts extensions/whatsapp/src/active-listener.test.ts extensions/whatsapp/src/connection-controller.test.ts -- --reporter=verbose
pnpm format:check docs/channels/whatsapp.md docs/cli/message.md extensions/whatsapp/src/action-runtime.test.ts extensions/whatsapp/src/action-runtime.ts extensions/whatsapp/src/active-listener.test.ts extensions/whatsapp/src/auto-reply.test-harness.ts extensions/whatsapp/src/channel-actions.test.ts extensions/whatsapp/src/channel-actions.ts extensions/whatsapp/src/channel-react-action.test.ts extensions/whatsapp/src/channel-react-action.ts extensions/whatsapp/src/channel.ts extensions/whatsapp/src/connection-controller.test.ts extensions/whatsapp/src/inbound/send-api.test.ts extensions/whatsapp/src/inbound/send-api.ts extensions/whatsapp/src/inbound/types.ts extensions/whatsapp/src/send.test.ts extensions/whatsapp/src/send.ts extensions/whatsapp/src/shared.ts
git diff --check
pnpm changed:lanes --json --base upstream/main

What regression coverage was added or updated?

  • extensions/whatsapp/src/inbound/send-api.test.ts: edit/unsend payloads and LID mapping regression coverage.
  • extensions/whatsapp/src/action-runtime.test.ts: edit/delete/unsend gating, authorization path, and edit input validation.
  • extensions/whatsapp/src/channel-react-action.test.ts: gateway dispatch, current WhatsApp context fallback, no participant forwarding, and empty edit text rejection before forwarding.
  • extensions/whatsapp/src/send.test.ts: listener wrappers and log sanitization for message ids and reaction emojis.
  • extensions/whatsapp/src/channel-actions.test.ts: action discovery with actions.sendMessage disabled.

What failed before this fix, if known?

  • The LID regression added here would fail before the refresh because edit/unsend used toWhatsappJid(to) instead of resolveOutboundJid(to).

If no test was added, why not?

  • N/A.

Risk checklist

Did user-visible behavior change? (Yes/No)

Yes.

Did config, environment, or migration behavior change? (Yes/No)

No.

Did security, auth, secrets, network, or tool execution behavior change? (Yes/No)

Yes.

What is the highest-risk area?

  • WhatsApp message mutation over an existing Baileys session.

How is that risk mitigated?

  • Actions reuse existing outbound target authorization and actions.sendMessage gating.
  • Message keys are constructed with fromMe: true.
  • Caller-provided participant is not forwarded for edit/delete/unsend.
  • Message IDs and reaction emojis are sanitized before log emission.

Current review state

What is the next action?

  • Ready for maintainer review after CI completes.

What is still waiting on author, maintainer, CI, or external proof?

  • CI is pending on the refreshed head.
  • Live WhatsApp server proof is still not provided; maintainer or external validation is needed if live behavior proof remains required.

Which bot or reviewer comments were addressed?

  • Rebased onto current main and resolved conflicts with current upload-file support.
  • Addressed the LID-aware routing blocker for edit and unsend.
  • Kept the deprecated handleWhatsAppReactAction wrapper with a deprecation comment.
  • Validated edit text before forwarding gateway edit actions.
  • Preserved/verified log sanitization for message ids and reaction emojis.

@aisle-research-bot

aisle-research-bot Bot commented Apr 23, 2026 •

Copy link
Copy Markdown

🔒 Aisle Security Analysis

We found 1 potential security issue(s) in this PR:

# Severity Title
1 🟡 Medium Incomplete log sanitization allows log forging via Unicode line separators in WhatsApp outbound logs
1. 🟡 Incomplete log sanitization allows log forging via Unicode line separators in WhatsApp outbound logs
Property Value
Severity Medium
CWE CWE-117
Location extensions/whatsapp/src/send.ts:22-29

Description

sanitizeWhatsAppLogValue() is intended to prevent log forging by stripping control characters before interpolating user-controlled values (e.g., emoji, messageId) into log lines.

However, it only removes C0/C1 control characters (U+0000–U+001F, U+007F, U+0080–U+009F) and does not remove Unicode line/paragraph separators such as:

  • U+2028 (LINE SEPARATOR)
  • U+2029 (PARAGRAPH SEPARATOR)

These characters can be included in otherwise “printable” strings and may be treated as line breaks by downstream log consumers/parsers, enabling log injection/log forging (e.g., adding spoofed log entries) when values like emoji are attacker-controlled.

Vulnerable code:

function sanitizeWhatsAppLogValue(value: string): string {
  const c0Start = String.fromCharCode(0x00);
  const c0End = String.fromCharCode(0x1f);
  const del = String.fromCharCode(0x7f);
  const c1Start = String.fromCharCode(0x80);
  const c1End = String.fromCharCode(0x9f);
  return value.replace(new RegExp(`[${c0Start}-${c0End}${del}${c1Start}-${c1End}]`, "g"), "");
}

Affected sinks include log lines interpolating sanitized values (e.g., outboundLog.info(...)) and structured logging fields (logger.info({ emoji: safeEmoji, ... })), since line separators can still break line-oriented log formats.

Recommendation

Expand sanitization to remove/escape Unicode line/paragraph separators (and optionally other non-printing characters) before logging. Prefer escaping over deletion when debugging value fidelity matters.

Example fix:

function sanitizeWhatsAppLogValue(value: string): string {
  ​// Remove ASCII C0/C1 control chars and common Unicode line separators
  return value.replace(/[\u0000-\u001F\u007F-\u009F\u2028\u2029]/g, "");
}

Additionally:

  • Avoid interpolating untrusted values into human-formatted log strings; prefer structured logging with safe JSON encoding provided by the logger.
  • Consider applying sanitization consistently to any other logged identifiers derived from external inputs.

Analyzed PR: #70813 at commit d50362d

Last updated on: 2026-04-23T23:32:09Z

@openclaw-barnacle openclaw-barnacle Bot added channel: whatsapp-web Channel integration: whatsapp-web size: L labels Apr 23, 2026
@greptile-apps

greptile-apps Bot commented Apr 23, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds edit and unsend message actions to the WhatsApp channel, backed by Baileys sendMessage({ edit/delete }) payloads. New actions are gated behind actions.sendMessage, use existing outbound target authorization, and construct WAMessageKey with fromMe: true — correctly preventing caller-controlled participant forwarding and scoping mutations to the bot's own messages. Test coverage is thorough across the send API, action runtime, channel action discovery, and gateway dispatch layers.

Confidence Score: 5/5

Safe to merge — no P0/P1 issues; remaining findings are minor style suggestions.

Implementation is well-structured, security-conscious (fromMe hardcoded, no participant exposure), gated behind existing auth and sendMessage flag, and backed by comprehensive unit tests. The two P2 notes (validation ordering for edit and the implicit passthrough on handleWhatsAppReactAction) do not affect correctness or security.

No files require special attention.

Comments Outside Diff (1)

  1. extensions/whatsapp/src/channel-react-action.ts, line 557-559 (link)

    P2 handleWhatsAppReactAction is now a transparent passthrough

    The exported handleWhatsAppReactAction now unconditionally delegates to handleWhatsAppMessageAction, meaning it silently accepts edit and unsend actions despite its name implying it only handles reactions. Callers of the old export won't notice a difference (channel.ts already switched to handleWhatsAppMessageAction), but a brief deprecation comment on the export would prevent future confusion about why the function accepts non-react actions.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: extensions/whatsapp/src/channel-react-action.ts
    Line: 557-559
    
    Comment:
    **`handleWhatsAppReactAction` is now a transparent passthrough**
    
    The exported `handleWhatsAppReactAction` now unconditionally delegates to `handleWhatsAppMessageAction`, meaning it silently accepts `edit` and `unsend` actions despite its name implying it only handles reactions. Callers of the old export won't notice a difference (`channel.ts` already switched to `handleWhatsAppMessageAction`), but a brief deprecation comment on the export would prevent future confusion about why the function accepts non-react actions.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/whatsapp/src/action-runtime.ts
Line: 101-108

Comment:
**Input validation after auth resolution for edit**

`readEditMessageText` (which throws for blank text) is called on line 108 only after `resolveAuthorizedWhatsAppOutboundTarget` has already run on line 101. If the caller supplies a blank `message`, the auth side-effect runs first and an error is thrown afterward. Validating the edit text before the target resolution would keep the early-exit pattern consistent with how the react branch validates params before `sendReactionWhatsApp`.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: extensions/whatsapp/src/channel-react-action.ts
Line: 557-559

Comment:
**`handleWhatsAppReactAction` is now a transparent passthrough**

The exported `handleWhatsAppReactAction` now unconditionally delegates to `handleWhatsAppMessageAction`, meaning it silently accepts `edit` and `unsend` actions despite its name implying it only handles reactions. Callers of the old export won't notice a difference (`channel.ts` already switched to `handleWhatsAppMessageAction`), but a brief deprecation comment on the export would prevent future confusion about why the function accepts non-react actions.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "feat(whatsapp): support edit and unsend ..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee146d90a9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 327a33f8ff

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08049c0eff

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread extensions/whatsapp/src/send.ts Resolved
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation and removed docs Improvements or additions to documentation labels Apr 23, 2026
@Lucenx9

Lucenx9 commented Apr 24, 2026

Copy link
Copy Markdown
Contributor Author

@steipete CI is green now. Quick summary: this adds WhatsApp edit and unsend actions via Baileys, scoped to bot-owned messages only (fromMe: true) and gated by the existing sendMessage action policy/target authorization.

I also addressed the bot feedback around ToolInputError classification and sanitizing outbound action logs. Could you take another look when you have a chance?

@clawsweeper

clawsweeper Bot commented Apr 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 30, 2026, 5:09 PM ET / 21:09 UTC.

ClawSweeper review

What this changes

This PR adds WhatsApp edit, delete, and unsend actions for bot-owned messages through the channel plugin, CLI, docs, outbound authorization path, and focused regression tests.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 5 items remain

Keep this PR open. It remains the candidate implementation for the still-open WhatsApp revoke request, but it is not merge-ready: GitHub reports a dirty merge state, and the supplied after-fix evidence is targeted test/seam output rather than a real linked WhatsApp account exercising edit and revoke behavior.

Priority: P2
Reviewed head: 269e1ada1ceb23d41b9200ed0b51bf7faa76a5bd
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch has substantial layered coverage, but real provider behavior remains unproven and the branch currently conflicts with main.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR supplies focused terminal test output and a local Baileys seam with LID fixtures, but its body confirms that no linked WhatsApp account exercised the edit or revoke path; add redacted live output, logs, or a recording after rebasing. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR supplies focused terminal test output and a local Baileys seam with LID fixtures, but its body confirms that no linked WhatsApp account exercised the edit or revoke path; add redacted live output, logs, or a recording after rebasing. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Proposed action boundary: The PR advertises edit, delete, and unsend only when the existing WhatsApp send-message action gate is enabled, and routes the actions through the gateway handler rather than bypassing the channel policy path.
Bot-owned mutation construction: The proposed Baileys payload builds edit and delete keys with fromMe: true and resolves the outbound JID before constructing the key, which is the intended boundary for bot-owned message mutations and LID-aware targeting.
Current canonical request remains open: The linked feature request for WhatsApp bot-message revocation remains open, so this branch is an implementation candidate rather than a superseded or already-landed change.
Findings None None.
Security None None.

How this fits together

OpenClaw’s message tool routes a channel action through the WhatsApp plugin, which authorizes the target and forwards it to the active Baileys-backed listener. The listener resolves the outbound WhatsApp JID and sends an edit or delete payload to WhatsApp, affecting an already-sent bot message.

flowchart LR
  A[CLI or agent message action] --> B[WhatsApp channel action handler]
  B --> C[Target authorization and action gate]
  C --> D[Outbound WhatsApp service]
  D --> E[Active Baileys listener]
  E --> F[LID-aware JID resolution]
  F --> G[WhatsApp edit or revoke payload]
Loading

Decision needed

Question Recommendation
Should OpenClaw expose bot-owned WhatsApp revoke actions behind the existing actions.sendMessage target-authorization boundary after live WhatsApp confirmation? Require rebase and live proof: Rebase the branch, demonstrate edit and revoke against a redacted linked WhatsApp account, and then land only if maintainers accept the existing authorization gate for this capability.

Why: The patch is a new destructive channel capability rather than a narrow correction to an established WhatsApp action contract; code review cannot determine the intended operator permission boundary alone.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR supplies focused terminal test output and a local Baileys seam with LID fixtures, but its body confirms that no linked WhatsApp account exercised the edit or revoke path; add redacted live output, logs, or a recording after rebasing. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - Merging a stale, conflict-marked branch without rebasing can regress newer WhatsApp action or upload-file behavior that the branch was intended to preserve.
  • Resolve merge risk (P1) - The new revoke capability changes message-delivery behavior; WhatsApp server-side edit windows and delete semantics have not been demonstrated with a linked account.
  • Resolve merge risk (P1) - The patch exposes a destructive action behind the existing send-message authorization gate, so maintainers must explicitly accept that gate as sufficient for bot-owned revocation.
Agent review details

Security

None.

PR surface

Source +366, Tests +604, Docs +7. Total +977 across 24 files.

View PR surface stats
Area Files Added Removed Net
Source 13 386 20 +366
Tests 9 619 15 +604
Docs 2 11 4 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 24 1016 39 +977

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Rebase and prove the real WhatsApp path (recommended)
    Resolve the merge conflict, rerun focused regression coverage, and add redacted linked-account evidence for edit and revoke before considering merge.
  2. Accept the existing authorization boundary
    Maintainers may accept actions.sendMessage plus target authorization and fromMe-only payloads as sufficient for automated bot-message revocation after reviewing the live proof.
  3. Pause destructive mutations
    Close or defer this branch if the bundled WhatsApp plugin should not expose automated revoke behavior under the current action gate.

Technical review

Best possible solution:

Rebase onto current main, retain the existing target-authorization and fromMe-only boundaries, then attach redacted live WhatsApp evidence showing a bot message can be edited and revoked without affecting another chat before maintainers decide whether the existing send-message gate is the intended operator boundary.

Do we have a high-confidence way to reproduce the issue?

No. The supplied report includes a credible prior live failure and the branch has focused seam coverage, but no current linked-account WhatsApp run demonstrates the after-fix edit or revoke behavior against WhatsApp servers.

Is this the best way to solve the issue?

Unclear. Reusing the existing action gate, target authorization, and LID-aware outbound route is the narrow maintainable shape, but maintainers still need to approve the destructive-action boundary and see live provider behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4d034dce0e5c.

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded but user-visible WhatsApp capability addition whose safety and live behavior still need confirmation.
  • merge-risk: 🚨 message-delivery: Edit and revoke payloads can change which WhatsApp message or chat is mutated if JID resolution or server semantics differ from the seam tests.
  • merge-risk: 🚨 security-boundary: The PR adds an automated destructive action and relies on the existing send-message authorization gate as its permission boundary.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR supplies focused terminal test output and a local Baileys seam with LID fixtures, but its body confirms that no linked WhatsApp account exercised the edit or revoke path; add redacted live output, logs, or a recording after rebasing. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Proposed action boundary: The PR advertises edit, delete, and unsend only when the existing WhatsApp send-message action gate is enabled, and routes the actions through the gateway handler rather than bypassing the channel policy path. (extensions/whatsapp/src/channel-actions.ts:81, 269e1ada1ceb)
  • Bot-owned mutation construction: The proposed Baileys payload builds edit and delete keys with fromMe: true and resolves the outbound JID before constructing the key, which is the intended boundary for bot-owned message mutations and LID-aware targeting. (extensions/whatsapp/src/inbound/send-api.ts:290, 269e1ada1ceb)
  • Current canonical request remains open: The linked feature request for WhatsApp bot-message revocation remains open, so this branch is an implementation candidate rather than a superseded or already-landed change.
  • Proof is not live-channel proof: The PR body explicitly says no linked live WhatsApp account was available; its reported 144 passing tests exercise the local Baileys send API seam and LID-mapping fixture rather than WhatsApp server acceptance. (269e1ada1ceb)
  • Merge state requires refresh: The supplied GitHub state marks the PR mergeableState as dirty against main, so the current branch must be rebased and re-reviewed as an actual three-way merge before landing. (269e1ada1ceb)

Likely related people:

  • mcaxtr: Authored the latest recorded PR commit, which adds the conflicting-target validation in the message-action dispatch path. (role: recent contributor to the proposed WhatsApp action repair; confidence: medium; commits: 269e1ada1ceb; files: extensions/whatsapp/src/channel-react-action.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Rebase onto current main and resolve the reported dirty merge state.
  • Add redacted linked-account proof showing a bot-owned message edit and revoke, including the observed result or actionable provider error.
  • Obtain maintainer confirmation that the existing send-message authorization gate is the intended revoke permission boundary.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-07-08T05:03:28.328Z sha 269e1ad :: needs real behavior proof before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Apr 29, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels May 20, 2026
@clawsweeper

clawsweeper Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat.

Where did the egg go?
  • The egg game starts only after the PR passes the real-behavior proof check.
  • Before that, no creature or rarity is rolled. The treat waits for real proof.
  • This is still just collectible flavor: proof affects review readiness, not creature quality.

@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label May 20, 2026
@Lucenx9 Lucenx9 changed the title feat(whatsapp): support edit and unsend actions fix(whatsapp): support edit and unsend actions Jun 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 2, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. label Jun 2, 2026

cibeles commented Jun 3, 2026

Copy link
Copy Markdown

I hit this limitation on a live OpenClaw install today and wanted to add a sanitized real-world reproduction for the outbound edit path.

Context: a bot-owned WhatsApp message was sent successfully and returned a WhatsApp messageId. A later correction needed to edit that already-sent message.

Repro shape, with private target/id values redacted:

openclaw message edit \
  --channel whatsapp \
  --account <account> \
  --target <E164> \
  --message-id <whatsapp-message-id> \
  --message "corrected text" \
  --dry-run \
  --json

The dry run succeeds because it appears to validate the generic message action shape.

Running the same command without --dry-run fails on the WhatsApp adapter with:

Message action edit not supported for channel whatsapp.

Expected behavior after this PR:

  • openclaw message edit should work for bot-owned WhatsApp messages when the underlying provider accepts edits within WhatsApp's edit window.
  • If the edit cannot be performed, the error should be channel-specific and actionable (expired edit window, unsupported provider/session, unknown message id, etc.).
  • Dry-run should not imply channel support when the real adapter lacks it; either dry-run should check/discover channel action support or clearly report that it only validated generic CLI parameters.
  • The resulting edited text/state should be reflected in the same audit/conversation/ledger surfaces used for sends, so agents and watchdogs do not reason from stale sent text.

No private phone numbers, contact names, or message contents are included here; this is just the operational failure mode observed from the CLI/gateway boundary.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 17, 2026
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 17, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 29, 2026
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XL and removed size: L labels Jul 8, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jul 23, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jul 30, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Jul 31, 2026
@Lucenx9 Lucenx9 closed this Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: whatsapp-web Channel integration: whatsapp-web cli CLI command changes docs Improvements or additions to documentation merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: message delete (revoke) action for WhatsApp channel

3 participants