Skip to content

[bug] IM auto-pushes generated drafts before visual review accepts them #2859

Open

Description

@henryZhouLikeStudy

Problem

In an image generation → visual review → revision workflow, IM recipients receive generated drafts before review has accepted them. A later send_file_to_user call cannot retract those drafts. This makes a request for one reviewed image produce several user-visible versions.

Observed with Octop 1.0.3b3 on the Weixin/iLink channel. The image-review plugin itself returns text and is not responsible for sending these drafts.

Reproduction

  1. Enable image generation and a visual review tool for an agent.
  2. Ask for a synthetic illustration and require review before delivery.
  3. Generate image A; review rejects a visible defect.
  4. Generate image B; review accepts it; explicitly send B.
  5. Observe that image A was already delivered before its review finished.

Cause and scope

MEDIA_PUSH_TOOL_BASES in src/octop/infra/gateway/media/tool_media.py includes generate_image and generate_video. Their tool results are projected directly into outbound IM media events, independently of any later review or explicit delivery decision.

This is separate from #2351 / #2683 (workspace resolution and retry suppression) and #2283 / #2286 (image inspection). The current auto-push behavior predates those changes.

Expected behavior

Provide a defined way for reviewed-media workflows to keep drafts internal and deliver only explicitly selected artifacts. Preserve compatibility for workflows that intentionally rely on automatic generation-result delivery; the default/opt-in policy should be decided explicitly.

Acceptance coverage should include a rejected draft, an accepted final artifact, multiple revisions, and ordinary generation without a review workflow. Dashboard tool previews should remain usable without forcing a draft into IM delivery.

Privacy

This report uses synthetic names only. No screenshots, generated user images, chat text, server addresses, account identifiers, credentials, private filesystem paths, or production session identifiers are included.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions