Skip to content

Fix persistent LaunchServices registration from duplicate plist keys - #12990

Merged
teamleaderleo merged 3 commits into
mainfrom
task-12949-lsd-high-cpu
Sep 24, 2026
Merged

teamleaderleo merged 3 commits into
mainfrom
task-12949-lsd-high-cpu

Conversation

@austinywang

@austinywang austinywang commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • consolidate the duplicate UTExportedTypeDeclarations keys in the macOS app plist
  • preserve all exported drag and sidebar types, including the cloud sidebar row type
  • add a regression test that rejects duplicate plist keys and verifies the declarations

Fixes #12949

Validation

  • python3 tests/test_macos_info_plist.py
  • git diff --check

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


Summary by cubic

Consolidates the duplicate UTExportedTypeDeclarations keys in the macOS Info.plist into a single declaration. The old file registered the exported types twice, which disrupted LaunchServices and contributed to issue #12949's high CPU; the new single declaration keeps all four drag and sidebar types intact, including com.cmux.cloud-sidebar-row. A regression test now rejects duplicate plist keys, verifies the expected type identifiers, and is registered to run on the macOS lane.

Written for commit 1385a4c. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes

    • Corrected macOS application metadata organization for exported file types.
    • Preserved support for cloud sidebar rows, tab transfers, sidebar tab reordering, and file preview transfers.
  • Tests

    • Added validation to ensure exported type declarations appear exactly once.
    • Added checks confirming required drag-and-drop type identifiers remain available.

@github-actions

github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Note

Pull Request opener @austinywang is not an author or co-author of any commit in this PR (commit identities: lawrencecchen, teamleaderleo, claude). The CLA check will still proceed and requires every listed identity plus @austinywang to have signed.

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 34 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 742c5a93-08b6-4681-951a-b1fa277d15d5

📥 Commits

Reviewing files that changed from the base of the PR and between 852bc96 and 1385a4c.

📒 Files selected for processing (3)
  • Resources/Info.plist
  • tests/test-execution.toml
  • tests/test_macos_info_plist.py

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: ed828e3b-6f86-435d-aae4-c7672cee51e4

📥 Commits

Reviewing files that changed from the base of the PR and between 9c2ba78 and 852bc96.

📒 Files selected for processing (2)
  • Resources/Info.plist
  • tests/test_macos_info_plist.py

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


📝 Walkthrough

Walkthrough

The macOS Info.plist now places UTExportedTypeDeclarations after UTImportedTypeDeclarations. New tests verify that the key appears once and that three drag-related type identifiers remain exported.

Changes

Plist declaration integrity

