base red: panic ratchet, cmux-chat-index's codex thread read takes each unread key from the map walk (#28771)

LA
5d ago
+5-3

Summary

Base red on feat: the Rust panic ratchet. cmux-chat-index: clippy::indexing_slicing 33 > baseline 32 (tip watcher job 75bd4699b695f622e0e6d33b at a0f67023e394; the same row in the clippy job of #29851).

The new hit is from #28771 (6ab6b14d03c): keys[*id] in cmux-tui/crates/cmux-chat-index/src/adapters/codex/threads.rs. The unread list now holds each id with its key from the one walk over keys, so the insert needs no lookup and nothing can panic. The chunked read binds the same ids as before. No behavior change.

This fixes only the cmux-chat-index row. The other rows of the tip red have their own PRs: acpmux (#29852, from #29824) and cmux-tui (#29799, from #29582).

Testing

runrefresult
red: panic ratchetfeat a0f67023e394job 75bd4699b695f622e0e6d33b: cmux-chat-index 33 > 32
panic ratchetheadjob 24753d3f1f3edafda9295ec5 (hq run 41258157995): no cmux-chat-index row. Still red on the other tip rows only: acpmux indexing_slicing 687 > 686 (#29852), cmux-tui indexing_slicing 832 > 831 and string_slice 83 > 82 (#29799)
cmux-chat-index codex testsheadmatches_a_fresh_read d0a93a71 (2 pass), a_thread_update_reads_that_thread 9e302334 (1 pass), a_same_length_rewrite_shows 561839e4 (1 pass); each log compiles cmux-chat-index. (974d75b6 matched no test name: not counted)
clippy -D warningsheadjob fbda80d3f7982fbd9dad1919: pass

Observed / Not run

Observed: the red job above. Observed: the head jobs above. Not run: the full workspace suite.

Changelog

none

Proof

No capture: a lint-only code change with no UI.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the clippy indexing_slicing warning in cmux-chat-index's codex thread read so the cmux-chat-index row stays within the panic ratchet baseline.

The unread list now carries each id with its key from the existing walk over keys, so the insert needs no lookup that can panic. The chunked read binds the same ids as before; no behavior change.