fix(outbound): suppress media sends without delivery identity#92826
fix(outbound): suppress media sends without delivery identity#92826ZengWen-DT wants to merge 1 commit into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the useful accounting change is already covered by the broader open clean PR at #79811, which applies the same identity-required contract across text, formatted-text, and media delivery paths rather than only this media branch. Canonical path: Review and land #79811, or an equivalent broader shared empty-receipt fix, while tracking any remaining live QQBot generated-audio staging problem separately. So I’m closing this here and keeping the remaining discussion on #79811. Review detailsBest possible solution: Review and land #79811, or an equivalent broader shared empty-receipt fix, while tracking any remaining live QQBot generated-audio staging problem separately. Do we have a high-confidence way to reproduce the issue? Yes. Current main's media branch appends a returned media result even when Is this the best way to solve the issue? No, not as the best landing path. The local patch is plausible, but the broader open PR is a better canonical solution because it applies the same identity-required contract to text, formatted-text, and media paths. Security review: Security review cleared: The diff only changes shared outbound 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:
Codex review notes: model internal, reasoning high; reviewed against 399f5bc99351. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
Linked context
Closes #92816
Real behavior proof (required for external PRs)
Behavior or issue addressed: QQBot-shaped media results with
messageId: ""are no longer counted as delivered.Real environment tested: Local OpenClaw checkout on this PR branch, Node 24.14.0, using the real outbound delivery code path with a QQBot-shaped adapter response.
Exact steps or command run after this patch:
Evidence after fix:
{ "results": [], "outcomes": [ { "index": 0, "status": "suppressed", "reason": "adapter_returned_no_identity" } ] }Observed result after fix: The outbound delivery result stays empty when the media adapter returns no delivery identity, so cron/TTS delivery accounting no longer sees that send as delivered.
What was not tested: I did not run a live QQBot cron/TTS delivery. I do not have QQBot credentials available in this checkout.
Proof limitations or environment constraints: The live service was not exercised; the proof covers the shared delivery boundary changed by this PR.
Before evidence (optional but encouraged): The new regression failed before the fix because the media branch counted the empty adapter response as delivered.
Tests and validation
pnpm test src/infra/outbound/deliver.test.ts -- --reporter=verbosepnpm test extensions/qqbot/src/channel.message-adapter.test.ts -- --reporter=verbosepnpm test src/cron/isolated-agent/delivery-dispatch.double-announce.test.ts -- --reporter=verbose -t "applies TTS directives before direct cron announce delivery and mirrors spoken text|keeps unresolved message-tool delivery out of delivered status"pnpm format:check -- src/infra/outbound/deliver.ts src/infra/outbound/deliver.test.tsgit diff --checkpnpm tsgo:core:testRegression coverage added:
src/infra/outbound/deliver.test.tsnow covers a media adapter result with no delivery identity.Risk checklist
Did user-visible behavior change?
YesDid config, environment, or migration behavior change?
NoDid security, auth, secrets, network, or tool execution behavior change?
NoHighest-risk area: shared outbound media delivery accounting.
How is that risk mitigated? The change is limited to delivery result accounting. Media sends with a real delivery identity are still counted; responses without an identity are treated as not delivered.
Current review state
Next action: maintainer review and CI.
Waiting on: reviewer feedback and CI.
Bot/reviewer comments addressed: none yet.
AI-assisted (Claude). The proof above was run manually.