Repository navigation
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: blocked before merge. Reviewed September 19, 2026, 12:53 AM ET / 04:53 UTC (Revision 10). ClawSweeper reviewWhat this changesPreserves attachments when captions are stripped and makes chat replies use recorded publications instead of reconstructing captions from tool arguments. Merge readiness⛔ Blocked before merge - 3 items remain Current main still contains the reported buffer-loss path. This PR provides a coherent repair with convincing Gateway and browser proof; no actionable correctness finding was identified. Priority: P2 Review scores
Verification
How this fits togetherThe message tool sanitizes outgoing captions before validating and staging attachments. Gateway history and the Control UI display the resulting publications while retaining tool inputs in expanded diagnostics. flowchart LR
A[Message tool input] --> B[Caption sanitization]
B --> C[Media validation and staging]
C --> D[Recorded publication]
D --> E[Chat history]
E --> F[Control UI reply]
A --> G[Expanded tool diagnostics]
Decision needed
Why: The fallback exists in the latest release, and the PR intentionally removes it; tests establish the outcome but cannot establish acceptance of the upgrade tradeoff. Before merge
Agent review detailsSecurityNone. PR surfaceSource -485, Tests -14, Other +2. Total -497 across 23 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep recorded publications as the single reply-display source, with explicit maintainer acceptance of the documented older-history visibility change. Do we have a high-confidence way to reproduce the issue? Yes: current-main source suppresses a fully stripped caption before staging its buffer, matching the linked report’s concrete production-tool reproduction. This review inspected source and supplied proof without executing target code. Is this the best way to solve the issue? Yes for attachment preservation and canonical display ownership: the patch reuses existing validation and publication paths. Acceptance of its historical-display tradeoff remains a human compatibility decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 929bafb35f56. LabelsLabel justifications:
EvidenceWhat 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 (9 earlier review cycles; latest 8 shown)
|
0787d38 to
b94121c
Compare
…50694 # Conflicts: # src/agents/tools/message-tool.internal-source-reply.integration.test.ts # src/gateway/server-methods/models-auth-refresh.catalog.integration.test.ts # test/scripts/vitest-report-fixture.ts
…50694 # Conflicts: # test/vitest/vitest.gateway-server-paths.mjs
|
Merged as c7bf1ab23032. Buffer attachments now survive caption sanitization, and assistant replies/compact message cards no longer reconstruct stripped captions from tool arguments. Expanded diagnostic input remains available. Verified with registered Gateway regressions, actual browser before/after proof and exact-byte downloads, focused contract checks, a clean exact-head ClawSweeper review, and successful required CI. Thanks @zhangguiping-xydt for the original fix. |
…openclaw#150694) Closes openclaw#150701 ## What Problem This Solves Fixes attachments disappearing when their caption is entirely sanitized, and stripped caption text reappearing in assistant replies or collapsed Control UI message cards. ## User Impact Base64 attachments survive caption sanitization, while assistant replies show the published caption and attachment rather than the original tool arguments. Ordinary captions, mixed public/private captions, and literal quoted markers retain their intended public content. Expanded diagnostic input remains available. Older message-tool history without a recorded publication no longer produces a reconstructed assistant reply. The original tool input is still inspectable; stored arguments, media validation, permissions, and retention are unchanged. ## Why This Change Was Made Count a nonblank buffer as remaining content before the existing outbound media handler validates and stages it. Use recorded publications for message-tool assistant replies instead of a second argument-based reconstruction path. Collapsed message cards show existing action/target metadata, not unverified caption arguments. The earlier catalog and watchdog test-race repairs are now on main and have no remaining diff in this PR. Contributor commits are preserved. ## Evidence [Inspected before/after screenshots and real-browser observations](openclaw#150694 (comment)). - Real registered `chat.send` regressions cover sanitized buffers, invalid and oversized buffers, explicit-source precedence, denied media, exact authorized downloads, canonical history and paging, live history SSE, capped diagnostic details, dry runs, cancellation, and same-key replay. - Actual Gateway-served Control UI proof covers internal-only, delivery-metadata-only, mixed, ordinary, and quoted-marker captions. Opening the attachment and following its rendered signed link returned HTTP 200, `text/plain`, and the exact 33-byte fixture. Expanding the tool card retained the original synthetic caption. - Both registered Gateway regressions and 80 focused UI tests passed again after the required main-conflict integration and dependency refresh. Supporting owner/sibling coverage passed 437 tests; runtime-prerequisite routing passed 97 cases, with unrelated cases filtered out. - Scoped source/fixture types, changed-file type-aware lint, formatting, and size/whitespace checks passed before the final base update. The affected Gateway/UI behavior and the UI build were rechecked afterward; no performance threshold was changed. The provider responses are synthetic, but Gateway admission, message execution, persistence, history, browser rendering, and artifact authorization/download are real. Live model generation, external channel delivery, and native-app rendering were not exercised. Co-authored-by: Ayaan Zaidi <[email protected]>




Closes #150701
What Problem This Solves
Fixes attachments disappearing when their caption is entirely sanitized, and stripped caption text reappearing in assistant replies or collapsed Control UI message cards.
User Impact
Base64 attachments survive caption sanitization, while assistant replies show the published caption and attachment rather than the original tool arguments. Ordinary captions, mixed public/private captions, and literal quoted markers retain their intended public content. Expanded diagnostic input remains available.
Older message-tool history without a recorded publication no longer produces a reconstructed assistant reply. The original tool input is still inspectable; stored arguments, media validation, permissions, and retention are unchanged.
Why This Change Was Made
Count a nonblank buffer as remaining content before the existing outbound media handler validates and stages it. Use recorded publications for message-tool assistant replies instead of a second argument-based reconstruction path. Collapsed message cards show existing action/target metadata, not unverified caption arguments.
The earlier catalog and watchdog test-race repairs are now on main and have no remaining diff in this PR. Contributor commits are preserved.
Evidence
Inspected before/after screenshots and real-browser observations.
chat.sendregressions cover sanitized buffers, invalid and oversized buffers, explicit-source precedence, denied media, exact authorized downloads, canonical history and paging, live history SSE, capped diagnostic details, dry runs, cancellation, and same-key replay.text/plain, and the exact 33-byte fixture. Expanding the tool card retained the original synthetic caption.The provider responses are synthetic, but Gateway admission, message execution, persistence, history, browser rendering, and artifact authorization/download are real. Live model generation, external channel delivery, and native-app rendering were not exercised.