Layer / File(s) Summary
Relocate exported type declarations
Resources/Info.plist
The exported type declaration block moves after the imported declarations. The existing exported type identifiers remain present.
Validate plist declarations
tests/test_macos_info_plist.py
Tests verify the declaration key appears once and that the three drag-related type identifiers are present.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: lawrencecchen

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: fixing persistent LaunchServices registration caused by duplicate plist keys.
Description check ✅ Passed The description provides a clear summary, rationale, linked issue, changed behavior, and validation commands. It does not use the template's Testing heading and omits the Demo Video, Review Trigger, a…
Linked Issues check ✅ Passed For [#12949], the pull request removes the duplicate UTExportedTypeDeclarations block and keeps one consolidated declaration block in Resources/Info.plist. The block retains the cloud sidebar, tab…
Out of Scope Changes check ✅ Passed The changes are limited to the LaunchServices plist declarations and regression tests for [#12949]. No unrelated product behavior or unrelated files changed.
Cmux Cloud Persistent Session And Early Input ✅ Passed PASS: The review-scoped diff changes only Resources/Info.plist and adds tests/test_macos_info_plist.py. It relocates and consolidates UTExportedTypeDeclarations metadata and checks exported type…
Cmux Swift Actor Isolation ✅ Passed PASS. The authoritative pull-request diff changes only Resources/Info.plist and adds tests/test_macos_info_plist.py. It contains no Swift files or production Swift changes. Therefore, the Swift ac…
Cmux Swift Blocking Runtime ✅ Passed PASS. The pull request changes only Resources/Info.plist and adds tests/test_macos_info_plist.py; it changes no Swift or Objective-C source. The changed files contain no semaphore, blocking wait, …
Cmux Browser Automation Off-Main ✅ Passed PASS. The PR changes only Resources/Info.plist and adds tests/test_macos_info_plist.py. It does not change Sources/TerminalController.swift, ControlCommandExecutionPolicy.swift, or any browser…
Cmux Expensive Synchronous Load ✅ Passed PASS: The authoritative pull-request range changes only Resources/Info.plist and adds tests/test_macos_info_plist.py. It changes no Swift files and adds or moves no synchronous agent-history, tran…
Cmux Cache Substitution Correctness ✅ Passed PASS: The review-scoped diff changes only Resources/Info.plist and adds a Python test. It contains no production Swift, TypeScript, or JavaScript change, and it does not substitute a cached value fo…
Cmux No Hacky Sleeps ✅ Passed PASS: The PR changes only Resources/Info.plist and a Python regression test. It adds no TypeScript, JavaScript, shell, or build/runtime-script changes, and the added lines contain no sleeps, timers,…
Cmux Algorithmic Complexity ✅ Passed The pull request changes only Resources/Info.plist and a regression test. It does not add or modify production Swift, TypeScript, JavaScript, shell, or runtime algorithms. The test uses a small one-…
Cmux Swift Concurrency ✅ Passed PASS: The pull-request diff changes only Resources/Info.plist and tests/test_macos_info_plist.py. It changes no Swift or Objective-C source, and the changed content contains no Dispatch, Combine, …
Cmux Swift @Concurrent ✅ Passed The authoritative pull-request diff changes only Resources/Info.plist and tests/test_macos_info_plist.py. It introduces no Swift files, Swift functions, nonisolated async work, @concurrent, ac…
Cmux Swift Package Boundaries ✅ Passed PASS: The authoritative pull-request diff contains only Resources/Info.plist and tests/test_macos_info_plist.py. It contains no production Swift changes, app-target feature logic, or Swift package…
Cmux Swiftpm Lockfiles ✅ Passed PASS: The pull request changes only Resources/Info.plist and adds tests/test_macos_info_plist.py. The authoritative diff contains no Package.swift, Package.resolved, Xcode project package-refe…
Cmux Swift Logging ✅ Passed PASS: The pull request changes only Resources/Info.plist and a Python regression test. It adds no Swift files or Swift logging statements, and the changed additions contain no print, debugPrint,…
Cmux User-Facing Error Privacy ✅ Passed PASS. The pull request changes only LaunchServices metadata in Resources/Info.plist and adds a developer-only regression test. The diff adds or relocates type identifiers and descriptions, not user-…
Cmux Full Internationalization ✅ Passed The pull request changes only Resources/Info.plist and adds a regression test. The plist moves the existing Cloud Sidebar Row declaration out of a duplicate UTExportedTypeDeclarations block; its…
Cmux Swiftui State Layout ✅ Passed PASS. The pull request changes only Resources/Info.plist and tests/test_macos_info_plist.py. The scoped diff contains no Swift files or SwiftUI/state/layout constructs. The SwiftUI state-layout ch…
Cmux Architecture Rethink ✅ Passed PASS: The pull request changes only Resources/Info.plist and adds tests/test_macos_info_plist.py; it changes no Swift code. The diff introduces no sleeps, dispatch timing, polling, locks, observer…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed The pull request changes only Resources/Info.plist and adds tests/test_macos_info_plist.py. The authoritative diff contains no Swift, AppKit window, SwiftUI Window, or WindowGroup changes. The…
Cmux Source Artifacts ✅ Passed PASS. The reviewed diff changes only Resources/Info.plist and adds tests/test_macos_info_plist.py. The plist is intentional product configuration, and the Python file is a hand-written regression …
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS. The authoritative pull-request diff changes only Resources/Info.plist and tests/test_macos_info_plist.py. It changes no Swift file under a production Sources/ path, so it introduces no pro…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.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. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

Copy link
Copy Markdown
Contributor

Mac fleet instructions for head 852bc96a227d053fe504b10507991eb752cfcb0e. Planned tag: pr-12990-852bc96a; this is not yet a published build.

JOB_JSON=$(~/.local/bin/cmux-ci submit --kind cmux --command 'CMUX_FLEET_BUILD_TAG=pr-12990-852bc96a /Users/Shared/cmux-build-fleet/recipes/cmux.sh https://github.com/manaflow-ai/cmux.git 852bc96a227d053fe504b10507991eb752cfcb0e' --artifact artifacts/cmux.app.zip --workspace https://github.com/manaflow-ai/cmux/pull/12990 --source-digest 852bc96a227d053fe504b10507991eb752cfcb0e --cache-key cmux:pr-12990 --min-free-bytes 268435456000 --label cmux --label ram48)
JOB_ID=$(python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])' <<<"$JOB_JSON")
~/.local/bin/cmux-ci wait "$JOB_ID" --receipt artifacts/fleet/$JOB_ID.json
~/.local/bin/cmux-ci publish-hq "$JOB_ID"

Use an existing campaign job ID if one is already posted; do not submit a duplicate. A wait timeout leaves the remote job running. Published results will include an exact-head artifact link and timing/disk receipt. This recipe validates the macOS app only, not iOS or tests. Never use maclease or put credentials in a PR comment.

@teamleaderleo
teamleaderleo enabled auto-merge (squash) September 24, 2026 08:57
@teamleaderleo

Copy link
Copy Markdown
Collaborator

Reviewed: main's Info.plist has two UTExportedTypeDeclarations keys (since e6a1d69). The last one wins, so com.cmux.cloud-sidebar-row isn't actually exported today, and merging them into one key is right. I merged main in and registered tests/test_macos_info_plist.py in tests/test-execution.toml (macos-cli-no-socket), which the registry validator requires for new tests. Auto-merge is on. One caveat: nothing yet shows the duplicate key is what drives the lsd churn, so if #12949 closes on merge, it's worth asking the reporter to confirm on the next release. Thanks :)

@cursor

cursor Bot commented Sep 24, 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.

@teamleaderleo
teamleaderleo merged commit fbaf239 into main Sep 24, 2026
55 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in cmux backlog Sep 24, 2026
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 24, 2026
4aa2736 Fix cmux events access-denied stream error (manaflow-ai#10712)
f4ff9af ci: never let a focused test run pass after executing zero tests (manaflow-ai#14053)
fbaf239 Fix persistent LaunchServices registration from duplicate plist keys (manaflow-ai#12990)
7b1cb4a Fix Hermes gateway with symlinked venv Python (manaflow-ai#12996)
b6b2720 ssh-tmux mirror: preserve deliberate pane titles (manaflow-ai#10714)
33edbc7 Fix Cloud VM panel text readability across all terminal themes (manaflow-ai#7538)
30dccd6 fix: prevent detached TUI preferred editor processes (manaflow-ai#10681)
22eec58 Reap disowned shell watchers on parent PID reuse (issue 10926) (manaflow-ai#11035)
0b9b318 ci: start Linux-only jobs beside Fast static checks (manaflow-ai#14181)
9e78d22 ci: one git archive for the trusted router; delete duplicate CI guard tests (manaflow-ai#14199)
20e79e6 feat: load local cmux config packs (manaflow-ai#13356)
224327b ci: download the admission DerivedData seed while packages resolve (manaflow-ai#14184)
886a6f0 ci: run changed suites inside compile admission (manaflow-ai#14182)

# Conflicts:
#	.github/workflows/ci-guards.yml
#	.github/workflows/ci-macos.yml
#	.github/workflows/ci.yml
#	.github/workflows/test-e2e.yml
#	.github/workflows/test-macos-suite.yml
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.

cmux causing persistent lsd high CPU usage even when not running

3 participants