Make main's unit test bundle compile again (revert test-only #11929, wire tmux helpers)

Merged
LA
2mo ago
+63-311

cmuxTests has not compiled on main since 2026-09-06, so all six app-host unit tests shards fail on every PR and on main's own CI (example: https://github.com/manaflow-ai/cmux/actions/runs/34057995765). Two causes, both already fixed on Austin's issue-11218-cli-keychain-read branch but never merged to main:

  1. https://github.com/manaflow-ai/cmux/pull/11929 merged only its test file: 265 lines in SurfaceCatalogTests.swift calling beginCloudWorkspaceRename and four siblings that exist nowhere in the app. Cherry-picked Austin's revert 68e2dbce7ea. The rename feature should re-land with implementation and tests together.
  2. https://github.com/manaflow-ai/cmux/pull/10657 added CLILocalTmuxReviewRegressionTests.swift, which uses LocalTmux* types that live only in the cmux-cli target. Cherry-picked 2a9ca7bf8f2 (wires the five helper files into cmuxTests) and fc1dc8a5e7c (moves CLIError into CLI/CLIError.swift so the test bundle can share it).

Evidence: with only the revert stacked, the hosted run https://github.com/manaflow-ai/cmux/actions/runs/34195350455 moved from the SurfaceCatalog error to the tmux error; the unit-test shards on this PR are the proof for the full fix.

https://claude.ai/code/session_01BhWEaLQcb61c4Q6dnjv3e5


[!NOTE]
Low Risk
Test-target and file-layout changes only; production CLI behavior is unchanged aside from moving CLIError to its own file with the same definition.

Overview
Restores cmuxTests compilation on main by fixing two independent breakages.

CLIError is extracted from cmux.swift into CLI/CLIError.swift and added to both the CLI app target and cmuxTests, so local tmux regression tests can use the same error type without duplicating it.

The Xcode project wires five LocalTmux* helper sources into cmuxTests (they previously lived only on cmux-cli, which blocked tests that import those types).

~265 lines of SurfaceCatalogTests for cloud workspace rename (beginCloudWorkspaceRename, commit/rollback, cursor reconciliation) are removed because those catalog APIs are not implemented on main (tests landed without the feature in #11929).

Reviewed by Cursor Bugbot for commit 668a0374ffd2efd735906e4543ce018423f71c4d. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes

    • Improved command-line error reporting with clearer messages, exit codes, and structured details for protocol, backend, and connection failures.
    • Added more specific diagnostics for missing paths, path conflicts, ownership issues, inspection failures, and startup timeouts.
  • Enhancements

    • Included additional local terminal session support, improving compatibility with local tmux-based workflows.