Repository navigation
fix(next): retain ordered prompt attachments through send and retry - #25717
Conversation
The direct-client test passes wire order on base but fails because optimistic rows lose ordered parts before a delayed echo. Run: bun test src/agent-session/acpmux/inlinePrompt.test.ts (0 pass, 1 expected fail). Adapted the fake socket pattern from #24724. Co-authored-by: Leo Li <cheerleaderleo@outlook.com> Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a17a3b-9f65-7381-9df9-87378eed9d49&host=gcp-agent-lane-1
Adapt #24724 ordered prompt metadata to ID-bound attachment tokens. Keep each image occurrence distinct, retain video previews by file URI, and model validated companion block relations without hiding wire attachments. Co-authored-by: Leo Li <cheerleaderleo@outlook.com> Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a17a3b-9f65-7381-9df9-87378eed9d49&host=gcp-agent-lane-1
cargo test -p acpmux --lib inline_parts_validate_companion_relation --locked -j 4 selects one test and fails on missing blockIndex. Repeated identical image bytes must retain separate companion block identities; invalid cross-kind and out-of-bounds relations must not persist. Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a17a3b-9f65-7381-9df9-87378eed9d49&host=gcp-agent-lane-1
Carry ordered metadata through optimistic rows, acceptance before reply, durable echo, queue edits, Retry and take-back. Keep every repeated image occurrence, original local bytes and video previews for refused-send recovery. Authoritative queue edits cannot resurrect the original draft. Validate an image original-file companion only when its resource link immediately follows that prompt image, then persist its block identity without removing the harness file block. All authoritative inlineParts surface to the view setting; strip sends keep their wire formatting. Verification: bun run check:fix; 45 focused web tests and 147 assertions pass. cargo test -p acpmux --lib hub::prompt_images::tests --locked -j 4 passes 8 tests. Red behavioral tests were committed before the transport and daemon fixes. Co-authored-by: Leo Li <cheerleaderleo@outlook.com> Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a17a3b-9f65-7381-9df9-87378eed9d49&host=gcp-agent-lane-1
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Probably yours: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by web and size checks: green Gallery before/after for
States
Pick other states with a |
|
Bead |
|
Found 124 test failures on Blacksmith runners: Failures
...and 114 more test failures. View all on Blacksmith
|
|
|
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo, 2026-10-26: “Attachments sitting inline in the composer text where you dropped them, instead of as a row of chips. — this one, like the imessage mac app. we're already doing the claude/codex ways rn”
Retain the original input, attachment IDs, local bytes, image originalPath companions and video metadata through optimistic send, echo, queue, Retry, Edit and take-back. Failed Retry/Edit keeps every one of eight screenshots and its preview source. After a strip-mode send echoes, Retry/Edit now prefers the page's retained attachments instead of rebuilding incomplete attachments from display metadata. Strip remains the default with its existing wire format.
Ordered metadata keeps repeated identical attachments distinct. The daemon validates a narrow companion relation against the adjacent image block and copies that relation into durable inline parts; the original file block still goes to the harness. This PR does not add upload-reference transport or change slow-ACK policy. Durable queue-edit display metadata and visible-bubble rendering are separate follow-ups.
Validation at
0bad66de1392434b40c66d0567c876981d0b76cf(796 changed lines):bb600d699cd7; durable companion regression:90f6ecfb1bca; new strip-echo retention regression:de3b90427c3efailed before the repair.bun run check:fix: no formatting, lint or type errors across 2,802 files. Broaderscripts/web-lint.shreports only the inherited keybindings/styles.css layer violation; that file is unchanged against base4e28d9cf44d9ec587ad96d223ced6e5bc2c7f5b0.Agent session: gcp-agent-lane-1