Skip to content

cmux-chats-mirror: reasons on its four cast allows (the panic ratchet base red) - #28739

Closed
teamleaderleo wants to merge 1 commit into
feat-cmux-nextfrom
drain-acpmux/fix-chats-mirror-allow-reasons
Closed

teamleaderleo wants to merge 1 commit into
feat-cmux-nextfrom
drain-acpmux/fix-chats-mirror-allow-reasons

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

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 e214332:

  • cargo fmt -p cmux-chats-mirror --check passes.
  • cargo clippy -p cmux-chats-mirror --all-targets -D warnings is clean.
  • The panic ratchet on cmux-chats-mirror passes.
  • Locally, allow_without_reason over the whole repo returns no hits.

Risk: low, attributes only.

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

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.

Written for commit e214332. Summary will update on new commits.

View guided diff Turn on auto-fix

…chet requires

The panic ratchet's allow scan (scripts/cmux-next/rust_panic_ratchet.py) walks every
production source in cmux-tui, whatever packages a run selects, so these four reason-less
allows turn "clippy (changed cmux-tui packages)" red on feat-cmux-next and on every PR that
runs it. Each now says why the cast is fine. No code change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-710a4a518c009a6ad126
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol high fast, review-router; started by the backlog lander): SHIP at e214332

SHIP

No findings. The change only adds reason text to existing lint allowances; runtime behavior is unchanged.

@blacksmith-sh

blacksmith-sh Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Found 6 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp_mwbf0gz/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmprrdg9i_j/summary-missing.json (live):/summary-missing.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs

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

@github-actions

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review e214332: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr28739 -f ref=drain-acpmux/fix-chats-mirror-allow-reasons -f platform=macos -f backend_mode=local

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
lawrencecchen referenced this pull request Oct 31, 2026
The macOS app mirrors acpmux's chat index (_acpmux/chats_watch) in Swift
(AcpmuxChatsStore + ChatsFeed). These tests pin the behavior the Rust
mirror must keep: acpmux's order, child chats folded, lenient decode, the
seq/lag bookkeeping (no Swift test covered it), activity that keeps a
chat's place, the project list, and the C ABI. The line parser is a stub
here, so the tests fail; the next commit implements it.
@lawrencecchen

Copy link
Copy Markdown
Contributor

#28808 cherry-picks this commit (e214332) together with the cmux-tui-core fixes. The ratchet is red on both causes, so neither fix makes the job green alone. When #28808 lands, this PR is no longer necessary.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Closing: base removed the crate in f7e5bb6 ("Drop cmux-chats-mirror"), so the four allows without a reason that this PR fixed are gone from feat-cmux-next and there's nothing left to fix.

@teamleaderleo
teamleaderleo deleted the drain-acpmux/fix-chats-mirror-allow-reasons branch October 31, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants