Skip to content

fix(outbound): route media payloads through handler.sendPayload in agent --deliver - #78635

Closed
chinar-amrutkar wants to merge 1 commit into
openclaw:mainfrom
chinar-amrutkar:fix/77265-clean
Closed

chinar-amrutkar wants to merge 1 commit into
openclaw:mainfrom
chinar-amrutkar:fix/77265-clean

Conversation

@chinar-amrutkar

@chinar-amrutkar chinar-amrutkar commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

Fix Summary

Issue: #77265 - agent --deliver returns mediaUrl payload but doesn't send Telegram media

Root Cause: In src/infra/outbound/deliver.ts, the condition for calling handler.sendPayload checks for isError, presentation, interactive, channelData, and audioAsVoice, but did not check for mediaUrl or mediaUrls. When a payload has only media (no presentation/interactive/channelData), the handler.sendPayload path was skipped.

Fix: Added media URL check to the handler.sendPayload condition so that payloads with media are correctly routed through handler.sendPayload, which the Telegram adapter uses to send media via sendPayloadMediaSequenceOrFallback.

Files Changed

  • src/infra/outbound/deliver.ts — 2 lines

Test Plan

  • Verify openclaw agent --deliver with media URL now sends Telegram media
  • Verify existing text-only and multi-media deliveries still work

Closes #77265

…ent --deliver

When a payload has mediaUrl/mediaUrls but no presentation, interactive,
or channelData, the handler.sendPayload path was skipped. Media payloads
now correctly trigger handler.sendPayload, which the Telegram adapter
uses to send media via sendPayloadMediaSequenceOrFallback.

Fixes openclaw#77265
@openclaw-barnacle openclaw-barnacle Bot added size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 6, 2026
@clawsweeper

clawsweeper Bot commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Keep open: this is a plausible candidate for the linked media-only Telegram agent --deliver bug, but it is not merge-ready because the PR has no real Telegram proof and the predicate is broader than the reported failure, changing existing media delivery semantics.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #77265
Summary: This PR is the open candidate fix for the concrete media-only Telegram agent --deliver report; broader text-plus-media channel contract work remains separate.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Canonical path: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review.

So I’m closing this here because the remaining work is already tracked in the canonical issue.

Review details

Best possible solution:

Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review.

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

Yes at source level: the linked issue provides a concrete Telegram agent --deliver command, and current main still excludes ordinary mediaUrl/mediaUrls from the payload-aware sendPayload guard. I did not run live Telegram proof, so exact runtime confirmation remains missing.

Is this the best way to solve the issue?

No: the PR changes the likely shared routing area, but the predicate is broader than the reported media-only case and can alter existing multi-media semantics. A narrowed branch or explicit maintainer approval for the broader contract is safer.

Security review:

Security review cleared: The diff only changes an outbound routing predicate and adds no dependency, workflow, script, credential, permission, or code-execution surface.

AGENTS.md: found and applied where relevant.

What I checked:

  • stale F-rated PR: PR was opened 2026-05-06T21:01:22Z, is older than 60 days, and the latest review rated it F.
  • proof blocker: real behavior proof is missing and proof tier is F, so this branch is not merge-ready without contributor follow-up.
  • no human follow-up: live comments and timeline hydrated by apply contain no non-automation activity after the ClawSweeper review.

Likely related people:

  • steipete: History shows foundational outbound durable lifecycle and media planner commits plus adjacent channel message/plugin SDK compatibility work on the affected contract boundary. (role: long-term outbound and plugin SDK payload contributor; confidence: high; commits: 2ead1502c9bf, f550aa7622ce, a4b17d65a8ff; files: src/infra/outbound/deliver.ts, src/infra/outbound/message-plan.ts, src/plugin-sdk/reply-payload.ts)
  • piersonr: The reply payload sending hook work touched outbound delivery and plugin hook semantics that can change when more payloads route through sendPayload. (role: plugin reply hook contributor; confidence: medium; commits: b474f429ee4b; files: src/infra/outbound/deliver.ts, src/plugin-sdk/reply-payload.ts, src/channels/message/send.ts)
  • obviyus: Recent history includes outbound partial-send recovery in the central delivery file and Telegram chunked outbound send tracking near this delivery boundary. (role: recent outbound and Telegram delivery contributor; confidence: medium; commits: 210ea659f77f, bc2728c6b17a; files: src/infra/outbound/deliver.ts, extensions/telegram/src/outbound-adapter.ts)
  • vincentkoc: Recent history includes shared Telegram outbound send context, Telegram send runtime loader work, and plugin SDK reply-payload changes used by this path. (role: recent Telegram and reply payload contributor; confidence: medium; commits: b5bae67aadfb, e012f2cd3cc8, 2b75806197ab; files: extensions/telegram/src/outbound-adapter.ts, src/plugin-sdk/reply-payload.ts)
  • mbelinky: Recent Telegram durable sendMessage work is adjacent to the outbound final-delivery path this PR exercises. (role: recent Telegram durable delivery contributor; confidence: medium; commits: f3fe48e8b791; files: extensions/telegram/src/outbound-adapter.ts, src/infra/outbound/deliver.ts)

Codex review notes: model internal, reasoning high; reviewed against 010b61746379.

@barnacle-openclaw

Copy link
Copy Markdown

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

@barnacle-openclaw barnacle-openclaw Bot added the stale Marked as stale due to inactivity label May 31, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed mantis: telegram-visible-proof Mantis should capture Telegram visible proof. labels May 31, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Jun 1, 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. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 14, 2026
@clawsweeper
clawsweeper Bot temporarily deployed to qa-live-shared June 14, 2026 20:24 Inactive
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Jun 19, 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 stale Marked as stale due to inactivity triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 20, 2026
@clawsweeper

clawsweeper Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@chinar-amrutkar thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward.

Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive.

Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it.

@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Jul 21, 2026
@steipete

Copy link
Copy Markdown
Contributor

Closing per ClawSweeper review verdict duplicate_or_superseded (decision packet 2026-07-03T21:05:13.075Z). This item was part of the audited close backlog (openclaw/clawsweeper#920) stranded by an apply-lane defect, drained manually after re-verification. If this is wrong, reopen and ClawSweeper will re-review.

@steipete steipete closed this Jul 29, 2026

This branch was previously deployed

1 inactive deployment
qa-live-shared — 19cfffb2 Deployed Jun 14, 2026 by clawsweeper[bot] via Run agentic native Telegram proof #168646
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mantis: telegram-visible-proof Mantis should capture Telegram visible proof. 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. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agent --deliver can return mediaUrl payload without delivering Telegram media

2 participants