fix(message-tool): allow buffer-only attachments without media path or url (#90768)#90807
fix(message-tool): allow buffer-only attachments without media path or url (#90768)#90807lonexreb wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 5, 2026, 10:17 PM ET / 02:17 UTC. Summary PR surface: Source +33, Tests +29. Total +62 across 2 files. Reproducibility: yes. By source inspection, ordinary Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Materialize buffer-only ordinary send inputs into OpenClaw-owned outbound media paths before Do we have a high-confidence way to reproduce the issue? Yes. By source inspection, ordinary Is this the best way to solve the issue? No. The maintainable fix belongs at the ordinary send boundary as buffer-to-outbound-media materialization, with buffer values excluded from media-source path normalization. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 3a2f54e6a866. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +33, Tests +29. Total +62 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
Thanks for the review. Agreed — the proper fix lives in send materialization, not Yielding this PR to #90794. Maintainers — feel free to close this in favor of that one. I'll leave it open in case any of the structured-attachment hydration here is useful as a follow-up; happy to close on request. |
|
Superseded by the canonical fix now on The landed version fixes #90768 across local sends, gateway Proof: focused Vitest bundle, clean autoreview, and Testbox-through-Crabbox Thanks @lonexreb. Closing this PR as superseded by the landed main fix. |
Summary
message.sendwith structuredattachments[]carrying onlybuffer + filename + contentTypesilently dropped the attachment.collectStructuredAttachmentSourcesonly recognized entries withmedia/mediaUrl/path/filePath/fileUrl/url, so buffer-only entries never reached the dispatcher.collectStructuredAttachmentSourcesto surface buffer-only attachment entries (newkind: "buffer"), and promote the buffer/filename/contentType onto the top-level args inhydrateAttachmentActionPayloadso existing buffer hydration insendAttachment/reply/upload-filepaths picks them up.Real behavior proof
Behavior addressed:
message.sendwithattachments: [{ buffer, filename, contentType }](no media/path/URL) used to fail; the buffer-only attachment is now promoted to top-level args and dispatched through the standard channel send path.Real environment tested: local vitest in worktree via
node scripts/run-vitest.mjs.Exact steps or command run after this patch:
node scripts/run-vitest.mjs src/infra/outbound/message-action-params.test.tsnode scripts/run-vitest.mjs src/infra/outbound/message-action-runner.media.test.tsEvidence after fix: message-action-params.test.ts 28 passed (28); message-action-runner.media.test.ts 28 passed (28). New regression test
promotes buffer-only structured attachments to top-level args (#90768)assertsargs.buffer,args.filename, andargs.contentTypeare set from the structured entry.Observed result after fix: buffer-only attachment dispatches successfully; downstream channel handler receives the same base64
buffer,filename, andcontentTypeas if the caller had set them at top level.What was not tested: live Telegram/Desktop send path (no live channel creds in this worktree); broader e2e and full
pnpm checkwould be Crabbox/Testbox jobs.Fixes #90768