Repository navigation
fix(channels): keep message and voice content out of diagnostics - #172944
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs changes before merge. What this changesThis PR replaces channel message and voice excerpts with diagnostic metadata and redacts all Telegram raw-update string values. Example: Telegram receives a forwarded message whose sender_user_name is "private forward sender".
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it addresses diagnostic-content leaks still present on main, but leaves an existing Matrix test requiring the removed preview. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherDiscord, Telegram, and Matrix plugins prepare incoming content for agents and system events while emitting separate Gateway diagnostics. flowchart LR
A[Channel updates and voice] --> B[Plugin context owners]
B --> C[Agent payloads and system events]
B --> D[Metadata diagnostics]
A --> E[Telegram raw update formatter]
E --> D
D --> F[Gateway logging]
Technical reviewBest possible solution: Preserve the metadata-only diagnostics and replace the obsolete Matrix preview assertion with the privacy contract. Do we have a high-confidence way to reproduce the issue? Current-main source directly logs message previews, voice excerpts, and unknown Telegram string values; inspection also establishes the incompatible Matrix test expectation without executing target code. Is this the best way to solve the issue? Removing content at the logging source follows the documented privacy contract, preserves processing owners, and avoids an exhaustive blacklist for future Telegram string fields. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 774f7eda88ba. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -43, Tests +124. Total +81 across 19 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 15, 2026, 4:44 AM ET / 08:44 UTC. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea07ba8b16
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const preview = truncateUtf16Safe(bodyText, 200).replace(/\n/g, "\\n"); | ||
| logVerboseMessage(`matrix inbound: room=${roomId} from=${senderId} preview="${preview}"`); | ||
| logVerboseMessage(`matrix inbound: room=${roomId} from=${senderId} chars=${bodyText.length}`); |
There was a problem hiding this comment.
Update the stale Matrix preview assertion
When the Matrix monitor test suite runs, the existing keeps inbound log previews UTF-16 well-formed at the limit case in handler.test.ts still requires the old exact preview="..." log message, so this new chars= output deterministically fails that test. Replace or remove the obsolete preview assertion while retaining coverage that inbound content stays out of diagnostics.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
…nclaw#172944) * fix(channels): keep message and voice content out of diagnostics * test(discord): retire transcript preview assertions
What Problem This Solves
Fixes message and voice content appearing in channel diagnostics when verbose logging is enabled.
User Impact
Discord, Telegram, and Matrix keep message, reply, reaction, and voice content available to agents without copying it into routine diagnostics. Routing metadata and character counts remain. Telegram raw-update diagnostics redact all string values, including newly introduced API fields; their bounded numeric/boolean structure and permitted identifiers remain available. No configuration, SDK, persisted-data, delivery, or authorization contract changes.
Why This Change Was Made
The channel handlers still formatted inbound previews and interaction/system-event text for logs. Discord voice also formatted transcript, delegated-question, and answer excerpts. Those are content disclosures regardless of truncation. Telegram's raw-update field-name blacklist additionally missed string fields such as forwarded sender names and sticker emoji. Removing previews and defaulting unknown strings to redacted keeps diagnostic metadata without depending on an exhaustive content-field list.
This is the coherent bug-fix exception to the wave-5 cleanup size threshold, not a quota cleanup PR. Separate media, CLI, and pinned-dependency consolidations are excluded.
Best-effort tradeoffs accepted
None of the campaign's speculative concurrency guards are removed. The obsolete voice-preview formatter and its formatter-only tests disappear because logging message excerpts is the defect. Telegram no longer logs arbitrary unknown string fields; use the update shape and existing numeric/boolean metadata for diagnosis rather than content excerpts.
Evidence
Independent review found no actionable defect in this privacy packet. One finding concerned a separate, excluded Matrix cleanup; source inspection showed its load path already parses fresh JSON bytes, so that finding was declined. The privacy changes are unchanged from the reviewed snapshot.
Formatting, diff whitespace checks, and the required lint-suppression tests passed (3/3 tests; 201.06 seconds overall on the loaded host). Regression fixtures assert actual agent/system-event payloads still contain synthetic probes while logs do not. No live channel or live state was accessed. Pre-fix runnable regression proof is not yet available; the original content-bearing log statements are visible in the diff.
Runtime-value and madge cycle checks both passed with zero cycles. The original local focused runner spent 693.6 seconds preparing its compiled-worker prerequisite, then made no test progress for ten minutes; it was cancelled with no test verdict. Combined local changed checks were also cancelled after 34 minutes during the SQLite worker ratchet, with no verdict on that ratchet. Local changed checks passed conflict markers, line-cap growth, and the max-lines ratchet. The separate environment-variable subcheck fails at 455 names versus budget 454 on both the untouched branch base and pinned main
a065e6a28257fc4ec6735a11f177ab0def2b9cb8, using the existing counting owner against committed trees. This PR adds no environment-variable names and does not widen the budget. An assertion-baseline shrink requested by the separate, excluded cleanup is applied only to that uncommitted cleanup.Initial exact-head CI run 38705810716 completed with two PR-caused test failures:
checks-node-changed-1retained an obsolete test that required the removed transcript preview;checks-node-changed-extensions-bundle-1-1found the new batch privacy fixture never reached agent dispatch because it omitted speaker authorization. The aggregateopenclaw/ci-gatefailed downstream. Neither failure is attributed to main. The obsolete preview-only test is removed. An independently reviewed fixture repair authorized the synthetic speaker, but its focused local replay produced no executed case in ten minutes. Per the campaign's inconclusive-replay rule, the entire newvoice-logging.test.tsaddition is dropped instead of waiting for capacity. The remaining 27 voice runtime cases, including agent payload and playback behavior, stay unchanged and passed on the initial privacy production head. There is no claim of new voice-logging regression proof. Production privacy code and authorization are unchanged by this test-only follow-up.Fresh scoped repair review completed with no accepted/actionable P1-or-higher findings; the new test was subsequently dropped under the explicit campaign rule. The pre-push suppression replay passed 3/3 (123.49 seconds shard wall time; 83.66 seconds Vitest duration). Telegram's new context/reaction/raw-update privacy assertions passed on the initial head, as did hosted type and lint jobs; those results remain prior-head evidence after the test-only follow-up. The two initial failing CI job steps took 499.53 and 519.25 seconds respectively; bundled execution does not expose independent wall times for every changed test file.
The exact-head census also found three cancelled ancillary checks:
PR context and evidencecompleted its actual evidence step successfully before run cancellation; twoauto-responsejobs had zero steps and provide no proof. They are not called inherited failures or passing tests. No CI job was rerun.Exact follow-up head
ea07ba8b16ccb9b76540c201b0f3b173eabd31f3passed hosted CI run 38709370229, including the repaired voice runtime suite, extension bundles, production/test types, lint, architecture, source contracts, QA smoke, and baseline ratchets.openclaw/ci-gatecompleted successfully. The complete exact-head census contained 112 checks with no failed checks. One ancillary ClawSweeperdispatchcheck was cancelled after both actual dispatch steps and all other executed steps completed successfully; it is not a test suite or additional passing test proof. No CI reruns were requested.Net production LOC: 43 removed (+17/-60), excluding tests and fixtures. The unrelated cleanup remains outside this PR.