acpmux: a put-back agent message keeps its pasted ranges

Merged
TE
16d ago
+221-7

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>

Observed / Not run

  • Observed: the fleet red and green runs above; python3 scripts/cmux-next/prepush-gate.py (no new violations); rustfmt --check on the changed files.
  • Not run: the full cmux-tui suite and clippy. CI covers these.

Agent session: cosmic-gray

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
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.