Base red: acpmux panic ratchet again (indexing_slicing 703 > 693, string_slice 97 > 94): rewrite the new hits without panics
Base-red fix: the Rust panic ratchet for acpmux went red on feat-cmux-next again after #28134 (15d370bd) fixed it: indexing_slicing 703 > 693, string_slice 97 > 94 (measured at 3c643f9b9). This PR rewrites every hit added since #28134's head, so none of them can panic and each behaves the same, and lowers the acpmux baseline to the measured counts.
The new hits, by the merge that added them (blame)
| merge | file | hits | now |
|---|---|---|---|
| cbe8e602d042 (#27686) | hub/inbox.rs, cli/output.rs | 9 idx, 1 string | writes (fromSession, report, answer, error, pr, topic) via JsonSet::set; first_pr reads the number after the marker with str::get; inbox_unsend matches on (index, noticed, notice is none), with the same three outcomes in the same order |
| 9049c4485b15 (#28180) | server/outbox.rs | 3 | the delivery status writes go through set |
| 911f25fe8b41 (#28012) | cli/select.rs | 2 idx, 2 string | field() cuts the dotted path with str::get; glob() uses slice get (every index was already in bounds) |
| fe3152a7c46f (#27791) | hub/mod.rs | 1 | local_match_counts bumps its slot with get_mut |
| 46ed4283b990 (#27970) | hub/queue.rs | 1 | the transfer id is read with get |
| 4543835b0ae7 (#28161) | hub/session_pages.rs, server/list_reply.rs | 5 idx | page keys are read with get; the reply's sessions, updatedAt reads use get and nextCursor is written with set |
| 364c30d4c723 (#28369) | cli/ls_table.rs | 1 idx | hidden() reads the row's tags with get (a missing key or non-object row still gives no tags) |
The list comes from a clippy hit diff: this PR's head against #28134's head 339e742 (whose acpmux count was 688 / 94), in fast-checks run 41078248955. After this PR, no acpmux hit is new relative to 339e742 (at fdb6218, run 41080915558: indexing_slicing 717 vs 719 and string_slice 95 vs 95, counting by hit).
Baseline
#28169 (66c3d03e88eb) raised the acpmux row to indexing_slicing 731, string_slice 97 and turned the ratchet on for PRs. With every hit above fixed, this PR lowers the row to what clippy measures (the ratchet's --update-baseline path): indexing_slicing 731 -> 686, string_slice 97 -> 94, unwrap_used 144 -> 143. Any new hit is then red on its own PR.
Tests
cli::selecttests: a dotted path through multibyte keys, a trailing dot, and globs (?,*, a trailing*, a partial match) over a multibyte name.hub::inboxtests: a PR marker after CJK text,pull/Nafter CJK text, and a bare#at the end of a line.
Observed / Not run
- At fdb6218 (run 41080915558), gated:
cargo clippy --locked --keep-going -p acpmux --all-targets -- -D warningspasses.- acpmux ratchet counts are
indexing_slicing 686,string_slice 94,unwrap_used 143. cargo test -p acpmux --lib: 2264 passed, 0 failed.
- At 5d2a42a (base merged, with #28369, plus its one fix), run 41088141665: the workspace clippy and the ratchet pass; acpmux counts
indexing_slicing 686,string_slice 94,unwrap_used 143, equal to the lowered row;cargo clippy --locked --keep-going -p acpmux --all-targets -- -D warningspasses. The same run with open #28388 (15e6ab3f) applied measures 685 / 94 / 143, so it stays under too. - Reviews (Sol, gpt-6.1-sol high fast): SHIP at b6f4d19, SHIP at fdb6218, SHIP at 8cbb379 (the baseline commit), and a delta review of the #28369 fix: SHIP at 5d2a42a0937e151594cf1651fa5a9daa162a335b.
- Not run: macOS builds (no Swift change).
Changelog
none
risk:low (panic-free rewrites with the same output, plus tests, and a lowered baseline).
Agent session: agent session
š¤ Generated with Claude Code