Skip to content

fix(channels): keep private message content out of diagnostics - #172935

Merged
steipete merged 3 commits into
mainfrom
deslop/y15-ext-channels-b-20261015
Oct 15, 2026
Merged

steipete merged 3 commits into
mainfrom
deslop/y15-ext-channels-b-20261015

Conversation

@steipete

@steipete steipete commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes channel diagnostics that copy private messages, owner commands, captions, attachment URLs, or malformed inbound JSON excerpts into logs.

User Impact

WhatsApp delivery diagnostics retain message IDs, text lengths, media kinds, sizes, and timing without message bodies or attachment sources, including source-bearing media failure errors. iMessage and Signal report malformed input without repeating it; Signal also omits inbound previews, provider exception payloads, and attachment error content. Teams and Feishu no longer log inbound or quoted message previews. Zalo image failures and Tlon owner-command/media diagnostics omit private content and attachment sources. Message delivery, authorization, recovery, and media limits are unchanged.

Why This Change Was Made

Remove content at its logging source instead of truncating or redacting it later. The WhatsApp preview helper becomes unused and is removed with its mechanism-only tests. Regressions exercise the existing receive/send paths and require the actual message to remain delivered while diagnostics omit it.

Best-effort tradeoffs accepted

None. No security, delivery-settlement, or durability guard is removed. Malformed JSON and failed inbound-media diagnostics intentionally report the failure category without the source-bearing parser/provider error text.

Evidence

  • Focused regression coverage: WhatsApp inbound delivery, text/media sends, verbose delivery, and file logging; iMessage RPC malformed-notification recovery; Signal container WebSocket malformed-frame recovery; Tlon owner admin/approval handling and rejected/failed media.
  • iMessage RPC owner tests: 19 passed, 139.15 seconds wall time. Signal/Tlon and narrowed WhatsApp attempts were stopped after 25–27 minutes of artifact preparation/startup without assertion results. The host load exceeded 500. The earlier combined WhatsApp/E2E attempt also stopped during a build prerequisite; file-log E2E remains unproven locally. No test timeout, retry, or skip was changed; no live channel proof is claimed.
  • Final pre-push lint-suppressions: 3 tests passed, 156.23 seconds Vitest / 206.44 seconds wrapper wall. All changed files pass formatting and diff whitespace checks.
  • Privacy follow-through: existing Feishu, Teams, Signal, and Zalo receive-path coverage now asserts unchanged delivered text/fallbacks and content-free diagnostics. These additions remain unrun locally on the overloaded host. The follow-through pre-push lint-suppressions check passed all 3 tests (115.03 seconds Vitest / 166.53 seconds wrapper wall); formatting and whitespace checks passed.
  • Before the follow-through, production and extension-test graph typechecks passed. Runtime cycle check: zero cycles. The madge check was stopped without a verdict as host load climbed; exact-head hosted CI must supply that proof and the new receive-test types.
  • Targeted oxlint did not reach lint: its unchanged SDK declaration prerequisite timed out at the built-in 300-second bound; no retry, timeout increase, or wrapper bypass. Check-changed's supported explicit-path plan was inspected; the final 60-second caller-bounded execution ended during startup without a verdict. Exact-head hosted CI is the broad landing gate for these missing local checks.
  • Independent P2 review completed with no finding in this privacy packet. Its one structural-packet timer-overflow finding was rejected after source inspection and a direct 45-day-delay probe confirmed the SDK's existing safe clamp.
  • Fresh follow-through review completed scoped-clean through P2 with no actionable findings. One earlier preparation attempt failed before reviewer launch on mixed inventory context size; reviewing the new changes against the current signed HEAD resolved that input-shape issue without filtering source or bypassing isolation.
  • Prior exact head 4d7feb60367cc341e7ccd5c546f23c38f8767e62: hosted CI run 38704535669 completed successfully, including the required CI gate. That result does not prove the subsequent privacy follow-through; its exact-head CI is still required.
  • Follow-through head 5b5526135e2ef9147bbee32047fa68e7221b6f0b: CI run 38708079248 completed with one failed test-bundle job and its aggregate CI gate. The Signal subconfig passed 161 tests and failed the new CRLF fixture, which incorrectly expected raw CRLF instead of the shared inbound owner's longstanding LF normalization. All other selected checks succeeded; planned skips are not proof. The correction changes only that fixture's explicit expected delivery and avoids comparing raw diagnostic length with normalized context length; production behavior is unchanged. Isolated execution of the actual newline owner passed both real-newline and literal-escape fixtures. A bounded full Signal replay reached worker preparation but no assertions under host load; no passing replay is claimed.
  • The correction passed formatting, whitespace, fresh independent review and pre-push lint-suppressions (3 tests, 94.21 seconds Vitest / 147.75 seconds wrapper). That review raised one separate structural-packet concern about in-place mutation of already-sanitized QA tool records; it was declined after confirming native writers only append fresh records and the sanitizer copies their arguments. The structural packet is not part of this PR. No CI rerun, inherited-red exception, timeout increase, retry, or skip was used.
  • Current signed head 1838817535a42ac311fb1ae051c53fb4d5a0dcca: hosted CI run 38711226429 passed, including the repaired Signal bundle and required CI/security gate. Full exact-head check census: 62 successes, 50 planned skips, one neutral CodeQL result, zero failures/cancellations/pending checks. Planned skips and the neutral result are not claimed as executed proof. Live PR is mergeable on that exact head.
  • Net production reduction: 34 lines (tests/support excluded). This is a bug-fix PR under the campaign's size exception; structural cleanup remains separate.

