Repository navigation
Base red: cmux-tui panic ratchet indexing_slicing (834 -> 861 > 833): rewrite the new hits without panics - #28315
Conversation
…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
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
web and size checks: green |
…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
|
Found 5 test failures on Blacksmith runners: Failures
|
…_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
…b852f7f, run 41064924404) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d9e7e9f7fb2b87a57d5f
Bugbot needs on-demand usage enabledBugbot 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. |
|
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
Bugbot needs on-demand usage enabledBugbot 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
|
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. |
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Base-red fix: the Rust panic ratchet step of
cmux-tui.ymlis red for crate cmux-tui on feat-cmux-next:cmux-tui: clippy::indexing_slicing 834 > baseline 833at 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
cmux team invitealias)cli/app.rsrest.get(1..).unwrap_or_default()(the arm matches only whenrest[0]isinvite)cli/mcp/code_mode.rs,cli/mcp/placement.rs,cli/mcp/v2_tools.rsget/pointerreads;JsonSet::set/set_pathwrites;block_endwalks the bytes withgetcli/mcp/upstream.rsinit.get("instructions")cli/mcp.rs,cli/mcp/v2_tools.rsget/pointerreads,JsonSet::setfor the anchored wait patternA missing value read through
get/pointercompares the same as theNullthat indexing returned.block_endstops at the end of input exactly as the oldi < lenchecks 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_argumentscli::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_hintsObserved / Not run
cargo test -p cmux-tui --lib -- cli::app::tests cli::mcpgave 216 passed and 0 failed. The workspace panic ratchet printed nocmux-tui:line. The only RED lines are acpmux's (indexing_slicing 716 > 693,string_slice 98 > 94), which Base red: acpmux panic ratchet (string_slice 98 > 94, indexing_slicing 703 > 693): rewrite the new hits without panics #28134 fixes.cli.rsresource-API-boundary red from cmux mcp: terminals by tab or pane, waits on output, named missing fields, 'runs in cmux' (tool-evals round 3) #28248 / fix(cli): describe every cmux cloud verb in its help #28252 is a base red owned elsewhere. This PR doesn't touch it.cargo clippy --locked --keep-going -p cmux-tui --all-targets -- -D warningswas clean, the 216cli::app::testsandcli::mcptests passed, and the panic ratchet printed no RED lines.Changelog
none
risk:low (panic-free rewrites with the same output, tests, and a lower baseline).
Agent session: agent session
🤖 Generated with Claude Code