Files
codex/codex-rs
Charlie Marsh 57d4fac64a Avoid redundant clones when sending app-server notifications (#55723)
## Why

Targeted notification delivery and broadcast routing clone the message for every recipient, then discard the original.

## What changed

Use `std::iter::repeat_n` to move the original message to the last recipient, avoiding one clone per nonempty recipient list while preserving delivery behavior.

## Testing

Expand notification tests to cover empty, single, and multiple recipient lists, checking payloads, target order, and shared timestamps. Add broadcast coverage for zero, one, and two eligible recipients, verifying that uninitialized clients, clients without the required experimental API support, and clients that opted out are skipped.

GitOrigin-RevId: 2ba192f416ccd786e3566da3e5c851518b509afe
2026-10-21 01:49:26 +00:00
..
…
…