acpmux: placement tier without indexing (fixes #29824's panic-ratchet red)

TE
5d ago
+7-10

Fix-forward for #29824 (which landed the Freestyle-first placement tier). Its tier() indexed the placement_preference list (order[..i], order[at]), two new acpmux indexing_slicing hits, so the cmux-tui spec inventory's Rust panic ratchet went red on it.

Same behaviour, written with iterators (take(i), enumerate().find), and the 1-based tier index uses saturating_add instead of + 1. No other change; the placement tests (#29824's three new ones included) cover it.

Original ask, Leo, 2026-10-31: "WHY GCP IF WE HAVE FREESTYLE???"

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Rewrites the acpmux placement tier lookup to avoid indexing the placement_preference list, clearing the panic ratchet's indexing/slicing hits that #29824 introduced.

The logic is unchanged: tier selection uses iterators (take, enumerate().find) instead of list indexing, and the reported 1-based tier index uses saturating_add instead of + 1. No behavior change; the placement tests, including #29824's three new ones, cover it.