fix(agents): preserve mixed image attachment order#99902
Conversation
|
Land-ready verification:
Known proof gaps: none for this two-file contract repair. |
|
Codex review: needs maintainer review before merge. Reviewed July 4, 2026, 5:25 AM ET / 09:25 UTC. Summary PR surface: Source +20, Tests +53. Total +73 across 2 files. Reproducibility: yes. Source inspection shows current main drops all-offloaded order slots when no inline payloads exist and truncates mixed offloaded slots by indexing order entries only against inline images. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the focused producer-side repair through normal maintainer landing for the exact PR head, keeping the shared prompt-image merger contract unchanged. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main drops all-offloaded order slots when no inline payloads exist and truncates mixed offloaded slots by indexing order entries only against inline images. Is this the best way to solve the issue? Yes. Preserving the full AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f27d494d00e7. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +20, Tests +53. Total +73 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
bebd5f5 to
e8e1013
Compare
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users sending a mix of inline and offloaded image attachments could have the attachment order truncated before the model run.
Why This Change Was Made
The reply image resolver now preserves every inline/offloaded order slot while associating concrete payloads only with inline slots. This restores the producer contract expected by the shared prompt-image merger.
User Impact
Mixed image attachments keep their original order instead of losing offloaded slots when only inline images have in-memory payloads.
Evidence
node scripts/run-vitest.mjs src/auto-reply/reply/current-turn-images.test.tspassed 6 tests.oxfmtandoxlintpassed.mainatbe95bb72d459,check:changedpassed on Blacksmith Testboxtbx_01kwp69wbwd2pc7y8cfv7w0pek(exit 0).