base red: acpmux panic ratchet, the six indexing hits #28182 added
Merged
TE
7d ago+11+11+01234567890123456789-6-6-0123456789
Base-red fix (fix-forward): #28182 (49c648c843f) merged after #28386 (13134a87) lowered the acpmux row of the Rust panic ratchet to indexing_slicing 686, string_slice 94, unwrap_used 143. Its own ratchet ran against the old baseline (731). It added six indexing_slicing hits in production code, which put feat-cmux-next over the baseline. This PR rewrites them without panics and with the same behaviour. The baseline is not raised.
| file | hit (from #28182) | now |
|---|---|---|
client.rs whole_list | rest["cursor"] = ā¦, reply["nextCursor"] = ⦠| JsonSet::set. Params that are not an object, which used to panic here, are now an error, never a cursorless re-ask for the first page |
hub/list_guard.rs bounded page | picked["sessions"], key["at"] | get with the same defaults (no rows, 0) |
hub/list_guard.rs bounded page | row(&rows[n]) in the byte_page row closure | rows.get(n); an index past the end reads as null, like a key with no span already does (byte_page only asks for indexes below rows.len()) |
hub/list_guard.rs too_large_stub | stub[k] = ⦠| JsonSet::set (the stub is an object literal) |
Tests
The existing tests cover the changed paths, so this PR adds none: hub::list_guard tests check the stub's peer, omitted and bounded pages, and server tests check the paged whole_list and cursor errors.
Observed / Not run
- At bb04f92 (cmux-ci run 41091973428, with
GHOSTTY_ZIG_SOURCE=ghostty-next), gated:- The workspace clippy and the ratchet pass with no RED line. acpmux counts are
indexing_slicing 686,string_slice 94,unwrap_used 143,expect_used 18, all at or under the baseline. cargo clippy --locked --keep-going -p acpmux --all-targets -- -D warningspasses.cargo test -p acpmux --lib -- list_guard session_list client:: session_pages: 24 passed, 0 failed.
- The workspace clippy and the ratchet pass with no RED line. acpmux counts are
- Review (Sol, gpt-6.1-sol high fast): at 26c76d6, BLOCK, because
whole_listsilently dropped a cursor it could not set. Fixed in bb04f92. Then SHIP at bb04f921bcbc8a275a6e88c98c2584b6ac90156d. - Not run: macOS builds (no Swift change).
Changelog
none
risk:low (panic-free rewrites with the same output).
Agent session: agent session
š¤ Generated with Claude Code