Skip to content

cmux link machine update: a tree-mode DEV build pins the build its cmux-tui tree published - #30421

Closed
teamleaderleo wants to merge 1 commit into
feat-cmux-nextfrom
cloud-machine-update-tree-pin
Closed

teamleaderleo wants to merge 1 commit into
feat-cmux-nextfrom
cloud-machine-update-tree-pin

Conversation

@teamleaderleo

Copy link
Copy Markdown
Collaborator

Leo, 2026-10-31: "whenever i start a chat it should be able to send me to cloud autommatically keep launching/downloading new dev builds and such".

Follow-up to #30258 (and item 3 of #30373). A fleet capture of a DEV build that includes #30258 still failed the first Cloud send with "cloud-chats runs an older cmux that can't take this chat yet", because the update had no build to install:

  • A DEV app bundles cmux-tui built from its own source tree (mode=tree in cmux-tui.version). CI never publishes the DEV app's own commit, so files.cmux.com/cmux-tui/<commit>/manifest.json was a 404. CI publishes the tree instead, under tree/<key>/, from whichever commit first built it.
  • So cmux link machine update answered machine_update_unavailable.

Change (Rust, cmux-remote and cmux link machine update)

  • pinned_linux_payload: when the build's own commit manifest is missing, read key= from the tree-mode cmux-tui.version beside the binary, then:

    • fetch tree/<key>/source.json;
    • check that the key matches and the publishing commit is a 40-hex commit;
    • fetch that commit's manifest and pin the musl build from it;
    • require the tree's own source.json to list the same digest.

    This is the same check RemoteInstaller.plan does for SSH hosts. A release build, a pin-mode bundle, and a dirty or unpublished build behave as before.

  • It now returns PinnedPayload { path, sha256, commit }. machine update treats a machine already on the publishing commit as current (same_tree). Without this, a tree-mode app whose own commit differs from the publishing commit would update the machine on every send.

  • The machine_update_unavailable message no longer says that DEV builds cannot update machines (item 1 of Cloud machine update from DEV builds: follow-ups from #30258 #30373).

Tests

cmux-ci test on the Linux pool:

  • cargo fmt --check: clean.
  • cargo test -p cmux-remote --lib published_pin_tests: 4 passed, including the new a_tree_bundle_takes_its_trees_publishing_commit.
  • cargo clippy -p cmux-remote -p cmux-tui --all-targets -D warnings: clean.
    Agent session: agent session

🤖 Generated with Claude Code

…ux-tui tree published

A DEV app bundles cmux-tui built from its own tree (mode=tree); its own commit
is never published, so the commit manifest is a 404 and the app still could not
update a Cloud machine whose older image refuses the first chat. Take the pin
from tree/<key>/source.json's publishing commit, as RemoteInstaller.plan does,
and treat a machine already on that commit as current.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at 40b7c36

No blocking findings. The tree fallback checks what RemoteInstaller.plan checks: the source.json key, a 40-hex publishing commit, that commit's manifest, and that the tree lists the same digest. Everything goes over HTTPS, and the payload is verified against that digest before it is staged. Release and pin-mode builds are unchanged.

Follow-ups (filed as one issue):

  1. same_tree is checked after pinned_payload, so a machine that is already current still costs three fetches.
  2. No test covers the same_tree branch.
  3. A source.json with no binaries gives machine_update_payload_rejected when it should give unavailable.
  4. bundled_tree_key reads cmux-tui.version beside current_exe, which a symlinked binary does not find.
  5. A dirty local build of a tree-mode bundle pins the clean published tree.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 40b7c36: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr30421 -f ref=cloud-machine-update-tree-pin -f platform=macos -f backend_mode=local

@blacksmith-sh

blacksmith-sh Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Found 15 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpo4o__uif/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmprqp4g8x4/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
main.DeveloperIdAppTests.test_download_prints_the_active_profile_only/
test_download_prints_the_active_profile_only
View Logs
nightly must build and hand off the macOS 26 helper and Xcode 26.5 app before publishin
g/
nightly must build and hand off the macOS 26 helper and Xcode 26.5 app before publishin
g
View Logs
stubs: /System/Library/Frameworks/Security.framework/Versions/A/Security has no stub/
Security has no stub
View Logs
stubs: CoreFoundation.tbd: install-name /System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation, missing 1: ['_CFRetain']/
CoreFoundation, missing 1: ['_CFRetain']
View Logs

...and 5 more test failures. View all on Blacksmith: run 41285759871, run 41285759817

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Superseded by #30604. #30258, which this PR built on, was reverted in #30438 for the CmuxNextApp line ratchet. #30604 re-lands this PR's Rust content with the reverted Rust half, byte-identical and with no CmuxNextApp lines, so this PR now conflicts with base. Closing in favour of #30604.

teamleaderleo added a commit that referenced this pull request Nov 1, 2026
…om its published commit or cmux-tui tree (#30604)

Re-lands the Rust half of #30258 (reverted in #30438 for the CmuxNextApp line
ratchet, which this half does not touch) together with #30421's tree pin:
- no bundled manifest: the build's own commit manifest on files.cmux.com pins it;
- a tree-mode DEV bundle whose commit is unpublished: tree/<key>/source.json's
  publishing commit pins it, and the tree must list the same digest;
- a machine already on that publishing commit is current (same_tree).


Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was previously deployed

3 inactive deployments
artifacts — 40b7c363 Deployed Nov 1, 2026 by teamleaderleo via add the Windows daemon to the tree #94654
sentry-dsyms — 40b7c363 Deployed Nov 1, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #94654
ci-routing-agent — 40b7c363 Deployed Nov 1, 2026 by teamleaderleo via cmux-tui tree preflight #94654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant