cmux-chats-mirror: reasons on its four cast allows (the panic ratchet base red)
Fixes a base red on feat-cmux-next: "cmux-tui spec inventory / clippy (changed cmux-tui packages)" fails at "Rust panic ratchet on changed cmux-tui packages" (base push run 41155138419) with:
rust-panic-ratchet: RED
cmux-tui/crates/cmux-chats-mirror/src/index.rs:143: allow(cast_possible_truncation) needs reason = "..."
cmux-tui/crates/cmux-chats-mirror/src/feed.rs:54: allow(cast_possible_truncation) needs reason = "..."
cmux-tui/crates/cmux-chats-mirror/src/feed.rs:66: allow(cast_possible_truncation) needs reason = "..."
cmux-tui/crates/cmux-chats-mirror/src/chat.rs:78: allow(cast_possible_truncation) needs reason = "..."
The ratchet's allow scan (allow_without_reason in scripts/cmux-next/rust_panic_ratchet.py) walks every production source under cmux-tui/crates and cmux-tui/bindings, whatever packages the run selected. So these four reason-less allows from cmux-chats-mirror turn the step red on base and on every PR that changes any cmux-tui package (#26849 among them).
Change
Each of the four #[allow(clippy::cast_possible_truncation)] now has a reason = "..." saying why the cast is fine. In Rust, a float-to-int as saturates and maps NaN to 0. The inputs are a millisecond timestamp, a non-negative whole number, a JSON-RPC request id, and a message count that NSNumber.intValue would truncate the same way. This changes attributes only, with no behaviour change. The baseline is untouched.
Checks
Fleet run 41156916747 at e214332f:
cargo fmt -p cmux-chats-mirror --checkpasses.cargo clippy -p cmux-chats-mirror --all-targets -D warningsis clean.- The panic ratchet on cmux-chats-mirror passes.
- Locally,
allow_without_reasonover the whole repo returns no hits.
Risk: low, attributes only.
Agent session: agent session
🤖 Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the broken base on feat-cmux-next by adding reasons to the four #[allow(clippy::cast_possible_truncation)] attributes in cmux-chats-mirror that the panic ratchet requires. Attributes only, with no behavior change.
Bug Fixes
- The ratchet's allow scan walks every cmux-tui source regardless of which packages a run selects, so these four reason-less allows also red every PR touching cmux-tui.