Base red: acpmux panic ratchet again (indexing_slicing 703 > 693, string_slice 97 > 94): rewrite the new hits without panics

Merged
TE
7d ago
+64-30

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)

mergefilehitsnow
cbe8e602d042 (#27686)hub/inbox.rs, cli/output.rs9 idx, 1 stringwrites (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.rs3the delivery status writes go through set
911f25fe8b41 (#28012)cli/select.rs2 idx, 2 stringfield() cuts the dotted path with str::get; glob() uses slice get (every index was already in bounds)
fe3152a7c46f (#27791)hub/mod.rs1local_match_counts bumps its slot with get_mut
46ed4283b990 (#27970)hub/queue.rs1the transfer id is read with get
4543835b0ae7 (#28161)hub/session_pages.rs, server/list_reply.rs5 idxpage keys are read with get; the reply's sessions, updatedAt reads use get and nextCursor is written with set
364c30d4c723 (#28369)cli/ls_table.rs1 idxhidden() 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::select tests: a dotted path through multibyte keys, a trailing dot, and globs (?, *, a trailing *, a partial match) over a multibyte name.
  • hub::inbox tests: a PR marker after CJK text, pull/N after 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 warnings passes.
    • 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 warnings passes. 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