@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: imessage Channel integration: imessage channel: signal Channel integration: signal channel: tlon Channel integration: tlon channel: whatsapp-web Channel integration: whatsapp-web size: M labels Oct 15, 2026
@steipete
steipete marked this pull request as ready for review October 15, 2026 08:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T09:15:05.177152Z 1838817 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 15, 2026
@clawsweeper

clawsweeper Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces private channel content in diagnostics with delivery metadata and fixed failure descriptions.

Example: WhatsApp sends the reply "Account balance: $125".

  • Before: Delivery diagnostics include the reply text.
  • After: Diagnostics record textLength: 21 while the recipient receives the complete reply.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-correct with successful exact-head CI, but supplied behavioral evidence remains test-only.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; supplied validation covers tests and checks, with no live-channel diagnostic capture claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Private messages, captions, attachment sources, owner commands, and malformed input excerpts can appear in channel diagnostics.
Reason: The focused repair enforces the existing privacy contract, and the supplied host identifies this as maintainer-directed work.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes current diagnostic-content leaks with a focused, maintainer-directed change; no actionable introduced defect was found.

Priority: P2
Reviewed head: 4d7feb60367cc341e7ccd5c546f23c38f8767e62

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No supplied shipped-entry-point capture demonstrates content-free channel diagnostics, and base-fail/head-pass execution is not documented.
Agent review details

How this fits together

Channel plugins receive messages and send replies through existing transport owners, while separate diagnostic calls record operational outcomes.

flowchart LR
  A[Channel transport] --> B[Plugin receive owner]
  B --> C[Agent message handling]
  C --> D[Plugin reply owner]
  D --> A
  B --> E[Operational diagnostics]
  D --> E
Loading

Technical review

Best possible solution:

Land the focused diagnostic-content removal while retaining existing delivery, recovery, and authorization owners.

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

Current-main log payloads directly include private content, establishing the failure path by source inspection; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Removing content at each logging source follows repository policy and avoids relying on incomplete downstream redaction without changing message processing.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e5048e178175.

