Skip to content

fix: honor corrected image references and generation options - #198196

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/creative-request-identity-20261113
Nov 13, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/creative-request-identity-20261113

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #198193

What Problem This Solves

Fixes: correcting an image reference, model, or generation option can return an unrelated active task when the prompt stays the same.

User Impact

Image edits now use the corrected inputs instead of silently reusing earlier work, including when a reference file is overwritten at the same path. Exact active and recent retries remain deduplicated. No new configuration or migration is required.

Why This Change Was Made

Remove the shared prompt-only preflight and match active work by the complete prepared request key. Image preparation loads references once, hashes the actual buffers passed to generation, and includes ordered referenceInputs facts (SHA-256, byte count, MIME type) in started, duplicate, and completed receipts. Request keys are bounded digests; printable receipts exclude inline image payloads. These facts describe observed inputs, not authority or proof of visual fidelity.

Video and music keep their existing request preparation and use the corrected shared matcher. This slice does not change review, delivery, supersession, or provider adapters.

Evidence

  • Reproduced through the real image_generate execute entrypoint on base 91046f7bbbb8b064491ee2ecbfd782cb12b0124c: four correction cases (different reference, overwritten same-path bytes, model, provider options) all returned duplicateGuard: true incorrectly. All four pass with the repair; exact retries start no extra job. The fixture uses real file loading and image-generation runtime with fixed external provider I/O, and checks the bytes/model/options received by the provider.
  • Focused image/auth/ClawRouter, video/music, native resource lifetime, background retention, activity/status, reference loading, and prompt-prefix proof: 218 tests across 12 files passed (141.17 s wall). Final image/reference rerun after case-insensitive inline-payload redaction: 94 tests passed (49.08 s wall).
  • Exact-head CI 43395586451 passed, including security-fast; the current-head combined CI/security gate also passed.
  • Production and agents-tools test typechecks, targeted production/test lint, formatting, and git diff --check passed. No package or build boundary changes.
  • pr-simplify: removed the competing prompt-only preflight and obsolete prompt-only fixture; retained one prepared identity owner. Against the base: production +4 net lines; tests/support +53 net lines.
  • Fresh independent local autoreview, Codex gpt-6.1-sol, P0–P2, base 91046f7bbbb8b064491ee2ecbfd782cb12b0124c against local snapshot SHA-256 1afcdcefa5921a9fb6b0771d3554d6cdefc0a30a85b8fa0ee33c7f0518c5c486: scoped-clean, no actionable findings. Local ClawSweeper was unavailable because the existing runner checkout is dirty. The completed hosted review of b5d746d1c2d9859feb1300907a197adb1cfa2807 found no actionable code defects and retained only the coordinator's integration decision.
  • Integration decision: the coordinator exercised current-main combined with this exact identity head and review head ea5e4ecca7cd9f74ba63826ccef24955254b2778 through the real image_generate, background-task, and durable-review suites successfully, and released this independent bug fix for native landing on November 13. The separate review-mode request-key repair belongs to the review slice, not this PR.
  • Limits: this evidence does not claim live external generation, universal real-model parity, or completion of the other creative-workflow slices. No exactly-once claim for simultaneous pre-admission calls, and no new durable deduplication store.

Contributor credit

Thanks to @vincentkoc for reporting the creative workflow and directing the fix.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 13, 2026 08:43
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 4bff34e3-677e-4379-94b8-efe40d2c875b
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: M labels Nov 13, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR matches media retries by prepared request identity and fingerprints image reference bytes so corrected requests can start independently.

Example: While an image request is running, overwrite reference.png and repeat “Keep this character, change the background.”

  • Before: The call returns the earlier task’s status and ignores the corrected reference.
  • After: The changed reference bytes start a separate task, while an exact retry reuses it.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The repair is focused and current-head CI passes, but required shipped-entry-point acceptance evidence remains absent.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: An image revision can silently reuse an earlier task despite corrected reference bytes, model, or generation options.
Reason: The maintainer-authored direction repairs a concrete failure while leaving the broader linked workflow staged separately.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this collaborator-authored PR repairs a source-confirmed duplicate-detection bug still present on main; no actionable code defects were found.

Priority: P2
Reviewed head: b5d746d1c2d9859feb1300907a197adb1cfa2807
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Has the coordinated creative-workflow integration reached the point where this slice may merge?
  • Recommendation: Retain the integration hold: Keep this slice open until the coordinator confirms the planned integration is ready.
  • Why: The PR explicitly pauses merging until that integration decision, and no recorded discussion clears the hold.

Before merge

  • Await maintainer action - The coordinating maintainer must clear the integration hold recorded in this PR.

Findings

None.

Tests

  • Missing end-to-end proof: Provide redacted Gateway or channel evidence with a real agent/model showing a corrected same-prompt image request starts separate work and an exact retry reuses it.
Agent review details

How this fits together

Agent media tools prepare generation inputs, consult session-scoped operations for duplicates, and submit distinct requests to providers before saving and delivering generated assets.

flowchart TD
  A[Agent tool request] --> B[Prepare model and options]
  B --> C[Load and fingerprint references]
  C --> D[Match request identity]
  D --> E[Existing task receipt]
  D --> F[Provider generation]
  F --> G[Save and deliver media]
Loading

Technical review

Best possible solution:

Keep the existing media operation as the sole duplicate owner, using prepared request identity and the actual loaded image bytes.

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

Current-main source establishes the failing path: repeat a prompt with a changed reference, model, or option while its earlier task is active, and the prompt-only lookup returns the earlier task.

Is this the best way to solve the issue?

The patch addresses both causes at existing owners, loads reference bytes once, preserves exact-retry suppression, and introduces no parallel store or unnecessary production layer.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a7d05c7af04a.

Provenance checked

  • Active and recent duplicate matching changes intended behavior with a stated reason (37a9f58: Prevent repeated paid generation and duplicate completion delivery using stable request identity; later operation-owner consolidation retained that intent.)
  • Shared prompt-only preflight changes intended behavior with a stated reason (4675c2b: Consolidate model selection and duplicate preflight without changing behavior; this PR explains why early prompt-only matching suppresses corrected inputs.)
  • Printable reference metadata changes intended behavior with a stated reason (dc6e5cd: Share existing reference-detail projection; the patch explicitly excludes inline payloads while retaining bounded observed-input facts.)
  • Provider resource lifetime keeps the original intent (b07d30a: Retain provider resources through preparation and accepted background work; the revised preparation continues through that owner.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 7b258b6 adds src/agents/media-generation-task-status-shared.ts:406 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7b258b630fda; files: src/agents/media-generation-task-status-shared.ts)
  • Vincent Koc: Raw commit ab73fb9 adds src/agents/tools/image-generate-tool.ts:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ab73fb972e5f; files: src/agents/tools/image-generate-tool.ts)
  • RoboClaw: Raw commit c43e20b adds src/agents/tools/image-generate-tool.ts:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c43e20b17d56; files: src/agents/tools/image-generate-tool.ts)
  • Jason (Json): Raw commit 37a9f58 adds src/agents/media-generation-task-status-shared.ts:342 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 37a9f58d1b10; files: src/agents/media-generation-task-status-shared.ts)

PR surface

Source +4, Tests +53, Docs +6. Total +63 across 11 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 6 62 58 +4
Tests 4 105 52 +53
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 173 110 +63

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test growth Production +62/-58; tests/support +105/-52 Small production growth replaces competing duplicate checks; regression coverage distinguishes corrected inputs from exact retries.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Corrected image requests can be silently suppressed, but the demonstrated impact is limited to media revision workflows.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Supply the real-agent acceptance evidence described in the proof assessment.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 13, 2026, 4:00 AM ET / 09:00 UTC.

@clawsweeper

clawsweeper Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: applying reviewed decision.

I am applying the reviewed decision for this pull request: fix: honor corrected image references and generation options This is item 1/1 in the current shard. Shard 1/1.

This transient lease prevents a newer review from overlapping label, comment, or close mutations.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@roboclaw-bot
roboclaw-bot merged commit c4f355b into main Nov 13, 2026
152 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/creative-request-identity-20261113 branch November 13, 2026 11:03
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…w#198196)

* fix: honor corrected image references and generation options

Co-authored-by: vincentkoc <[email protected]>

* fix: honor corrected image references and generation options

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 4bff34e3-677e-4379-94b8-efe40d2c875b

---------

Co-authored-by: vincentkoc <[email protected]>
github-actions Bot pushed a commit to clawhaven/openclaw that referenced this pull request Nov 23, 2026
Backport from c4f355b (openclaw#198196).

Release adaptation: retain release geometryDetails and existing recent-task cache; exclude documentation and later media review/project features. Shared preflight removal covers image/music/video; retain live owner checks and receipt redaction. Later e097f60, 5d35af1, 12c6c5a are refactors/tests; e6265d6 is independent cron completion repair; 2471ddc, 43b4aae, 6057a3b are unrelated features.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 8a412cf76550600226cc321d78d5c1ef766a9253)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant