Repository navigation
fix: honor corrected image references and generation options - #198196
Conversation
Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 4bff34e3-677e-4379-94b8-efe40d2c875b
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesThis 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.”
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial 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 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherAgent 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +4, Tests +53, Docs +6. Total +63 across 11 files. Added test files: 0. View PR surface stats
Preflight sourceSource 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
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 13, 2026, 4:00 AM ET / 09:00 UTC. |
|
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. |
|
Merged via squash.
|
…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]>
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)
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
referenceInputsfacts (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
image_generateexecute entrypoint on base91046f7bbbb8b064491ee2ecbfd782cb12b0124c: four correction cases (different reference, overwritten same-path bytes, model, provider options) all returnedduplicateGuard: trueincorrectly. 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.security-fast; the current-head combined CI/security gate also passed.git diff --checkpassed. 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.gpt-6.1-sol, P0–P2, base91046f7bbbb8b064491ee2ecbfd782cb12b0124cagainst local snapshot SHA-2561afcdcefa5921a9fb6b0771d3554d6cdefc0a30a85b8fa0ee33c7f0518c5c486: scoped-clean, no actionable findings. Local ClawSweeper was unavailable because the existing runner checkout is dirty. The completed hosted review ofb5d746d1c2d9859feb1300907a197adb1cfa2807found no actionable code defects and retained only the coordinator's integration decision.ea5e4ecca7cd9f74ba63826ccef24955254b2778through the realimage_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.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