Provenance checked

  • WhatsApp delivery diagnostic previews changes intended behavior with a stated reason (eab4024: Provider-accepted delivery tracking added structured outcome logging; this PR preserves acceptance tracking while intentionally dropping content.)
  • WhatsApp preview helper and Unicode tests changes intended behavior with a stated reason (fix(whatsapp): elide auto-reply text on a UTF-16 boundary #96580: The earlier fix made preview truncation Unicode-safe; source inspection confirms the helper serves diagnostics and has no remaining caller after this cutover.)
  • WhatsApp inbound diagnostic payload changes intended behavior with a stated reason (refactor(whatsapp): split inbound monitor orchestration #115806: The delivery coordinator extraction preserved existing behavior; replacing its content fields leaves normalization, queuing, and delivery unchanged.)
  • iMessage malformed-input diagnostics changes intended behavior with a stated reason (refactor: move iMessage implementation to extension #45539: The extension migration carried the parser logging forward without an intentional behavior change; git log -S across the earlier path encountered an unavailable historical blob, so original introduction remains unknown.)
  • Signal malformed WebSocket diagnostics changes intended behavior with a stated reason (Signal: add REST API support for containerized deployments #16085: Container transport support introduced receive parsing and error reporting; the patch preserves receive continuation while preventing parser excerpts from reaching logs.)
  • Tlon command and media diagnostics changes intended behavior with a stated reason (feat: update tlon channel/plugin to be more fully featured #21208: The expanded plugin introduced owner commands and media handling; later refactors carried the diagnostic behavior forward, and this PR explicitly removes its private content.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

  • Pinned introduction reviewed: The introduced diff changes diagnostic payloads across WhatsApp, iMessage, Signal, and Tlon, removes the unused WhatsApp preview helper, and preserves transport and authorization operations. (4d7feb60367c)
  • Current main still contains the affected logging: Comparison with fetched main confirms that the changed diagnostic calls still include message text, captions, attachment sources, owner commands, or parser details before this patch. (extensions/whatsapp/src/auto-reply/deliver-reply.ts:269, e5048e178175)
  • Retained iMessage diagnostic is content-free: recordProcessDiagnostic only promotes a recognized Full Disk Access failure to fixed public guidance; it does not retain the malformed inbound line. (extensions/imessage/src/client.ts:465, 4d7feb60367c)
  • Repository policy applied: Read the complete root and extensions AGENTS.md files; no additional changed-path ancestor policies were found. The root prohibits logging message/tool content, and no maintainer-notes directory exists in this checkout. (AGENTS.md, 4d7feb60367c)
  • Exact-head hosted checks: The current head has successful openclaw/ci-gate, security-fast, test-type checks, and Critical Quality channel-runtime-boundary results; GitHub reports a clean merge. (4d7feb60367c)
  • Discussion and supplied validation: The complete body and comments supply test/check results but explicitly claim no live-channel proof; the file-log E2E was not completed locally. No substantive review comments are recorded. (4d7feb60367c)

Likely related people:

  • Peter Steinberger: Raw commit eab4024 adds extensions/whatsapp/src/auto-reply/deliver-reply.ts:128 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: eab402493429; files: extensions/whatsapp/src/auto-reply/deliver-reply.ts)

PR surface

Source -20, Tests +125, Other -1. Total +104 across 18 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 8 19 39 -20
Tests 9 163 38 +125
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 18 182 78 +104

Review metrics

Metric Value Why it matters
Production versus test LOC Production +19/-39; tests +163/-38 Production shrinks by removing content-bearing diagnostics and an unused helper; test growth covers privacy while preserving delivery and receive recovery.

Labels

Label changes:

  • add P2: A concrete privacy defect exposes message content through operational diagnostics, with no evidence of an urgent widespread incident.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A concrete privacy defect exposes message content through operational diagnostics, with no evidence of an urgent widespread incident.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 15, 2026, 4:33 AM ET / 08:33 UTC.

@openclaw-barnacle openclaw-barnacle Bot added channel: msteams Channel integration: msteams channel: zalo Channel integration: zalo channel: feishu Channel integration: feishu labels Oct 15, 2026
@steipete
steipete merged commit 4f0827b into main Oct 15, 2026
125 checks passed
@steipete
steipete deleted the deslop/y15-ext-channels-b-20261015 branch October 15, 2026 09:30
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…law#172935)

* fix(channels): keep message content out of diagnostics

* fix(channels): remove remaining inbound content diagnostics

* test(signal): preserve inbound newline normalization in privacy proof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu channel: imessage Channel integration: imessage channel: msteams Channel integration: msteams channel: signal Channel integration: signal channel: tlon Channel integration: tlon channel: whatsapp-web Channel integration: whatsapp-web channel: zalo Channel integration: zalo P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant