Skip to content

Base red: cmux-tui panic ratchet indexing_slicing (834 -> 861 > 833): rewrite the new hits without panics - #28315

Merged
teamleaderleo merged 7 commits into
feat-cmux-nextfrom
lane/cmux-tui-indexing-ratchet
Oct 30, 2026
Merged

teamleaderleo merged 7 commits into
feat-cmux-nextfrom
lane/cmux-tui-indexing-ratchet

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Base-red fix: the Rust panic ratchet step of cmux-tui.yml is red for crate cmux-tui on feat-cmux-next: cmux-tui: clippy::indexing_slicing 834 > baseline 833 at 7f97b84 (fast-checks run 41050016507), growing to 854 and then 861 as more landed. This PR rewrites each hit added since the baseline was measured (ccd5f60) so it can't panic and behaves the same, then lowers the baseline to the measured count.

Where the hits came from (blame), and what replaced them

commit file hits now
7a2d52d (cmux team invite alias) cli/app.rs 1 rest.get(1..).unwrap_or_default() (the arm matches only when rest[0] is invite)
3c7024f (#28085) cli/mcp/code_mode.rs, cli/mcp/placement.rs, cli/mcp/v2_tools.rs 19 get / pointer reads; JsonSet::set / set_path writes; block_end walks the bytes with get
7f97b84 (#27976) cli/mcp/upstream.rs 1 init.get("instructions")
8f5dfe0 (#28248) cli/mcp.rs, cli/mcp/v2_tools.rs 8 get / pointer reads, JsonSet::set for the anchored wait pattern

A missing value read through get / pointer compares the same as the Null that indexing returned. block_end stops at the end of input exactly as the old i < len checks did, including an escape or comment cut off at the end.

Baseline

cmux-tui measured at the merged head ed262bc (fast-checks run 41078934160): indexing_slicing 831, with no new hits since the merge-base. While this PR was open, #28169 raised the baseline to 861, so this PR lowers it 861 -> 831. Its other lints are unchanged.

Tests

  • cli::app::tests::a_bare_team_invite_runs_the_home_action_with_no_arguments
  • cli::mcp::code_mode::block_end_tests::block_end_skips_quoted_and_commented_braces_and_stops_at_the_end (strings, template literals and comments, plus input cut off at the end)
  • cli::mcp::code_mode::block_end_tests::compact_keeps_required_and_hints

Observed / Not run

Changelog

none

risk:low (panic-free rewrites with the same output, tests, and a lower baseline).

Agent session: agent session

🤖 Generated with Claude Code

…indexing_slicing hit from 7a2d52d)

`&rest[1..]` became `rest.get(1..).unwrap_or_default()`. The arm only matches
when rest[0] is "invite", so the range always exists and nothing changes. A
test covers a bare `cmux team invite`.

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

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 316caf9: 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=pr28315 -f ref=lane/cmux-tui-indexing-ratchet -f platform=macos -f backend_mode=local

web and size checks: green

teamleaderleo and others added 2 commits October 30, 2026 12:13
…icing hits from #28085, #27976)

The cmux-tui crate is at 854 > 833 on feat-cmux-next. These are the hits on
lines added since 97133a4, other than `cmux team invite`:
- 3c7024f (#28085): cli/mcp.rs (isError, structuredContent),
  code_mode.rs (nearest_names, compact's required list and hints, and
  block_end's byte scan), placement.rs (the error message and the
  neighbour's pane id), v2_tools.rs (resource_id and decimal field kinds,
  needs_terminal).
- 7f97b84 (#27976): upstream.rs reads the server's instructions.
Reads go through get / pointer (a missing value compares the same as the Null
that indexing returned), writes through JsonSet. block_end walks the bytes
with get, so a string, escape or comment cut off at the end stops the walk
the same way. Tests cover block_end and compact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-d9e7e9f7fb2b87a57d5f
…ui-indexing-ratchet

# Conflicts:
#	cmux-tui/crates/cmux-tui/src/cli/mcp.rs
@blacksmith-sh

blacksmith-sh Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Found 5 test failures on Blacksmith runners:

Failures

Test View Logs
main.DeveloperIdAppTests.test_download_prints_the_active_profile_only/
test_download_prints_the_active_profile_only
View Logs
stubs: /System/Library/Frameworks/Security.framework/Versions/A/Security has no stub/
Security has no stub
View Logs
stubs: CoreFoundation.tbd: install-name /System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation, missing 1: ['_CFRetain']/
CoreFoundation, missing 1: ['_CFRetain']
View Logs
stubs: CoreFoundation.tbd: install-name /System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation, missing 1: ['_log2']/
CoreFoundation, missing 1: ['_log2']
View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

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

…_slicing hits from #28248)

8f5dfe0 (#28248) added these in cli/mcp.rs (isError, the tab_list items,
structuredContent, the typed text, the anchored wait pattern) and in
v2_tools.rs (a required field's enum). Reads go through get / pointer, so a
missing value compares the same as the Null that indexing returned. The
pattern write goes through JsonSet::set.

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

cursor Bot commented Oct 30, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo teamleaderleo changed the title Base red: cmux-tui panic ratchet indexing_slicing 834 > 833 (cmux team invite without slicing) Base red: cmux-tui panic ratchet indexing_slicing (834 -> 861 > 833): rewrite the new hits without panics Oct 30, 2026
@teamleaderleo

teamleaderleo commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Review (the owner lane's independent review, at its land request): SHIP at 8f805d9

Recorded by lane-gh-broker from this PR's owner lane, which asked to land this exact head after its independent review. next-autoland lands it once every red is the base's; a BLOCK at this head, a HOLD line or a hold label still stops it.

…ui-indexing-ratchet

# Conflicts:
#	scripts/cmux-next/rust-panic-baseline.json
@cursor

cursor Bot commented Oct 30, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

…ed262bc, run 41078934160)

#28169 raised the baseline to 861. This PR removes 30 of those hits, so
the measured count is 831.

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

teamleaderleo commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Review (the owner lane's independent review, at its land request): SHIP at 316caf9

Recorded by lane-gh-broker from this PR's owner lane, which asked to land this exact head after its independent review. next-autoland lands it once every red is the base's; a BLOCK at this head, a HOLD line or a hold label still stops it.

@teamleaderleo
teamleaderleo merged commit 309f1af into feat-cmux-next Oct 30, 2026
158 of 162 checks passed
@teamleaderleo
teamleaderleo deleted the lane/cmux-tui-indexing-ratchet branch October 30, 2026 15:56
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

3 inactive (2 outdated) deployments
ci-routing-agent — 316caf92 Deployed Oct 30, 2026 by teamleaderleo via wait for same-key tree publisher #83952
artifacts — ed262bcd Deployed Oct 30, 2026 by teamleaderleo via add the Windows daemon to the tree #83825
sentry-dsyms — ed262bcd Deployed Oct 30, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #83825
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.

1 participant