Skip to content

Fix media delivery identity accounting#93090

Closed
kiranmagic7 wants to merge 1 commit into
openclaw:mainfrom
kiranmagic7:kiran/qqbot-media-delivery-identity
Closed

Fix media delivery identity accounting#93090
kiranmagic7 wants to merge 1 commit into
openclaw:mainfrom
kiranmagic7:kiran/qqbot-media-delivery-identity

Conversation

@kiranmagic7

Copy link
Copy Markdown
Contributor

Summary

Fixes #92816.

The shared media delivery path counted any adapter media result as delivered, even when the adapter returned no delivery identity. QQBot can return that shape when generated TTS media cannot be sent, which made cron report delivered even though no platform message existed.

This applies the same invariant the sendPayload path already uses: adapter results without a message/chat/channel identity are suppressed, not mirrored, and do not emit a successful message_sent hook.

Verification

  • pnpm install --frozen-lockfile
  • node scripts/run-vitest.mjs src/infra/outbound/deliver.test.ts
  • git diff --check

@openclaw-barnacle openclaw-barnacle Bot added size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 14, 2026
@clawsweeper

clawsweeper Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

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

Close as superseded: the useful media identity-accounting change is already covered by the broader, open, clean, proof-positive accounting PR, while the live QQBot cron auto-TTS delivery fix is tracked separately.

Canonical path: Close this branch and keep shared empty-identity accounting review on #79811; keep live QQBot cron auto-TTS delivery review on #92947.

So I’m closing this here and keeping the remaining discussion on #79811, #92947, and #92826.

Review details

Best possible solution:

Close this branch and keep shared empty-identity accounting review on #79811; keep live QQBot cron auto-TTS delivery review on #92947.

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

Yes, from source inspection: current main can push a media adapter result with an empty messageId, making durable send see a non-empty result set. I did not run a live QQBot cron reproduction for this branch.

Is this the best way to solve the issue?

No, not as the best landing path. The patch is plausible for media-only accounting, but the broader open PR is the better canonical fix because it applies the same identity contract across sibling outbound result paths.

Security review:

Security review cleared: The diff only changes TypeScript delivery accounting and a colocated regression test; it does not touch dependencies, workflows, credentials, auth, secrets, or supply-chain execution.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • indulgeback: Authored the broader open accounting PR that covers this PR's media branch plus sibling text and formatted-text empty-identity paths. (role: canonical open fix author; confidence: high; commits: e046c2868b6a; files: src/infra/outbound/deliver.ts, src/infra/outbound/deliver.test.ts, src/cron/isolated-agent.direct-delivery-core-channels.test.ts)
  • steipete: GitHub path history shows repeated foundational work on shared outbound delivery, channel delivery seams, and related state/refactor surfaces. (role: feature-history owner; confidence: medium; commits: 5a6eddf5d0d5, f91de52f0d23, 1507a9701b83; files: src/infra/outbound/deliver.ts, src/channels/message/send.ts, extensions/qqbot/src/channel.ts)
  • cxyhhhhh: Merged QQBot group/chat media work introduced much of the unified media upload and local media handling surface connected to this bug path. (role: original QQBot media contributor; confidence: high; commits: 5ccf179a34a9; files: extensions/qqbot/src/engine/messaging/outbound-media-send.ts, extensions/qqbot/src/channel.ts)
  • zhangguiping-xydt: Recently touched QQBot media failure surfacing near the no-identity media result shape used by the linked report. (role: recent QQBot media contributor; confidence: medium; commits: 650c5cac3326; files: extensions/qqbot/src/channel.ts)

Codex review notes: model internal, reasoning high; reviewed against 9ba6ed1d5cb8.

@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. P2 Normal backlog priority with limited blast radius. 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. labels Jun 14, 2026
@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Closing as superseded after the review above.

The useful media identity-accounting path is already covered by #79811, and the live QQBot cron auto-TTS delivery path is tracked separately in #92947. Keeping this branch open would duplicate that review surface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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.

[Bug]: 当tts设置为always时,cron会投递失败,但是结果会显示已投递

1 participant