Skip to content

fix(delivery): prevent duplicate generated-media handoffs#105717

Merged
vincentkoc merged 5 commits into
mainfrom
fix/media-handoff-dedupe
Jul 12, 2026
Merged

fix(delivery): prevent duplicate generated-media handoffs#105717
vincentkoc merged 5 commits into
mainfrom
fix/media-handoff-dedupe

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jul 12, 2026

Copy link
Copy Markdown
Member

What Problem This Solves

Generated media can be delivered twice when a model both sends it through the message tool and returns the same media in its completion payload. Legacy global delivery telemetry also cannot safely identify which route carried a payload when a run targets multiple routes.

Fixes #88307.

Why This Change Was Made

Delivery deduplication now compares completion payloads against route-scoped message-tool evidence. Account fallback is resolved only when routing did not already select an account and the channel plugin exposes account enumeration. Ambiguous global-only evidence is deliberately ignored for multi-route runs so valid payloads are not dropped.

User Impact

Users no longer receive duplicate generated-media handoffs on a single route. Multi-route deliveries retain payloads unless evidence proves the same payload was already sent on that route.

Evidence

  • 691 focused tests passed across delivery, outbound payload, gateway, command, and auto-reply suites in Blacksmith Testbox tbx_01kxc3z4kwtx37jb1xjtd7gp1y.
  • Fresh gpt-5.6-sol high autoreview reported no accepted or actionable findings after the regression fixes.
  • git diff --check passes.
  • The broad changed gate was attempted remotely, but the Testbox full-sync classified 2,568 unrelated files and hit the current @smithy/node-http-handler shrinkwrap override mismatch. The exact focused touched-surface proof above is green; exact-head GitHub CI remains required before merge.

@vincentkoc vincentkoc self-assigned this Jul 12, 2026
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Jul 12, 2026
@vincentkoc
vincentkoc force-pushed the fix/media-handoff-dedupe branch from 4fc9ad6 to eca7bf1 Compare July 12, 2026 22:25
@clawsweeper

clawsweeper Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head eca7bf15fb0a7bf6f1bd924e99651499d2c8c028, but the PR head is now af71fcc3d51216fff8364c649172b38867a402ef. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

@vincentkoc
vincentkoc force-pushed the fix/media-handoff-dedupe branch from af71fcc to 3476e57 Compare July 12, 2026 22:47
@vincentkoc

Copy link
Copy Markdown
Member Author

Land-ready proof for exact head 714a81b: Testbox tbx_01kxc3z4kwtx37jb1xjtd7gp1y passed 691 focused tests plus an 83/83 final regression rerun; fresh full-branch gpt-5.6-sol/high autoreview reported no actionable findings at 0.88 confidence; all 72 exact-head GitHub checks passed; native OPENCLAW_TESTBOX=1 scripts/pr prepare-run 105717 passed. Live Discord reproduction remains follow-up proof before closing issue #88307. Landing to main with rebase/no squash.

@vincentkoc
vincentkoc merged commit cca22d9 into main Jul 12, 2026
104 checks passed
@vincentkoc
vincentkoc deleted the fix/media-handoff-dedupe branch July 12, 2026 23:25
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via rebase.

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

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: generated image completions still double-send Discord attachments after media handoff fix

1 participant