acpmux: a put-back agent message keeps its pasted ranges
Follow-up to #23407, stacked on its branch. Once #23407 merges and its branch is deleted, GitHub retargets this PR to feat-cmux-next.
When a turn of agent messages fails, requeue_joined (hub/digest.rs) puts the messages that joined it back in the queue. It writes each one as a new queued record (requeued: true) and names its images, but it didn't name its pasted ranges, so a put-back message lost its "Pasted text" chip. It now calls mark_pasted before the provenance is marked, the same way the first queued record does.
The PR also adds a test that a steer's user_message records pasted. That already worked with #23407, because steers go through append_prompt; until now no test covered it.
Changelog
none
Red and green
Command: cmux-ci run --class isolated --script scripts/ci/cmux-tui-rust-check.sh --arg test --arg pasted_ranges --ref <sha>
- Test commit 8dcb6ed27dd3a7adca098e226a1d52278dca57e5 (step 5ce368c4c9d8360ed19c7329): red.
agent_digest::a_message_a_failed_turn_put_back_keeps_its_pasted_rangesfails withpasted= Null on the requeued record.prompt_provenance::a_steer_records_its_pasted_rangespasses, as expected (see above). - Fix commit 526025bccfd14ff96e7b1dd812aa2f386b959603 (step 554bf3d1e758dd167226abaf): green. 2 tests run, 2 passed.
Observed / Not run
- Observed: the fleet red and green runs above;
python3 scripts/cmux-next/prepush-gate.py(no new violations);rustfmt --checkon the changed files. - Not run: the full cmux-tui suite and clippy. CI covers these.
Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
When a turn of agent messages fails, requeue_joined writes each joined message back as a new queued record with requeued: true. These records named their images but not their pasted ranges, so a put-back message lost its "Pasted text" chip. The record now calls mark_pasted before provenance is marked, matching the first queued record.
Also adds a test that a steer's user_message records its pasted ranges; that worked with #23407 but wasn't covered.