Skip to content

perf(cmux-tui): replay durable notices without a temporary vec - #11026

Merged
lawrencecchen merged 3 commits into
mainfrom
codex/feat-tui-replay-no-temp-wave69
Aug 28, 2026
Merged

lawrencecchen merged 3 commits into
mainfrom
codex/feat-tui-replay-no-temp-wave69

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • replay retained durable notices by index, cloning one event at a time
  • preserve queue contents and front-to-back delivery order
  • cover ordered multi-notice replay in the existing subscription test

The previous implementation collected the entire bounded retained queue into a temporary Vec only to release the iterator borrow before publishing. The new loop keeps the queue intact and avoids that allocation. The queue is capped at 64 events.

Validation: rustfmt check and git diff check passed locally. Hosted focused verification is required because local cmux-tui cargo builds are not allowed.


Summary by cubic

Replays cmux-tui durable notices by index instead of collecting them into a temporary Vec, avoiding an allocation while preserving queue contents and front-to-back delivery order.

  • The subscription test now sends two notices and verifies they replay in sequence.
  • Hosted focused verification is required because local cmux-tui cargo builds are not allowed.

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

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved delivery of retained durable notices when resuming a subscription.
    • Ensured consecutive notices are replayed correctly and in sequence.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f138212a-7d50-4b4c-9126-3cc27fa1ca58

📥 Commits

Reviewing files that changed from the base of the PR and between e69763f and 136a103.

📒 Files selected for processing (1)
  • cmux-tui/crates/cmux-tui/src/machine_provider_client.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The durable notice replay path now clones retained notices individually. The replay test emits and verifies contiguous notices 42 and 43 after resuming from cursor 41.

Changes

Durable notice replay

Layer / File(s) Summary
Replay implementation and test validation
cmux-tui/crates/cmux-tui/src/machine_provider_client.rs
The replay path clones retained notices by index. The test subscribes before calling subscribe_notices, emits notices 42 and 43, and validates both notices, their delivery metadata, and warning messages after cursor 41.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 136a1

