Repository navigation
fix(media): retry channel images a turn could not read - #183390
Conversation
|
🦞👀 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: needs maintainer review before merge. What this changesKeep failed channel-image reads retryable on later turns instead of permanently suppressing the attachments. Example: Send a 10.19 MiB PNG with a red top half and blue bottom half, then ask about it again.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current-main image-loss bug while preserving intentional suppression and current-run skips; no actionable defects were found. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherChannel reply preparation records attachment facts and prepares run-specific media; embedded, plugin, CLI, and worker paths consume those facts to assemble model input. flowchart TD
A[Channel attachment] --> B[Reply preparation]
B --> C[Canonical transcript facts]
B --> D[Run-only read skips]
C --> E[Shared image hydration]
D --> E
E --> F[Model input]
C --> G[Later-turn replay]
G --> E
Technical reviewBest possible solution: Preserve canonical attachment facts for replay and apply temporary read skips only through the existing run media carrier. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the durable suppression path, and the report plus inspected live captures demonstrate the two-turn failure; this read-only review ran no target code. Is this the best way to solve the issue? The patch fixes the persistence producer and shares run-to-record reconciliation across affected readers while retaining described-image and staged-copy suppression. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d6685f285a1c. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +42, Tests +154. Total +196 across 12 files. Added test files: 1. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
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 HistoryReviewed October 25, 2026, 8:24 PM ET / October 26, 2026, 00:24 UTC (Revision 3). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Keep transient image read failures on run media, preserve canonical replay facts, and reuse current media test fixtures. Co-authored-by: Masato Hoshino <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
Keep temporary channel-image read failures on the current run rather than persisting permanent hydration suppression. Reconcile run-only skips with recorded attachments through one shared source-and-occurrence matcher for prompt hydration, workers, and image-input detection. Both admission-mode regressions fail on the base; 170 focused tests pass with the fix. Preserve intentional suppression and leave ambiguous historical records unchanged. Exact-head CI passes. Co-authored-by: Masato Hoshino <[email protected]>
Keep temporary channel-image read failures on the current run rather than persisting permanent hydration suppression. Reconcile run-only skips with recorded attachments through one shared source-and-occurrence matcher for prompt hydration, workers, and image-input detection. Both admission-mode regressions fail on the base; 170 focused tests pass with the fix. Preserve intentional suppression and leave ambiguous historical records unchanged. Exact-head CI passes. Co-authored-by: Masato Hoshino <[email protected]> (cherry picked from commit 15a5706) Release adaptation: baseline images.ts lacks applySandboxStagedImagePaths (#179301), so the recorded-fact suppression is applied directly to normalizeMediaFacts and the main-only staged-copy media-refs case is not ported. Baseline attempt-session-prepare still attaches persisted facts as runtime prompt facts, so those now go through applyRunHydrationSuppression with the attempt media to keep this run skipping the unreadable image. The collect-queue case is ported into the baseline enqueue/scheduleFollowupDrain test style.
…ed semantics Bedrock Responses routing cases used the shared discovery cache key, so the default-region case read a cached result. #179471 no longer fails updates on an unavailable channel, #183703 no longer treats missing meta as clobber evidence, #180174 downgrades a missing legacy OAuth dir to a warning, and #180280 leaves untimed 429s without a cooldown; their stale expectations are updated to match main. The #183390 media case is wrapped in the stable harness shape, and the Codex ownership harness now reports the original owner's thread as loaded until it exits, as the app server does.
Adapt 28 audited units to the release-native ownership model. Preserve AgentsAPI/cron policy and actor-owned projection recovery. Source provenance and original contributor credit: #176852 342fea1 — yinx65588-boop <[email protected]> #180853 50f795a — Peter Steinberger <[email protected]> #184041 e356196 — Peter Steinberger <[email protected]> #184069 7739767 — Peter Steinberger <[email protected]> #182666 9ff9d88 — Stefan Stüben <[email protected]> #183884 112667f — Peter Steinberger <[email protected]> #184021 05010ed — Peter Steinberger <[email protected]> #183390 15a5706 — Masato Hoshino <[email protected]> #183282 24d7dd3 — pstarkgit <[email protected]> #164843 127f3c2 — PollyBot13 <[email protected]> #172959 30f88d3 — main object unavailable; stable source inspected #172959 eb2255b — johan-eilertsen <[email protected]> #120943 1a76be1 — Peter Steinberger <[email protected]> #178271 b3c8f8a — Wang Rui <[email protected]> #178271 7bd6895 — RJ <[email protected]> #177518 679980c — Masato Hoshino <[email protected]> #182454 a538efe — Peter Steinberger <[email protected]> #180042 bef193c — sunlit-deng <[email protected]> #179347 2405bf4 — Peter Steinberger <[email protected]> #179060 ccedbdc — Peter Steinberger <[email protected]> #118011 9596527 — Peter Steinberger <[email protected]> #182219 fade14f — Sukhdeep <[email protected]> #181871 b1b5f00 — Peter Steinberger <[email protected]> #178888 5125e3c — RoboClaw <[email protected]> #180075 c9c2d16 — Wang Rui <[email protected]> #181081 f223f77 — Jason O'Neal <[email protected]> #180236 d11c239 — Dallin Romney <[email protected]> #173921 af50fbd — Peter Steinberger <[email protected]> #174868 7034ca4 — Peter Steinberger <[email protected]> #172724 492c932 — Dallin Romney <[email protected]> Proof: targeted owner/sibling tests, supported fresh two-pass review clean. Known qualification gaps recorded in the release backport evidence. Co-authored-by: RomneyDa <[email protected]>
Closes #127968
What Problem This Solves
Fixes: a channel image skipped by the current turn's pre-read stays suppressed for the rest of the conversation, even when the prompt-image loader could read it.
User Impact
Newly recorded attachments remain available on later turns. Readable images can reach the model without a file-tool detour, and an unreadable active-turn image gets the existing resend notice. Historical suppression remains unchanged because old records do not distinguish failed reads from intentional skips.
Why This Change Was Made
Keep the temporary failure on the run's media carrier instead of persisting it as permanent suppression. One helper reconciles that run-only skip with recorded facts for prompt loading, cloud workers, and image-input detection. Pairing by source and occurrence preserves duplicate attachments and collected-turn order. Described images and managed staged copies retain their existing suppression rules.
A URL-less fact restaged for a remote media host can miss reconciliation and retry its read on that turn; a failed read remains visible. No new configuration or transcript schema.
Production +53/-11 (net +42); tests +162/-8 (net +154). The shared reconciliation owner serves three readers; removing it would duplicate matching policy. Shortened comments and reused current test helpers. Thanks to @masatohoshino for the repair and live reproduction.
Evidence