Repository navigation
base red: panic ratchet: cmux-rd-link's 7 and cmux-tui's 5 new index/slice hits - #28958
teamleaderleo wants to merge 6 commits into
Conversation
…slice hits cmux-rd-link (new crate, must be 0) had 7 indexing_slicing hits from its secure-link and replay-window commits (3b9cf69, 6d04ce1, ae8cd21); cmux-tui went 831 -> 835 from 49394d0 (group create), cf3d7a3 (chief acp, pipe) and d13d17a (apps info). Rewritten with get/get_mut, truncate and pushes; the baseline is not raised. Behaviour is the same: the replay slot index is always < WORDS, n never exceeds the buffer the noise call was given, and the empty-slice defaults are the cases the old code would have panicked on. 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)
|
|
Found 3 test failures on Blacksmith runners: Failures
|
|
Review (codex gpt-6-astra high fast, via reach review-router, diff-only prompt): SHIP at 96299c6 Ratchet at this head: RATCHET_RC=0 (cmux-ci run https://github.com/manaflow-ai/cmux/actions/runs/41172450698). |
…ratchet-rd-link-tui
e4ef410 (#28170, peer waits say whether they settled) indexed serde Values in host_peering's settle, Hub::wait_for_peer and with_wait. Reads go through pointer/get with Null as the missing value (the same value Index gave), writes through JsonSet::set. The baseline is not raised. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d9e7e9f7fb2b87a57d5f
…pe has tracing's Value trait) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d9e7e9f7fb2b87a57d5f
…aled datagrams, reliable control) A pure crate (no I/O, injected clock) for Mac Screen on cmux.rd/1 (plans/cmux-next/remote-desktop-mac-host.md section 7): - Noise_XX_25519_ChaChaPoly_BLAKE2s with the hub session id as prologue. The link accepts only the remote session key the caller expects (the device hub vouches for it: each side signs its session key with its device key, checked before the link is built). The initiator checks the responder's key on message 2, before it reveals its own. - Sealed packets carry an explicit 64-bit nonce (stateless transport), so loss, reorder and duplicates on any path are fine; a 2048-nonce sliding window drops replays. - Inside the seal: rd datagrams (best effort), an ordered reliable control channel (window 128, RTO with backoff; hello, start and stats leave the TCP socket so the session works through routers and relays), path probes and replies, and close. - Handshake retries every 250 ms and gives up after 10 s. - Packet tags 0xD0..0xD7 sit outside every RFC 7983 range, so one UDP socket also carries STUN and TURN. Tests (behavior at the crate boundary, two links over an in-memory network): handshake, control and datagrams across 20 % loss with duplication and reordering; a peer the hub did not vouch for is refused; another session's handshake does not complete; tampered and replayed packets open nothing; an unanswered handshake times out. rbx (lane mac-screen-rd): cargo fmt, clippy --locked -D warnings, 5 tests passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review (codex gpt-6-astra high fast, via reach review-router, diff-only prompt): SHIP at 5033a36 Round 2 (SHIP at e9303c1) covered the acpmux rewrites of #28170's 8 hits; round 3 covers the compile fix (serde_json::Value inside tracing::warn!). |
The panic ratchet is also red on two more rows on feat-cmux-next: acpmux indexing_slicing 692 > baseline 686 (from #28170) and cmux-tui 836 > baseline 831. Each hit is rewritten with checked access (pointer/get, JsonSet::set, get(n..).unwrap_or_default()); no behavior change: an empty slice or a null stands where the old code would have panicked. The baseline is not raised. These are Leo's hunks from #28958 (e9303c1, 5033a36, 96299c6), including his compile fix for the Value name inside tracing::warn!. Co-authored-by: Leo Li <cheerleaderleo@outlook.com>
|
Note from the base-red lane: #29024 now fixes all three panic-ratchet rows on feat-cmux-next: cmux-rd-link indexing_slicing 7 > 0, acpmux 692 > 686 (#28170) and cmux-tui 836 > 831. It uses your hunks from this PR (credited with Co-authored-by), including your You can close this PR or keep it. Whichever PR merges first, the other one becomes a no-op. If this one merges first, #29024 will be closed with a comment. |
…::* (unused-imports) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d9e7e9f7fb2b87a57d5f
|
Review (codex gpt-6-astra high fast, via reach review-router, delta-only per acpmux-owner): SHIP at dc34d45 Delta over r3 (SHIP at 5033a36): removes the unused |
…w index/slice hits (#29024) * base red: panic ratchet: cmux-rd-link's 7 index/slice hits The Rust panic ratchet is red on feat-cmux-next since the cmux-rd-link crate landed by direct push (3b9cf69, 6d04ce1, ae8cd21): a new crate has a baseline of 0, and it had 7 clippy::indexing_slicing hits. - lib.rs write_handshake: truncate the buffer to the length Noise wrote instead of slicing it. - lib.rs seal: build the packet with push/extend/resize and hand Noise the body through get_mut, not three index writes. - replay.rs: the window word is read and written through get/get_mut; slot() always gives a word < WORDS, so the miss branch never runs. No behavior change. The baseline is not raised and no allow is added. These are the same hunks as #28958 (cmux-rd-link part), so that PR merges over this one with no conflict. Co-authored-by: Leo Li <cheerleaderleo@outlook.com> * base red: panic ratchet: acpmux's and cmux-tui's new index/slice hits The panic ratchet is also red on two more rows on feat-cmux-next: acpmux indexing_slicing 692 > baseline 686 (from #28170) and cmux-tui 836 > baseline 831. Each hit is rewritten with checked access (pointer/get, JsonSet::set, get(n..).unwrap_or_default()); no behavior change: an empty slice or a null stands where the old code would have panicked. The baseline is not raised. These are Leo's hunks from #28958 (e9303c1, 5033a36, 96299c6), including his compile fix for the Value name inside tracing::warn!. Co-authored-by: Leo Li <cheerleaderleo@outlook.com> * base red: panic ratchet: cmux automation's take_target walks the words with an iterator (cmux-tui 836 > 831) 7b3b9f7 (cmux automation --target cloud) added args[i] in take_target, the sixth new cmux-tui indexing_slicing hit. The loop now takes the words from an iterator and the value after --target from the same iterator; the words, the target and the missing-value usage error are the same. A unit test pins both flag forms, the default, a missing value and a bad target. * acpmux: drop the JsonSet import requests.rs already has through super::* (unused-imports) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d9e7e9f7fb2b87a57d5f --------- Co-authored-by: Leo Li <cheerleaderleo@outlook.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Red classification at dc34d45: The errors are all in
That crate is unix-only code from ee37179, and this PR changes no file in it. The Windows build ran here only because the PR touches cmux-tui. #29075 ("base red: cmux-tui builds for Windows again (cmux-automations unix-only)") is the open fix. |
|
Review (the owner lane's independent review, at its land request): SHIP at 03e24e5 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. |
|
Owned by an agent session · session |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
HOLD: superseded by #29024 (merged as 0d38b5c): it made the same panic-ratchet fixes, so this PR's diff against feat-cmux-next is now empty (head tree == base tree). Nothing left to land.
Base red fix (priority zero): the Rust panic ratchet is RED on feat-cmux-next at 3465552:
cmux-rd-link: clippy::indexing_slicing 7 > new crate (must be 0)(3b9cf69, 6d04ce1, ae8cd21)cmux-tui: clippy::indexing_slicing 835 > baseline 831(49394d0 group create, cf3d7a3 chief acp/pipe, d13d17a apps info)It blocks area PRs such as #28757. #28808 and #28847 fixed the cmux-tui-core and apps hits; these are the rest.
Each hit is rewritten without a panic (
get/get_mut,truncate, pushes into aVec). The baseline is not raised.getnever misses.risk:low (no behaviour change).
Observed / Not run
Changelog
none
Agent session: agent session
🤖 Generated with Claude Code