This localized change removes a temporary allocation while preserving durable-notice replay order and queue behavior; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Swift Actor Isolation ✅ Passed PASS — The pull-request diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust source. It contains no Swift production changes, so the Swift 6 actor-isolation failu…
Cmux Swift Blocking Runtime ✅ Passed PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust. The diff contains no Swift files and introduces no Swift blocking or timing synchronizatio…
Cmux Browser Automation Off-Main ✅ Passed PASS: The pull-request diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs. It changes durable notice replay and its Rust test. It adds or moves no browser.* socket command a…
Cmux Expensive Synchronous Load ✅ Passed PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, a Rust file. The diff adds no production Swift changes and does not introduce any synchronous Swift agent…
Cmux Cache Substitution Correctness ✅ Passed PASS: The PR diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust. The custom check applies only to production Swift, TypeScript, and JavaScript changes. Therefor…
Cmux No Hacky Sleeps ✅ Passed PASS. The complete PR diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust and outside this check's TypeScript, JavaScript, shell, and build/runtime-script scope.…
Cmux Algorithmic Complexity ✅ Passed PASS. The complete PR diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust and is outside the custom check's listed Swift, TypeScript, JavaScript, and shell scope…
Cmux Swift Concurrency ✅ Passed PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust. The diff contains no Swift files or Swift concurrency patterns. Therefore, it does not int…
Cmux Swift @Concurrent ✅ Passed PASS. The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, and the complete diff contains one .rs file with no Swift files, Swift async functions, or concurrency …
Cmux Swift Package Boundaries ✅ Passed PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, a Rust file. The diff contains no Swift production changes, so the Swift package boundary check does not …
Cmux Swiftpm Lockfiles ✅ Passed PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs. The PR diff contains no Package.swift, Package.resolved, .gitignore, Xcode project/workspace, or wo…
Cmux Swift Logging ✅ Passed PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust code. The PR diff contains no Swift files and no added Swift logging statements. The Swift …
Cmux User-Facing Error Privacy ✅ Passed PASS: The diff changes only retained-notice replay mechanics and test coverage. The production change clones retained events by index and adds no user-facing error, alert, command output, or recovery …
Cmux Full Internationalization ✅ Passed PASS. The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs. The production change replaces temporary-Vec replay with indexed cloning and adds no user-facing copy. …
Cmux Swiftui State Layout ✅ Passed PASS. The PR diff against main changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs. It adds no Swift or SwiftUI code and introduces none of the checked patterns (ObservableObject,…
Cmux Architecture Rethink ✅ Passed PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust. No Swift files or Swift architectural patterns are introduced. The custom check is therefo…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS. The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, a Rust file. The diff introduces no Swift window, panel, controller, Window, or WindowGroup code. The…
Cmux Source Artifacts ✅ Passed PASS — The complete topic diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs. The diff contains Rust implementation and test changes, with no local output, logs, screenshots, …
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, a Rust file. The diff contains no Swift file and no production Sources/ seam. Therefore this Swift-spec…
Cmux No Ambient Global State ✅ Passed PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust. No Swift file changed in origin/main...HEAD. The custom check applies only to production…
Title check ✅ Passed The title clearly identifies the performance change: durable notice replay avoids a temporary Vec allocation.
Description check ✅ Passed The description explains what changed, why it changed, the test coverage, and the local validation performed. It omits the template headings for Demo Video, Review Trigger, and Checklist, but the main…
Full details: Cmux Swift Actor Isolation

Explanation

PASS — The pull-request diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust source. It contains no Swift production changes, so the Swift 6 actor-isolation failure conditions do not apply.

Full details: Cmux Swift Blocking Runtime

Explanation

PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust. The diff contains no Swift files and introduces no Swift blocking or timing synchronization. The custom check is therefore not applicable.

Full details: Cmux Browser Automation Off-Main

Explanation

PASS: The pull-request diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs. It changes durable notice replay and its Rust test. It adds or moves no browser.* socket command and does not touch TerminalController.swift, ControlCommandExecutionPolicy.swift, WebKit, AppKit, or worker routing. The custom browser automation check is therefore not applicable.

Full details: Cmux Expensive Synchronous Load

Explanation

PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, a Rust file. The diff adds no production Swift changes and does not introduce any synchronous Swift agent-history load onto a main-actor or interactive path.

Full details: Cmux Cache Substitution Correctness

Explanation

PASS: The PR diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust. The custom check applies only to production Swift, TypeScript, and JavaScript changes. Therefore, its cache-substitution failure condition is not applicable.

Full details: Cmux No Hacky Sleeps

Explanation

PASS. The complete PR diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust and outside this check's TypeScript, JavaScript, shell, and build/runtime-script scope. The only added wall-clock calls are recv_timeout(Duration::from_secs(2)) in test code. No production sleep, timer, polling loop, or fixed-delay synchronization was introduced.

Full details: Cmux Algorithmic Complexity

Explanation

PASS. The complete PR diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust and is outside the custom check's listed Swift, TypeScript, JavaScript, and shell scope. The production change also remains linear: it clones each retained notice once by index instead of collecting the queue into a temporary Vec; the retained queue has an explicit capacity of 64. The test change only verifies ordered replay. No stated algorithmic-complexity failure condition is introduced.

Full details: Cmux Swift Concurrency

Explanation

PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust. The diff contains no Swift files or Swift concurrency patterns. Therefore, it does not introduce or expand any legacy async pattern covered by the check.

Full details: Cmux Swift `@Concurrent`

Explanation

PASS. The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, and the complete diff contains one .rs file with no Swift files, Swift async functions, or concurrency annotations. The Swift @concurrent check is therefore not applicable.

Full details: Cmux Swift Package Boundaries

Explanation

PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, a Rust file. The diff contains no Swift production changes, so the Swift package boundary check does not apply.

Full details: Cmux Swiftpm Lockfiles

Explanation

PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs. The PR diff contains no Package.swift, Package.resolved, .gitignore, Xcode project/workspace, or workflow changes. The SwiftPM lockfile conditions do not apply.

Full details: Cmux Swift Logging

Explanation

PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust code. The PR diff contains no Swift files and no added Swift logging statements. The Swift logging check is therefore not applicable.

Full details: Cmux User-Facing Error Privacy

Explanation

PASS: The diff changes only retained-notice replay mechanics and test coverage. The production change clones retained events by index and adds no user-facing error, alert, command output, or recovery text. The added notice strings and assertions are test-only, and they contain no vendor names, provider-specific details, credentials, tokens, headers, or raw diagnostic dumps. Existing provider error formatting is unchanged.

Full details: Cmux Full Internationalization

Explanation

PASS. The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs. The production change replaces temporary-Vec replay with indexed cloning and adds no user-facing copy. The new warning strings and assertion text are inside #[cfg(test)] mod tests, which the rule allows. No Swift, catalog, web locale, or next-intl changes are present.

Full details: Cmux Swiftui State Layout

Explanation

PASS. The PR diff against main changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs. It adds no Swift or SwiftUI code and introduces none of the checked patterns (ObservableObject, @Observable, @Published, GeometryReader, lazy/list row store references, or render-time state mutation). The SwiftUI state-layout check is therefore not applicable.

Full details: Cmux Architecture Rethink

Explanation

PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust. No Swift files or Swift architectural patterns are introduced. The custom check is therefore not applicable.

Full details: Cmux Swift Auxiliary Window Close Shortcuts

Explanation

PASS. The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, a Rust file. The diff introduces no Swift window, panel, controller, Window, or WindowGroup code. Therefore the auxiliary-window close-shortcut rule is not applicable.

Full details: Cmux Source Artifacts

Explanation

PASS — The complete topic diff changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs. The diff contains Rust implementation and test changes, with no local output, logs, screenshots, recordings, temporary directories, caches, build output, or copied artifacts. The changed file is a normal tracked source file.

Full details: Cmux No Test Or Debug Seam In Production Source

Explanation

PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, a Rust file. The diff contains no Swift file and no production Sources/ seam. Therefore this Swift-specific check is not applicable.

Full details: Cmux No Ambient Global State

Explanation

PASS: The pull request changes only cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, which is Rust. No Swift file changed in origin/main...HEAD. The custom check applies only to production Swift changes, so none of its ambient-global-state failure conditions apply.

Full details: Description check

Explanation

The description explains what changed, why it changed, the test coverage, and the local validation performed. It omits the template headings for Demo Video, Review Trigger, and Checklist, but the main required change and testing information are present.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/feat-tui-replay-no-temp-wave69

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lawrencecchen
lawrencecchen force-pushed the codex/feat-tui-replay-no-temp-wave69 branch from e69763f to 9160518 Compare August 28, 2026 01:11
@cursor

cursor Bot commented Aug 28, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@lawrencecchen
lawrencecchen force-pushed the codex/feat-tui-replay-no-temp-wave69 branch from 9160518 to 1e7c9d0 Compare August 28, 2026 01:37
@cursor

cursor Bot commented Aug 28, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@lawrencecchen
lawrencecchen force-pushed the codex/feat-tui-replay-no-temp-wave69 branch 4 times, most recently from 136a103 to 3c30c84 Compare August 28, 2026 03:21
@lawrencecchen
lawrencecchen force-pushed the codex/feat-tui-replay-no-temp-wave69 branch from 3c30c84 to cd55ac6 Compare August 28, 2026 03:36
@cursor

cursor Bot commented Aug 28, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@lawrencecchen
lawrencecchen merged commit c582b8d into main Aug 28, 2026
41 checks passed
@lawrencecchen
lawrencecchen deleted the codex/feat-tui-replay-no-temp-wave69 branch August 28, 2026 03:53
rustybret pushed a commit to rustybret/bmux that referenced this pull request Aug 28, 2026
6964584 iOS: show first-run onboarding only after sign-in (manaflow-ai#10789)
c582b8d perf(cmux-tui): replay durable notices without a temporary vec (manaflow-ai#11026)
cc47a91 fix(cmux-tui): stop terminal content admission from swallowing context-menu presses (manaflow-ai#11019)
9578c8a chatmux-relay: tunnel-direct terminal listener + transport-fenced detach (manaflow-ai#11017)
9ae6367 test(relay): align the pooled arm-coalescing pin with the manaflow-ai#11034 deferral rule (manaflow-ai#11038)
3be7b61 iOS: give the changes-hint banner dismiss button a 44pt hit target (manaflow-ai#10883)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant