Repository navigation
cmux-tui: a fresh Cloud VM serves fs-v1 (Cloud first send, Move to Cloud) - #28823
Conversation
…env and its bound id The daemon learned its Cloud identity (CMUX_CODEROUTER_URL, CMUX_VM_ID) only from its own environment or ~/.config/cmux/model-plane.env. Since #11813 the image bakes /etc/cmux/model-plane.env with no CMUX_VM_ID and create writes nothing into the guest, so a fresh VM's daemon never saw an identity, served no fs-v1, and `link sync push` (Move to Cloud, Cloud first send) failed with fs.unavailable. machine_source() now resolves each key from the process env, then the per-home file, then the image's /etc/cmux/model-plane.env, and CMUX_VM_ID last from the bound /etc/cmux/daemon-instance-id the bind agent writes before it starts the daemon. The per-home file is never written, so the shell's model plane is not shadowed. Cloud diagnostics' machine row reports file_ops and lists fs-v1 as a missing feature on a Cloud machine whose daemon lacks it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
|
Owned by an agent session · session |
|
Review (codex gpt-6-astra high, router-review): BLOCK at 51b333f BLOCK at 51b333f Visual verdict: Not applicable; no view or layout changes.
Review completed by source inspection; Rust and Swift toolchains were unavailable, so tests were not executed. |
…equired capabilities Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
|
Found 3 test failures on Blacksmith runners: Failures
|
|
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)
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by web and size checks: green Default changesThis pull request changes 2 defaults at
Signed off on this commit by Merge receipt: merged as Regenerate the snapshot with Shipped in:
|
|
Review (codex, router-review): SHIP at 63192aa SHIP at 63192aa Visual verdict: No visual change; the PR’s no-capture rationale matches the diff. No findings. Follow-ups: none router-review: gh api graphql failed: gh-quota: refused for session:claude-13 (budget 600/h, used 622 in the last hour): the shared GraphQL quota is under 15%; only [exited with code 0] |
…rflow is stalled or dead (#28986) healthy_role_label() sent swift-test, daemon-test and generated-files to blacksmith-6vcpu-macos-26 whenever the owned gui or session label read full, without asking whether that overflow queue moves. Run 41163886431 (#28823): the gui label had 37 queued on 10 busy runners, Blacksmith 6 vCPU had 91 queued on 10 slots with its oldest waiting 102 min, and swift-test waited 106 min there without a runner. While the overflow is stalled (the pickers' one rule) or dead, a role label with an online runner now stays. A stale snapshot or an unread Blacksmith queue keeps today's overflow. Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent review (gpt-6.1-sol high) at 63192aa: SHIP. No correctness findings. |
The Cloud machine row reads fs-v1 (AppControl+Cloud.swift), and the capability check asked for it in DaemonCapability.optional. A bundled daemon on a Mac or CI never serves fs-v1: it does only on a cmux Cloud host with the root-owned image stamp and the model plane identity. So it belongs with apps-v1 in CONDITIONAL, which the isolated identify probe cannot require. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
|
Review (codex gpt-6-astra, router-review): SHIP at 2340929 Visual verdict: no images; Leo tries the build. No correctness findings. The capability-reference check passes. Follow-ups: none |
|
Review (codex, router-review): SHIP at 185cd29 Reviewer: codex gpt-6-astra high, fast tier. SHIP at 185cd29 Visual verdict: no images; Leo tries the build No correctness or regression findings. Checked identity precedence, bind-agent startup ordering, the Cloud security gate, and capability diagnostics. Capability-reference validation and its test suite passed. Rust and Swift tests could not run because their toolchains are unavailable. Follow-ups: none |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo, 2026-10-30: "can you guys just do it", "like the initial 0 to 1 chat auto it sends to cloud".
Evidence: #28111 (comment). On a fresh devbox VM,
cmux link sync pushfailed withfs.unavailable … fs-v1 is not served here, which breaks #28111's Cloud first send (cloud.startChat) and Move to Cloud on every new machine.Root cause
The daemon serves
fs-v1only on a Cloud host that knows its model plane identity (CMUX_CODEROUTER_URLandCMUX_VM_ID). It looked for them only in its own environment and in~/.config/cmux/model-plane.env. Since #11813 the image bakes a static/etc/cmux/model-plane.env(noCMUX_VM_ID, the same bytes for every machine) and create writes nothing into the guest. The daemon's unit carries neither key, and a shell only writes the per-home file from a boot env, which Freestyle never gives. So a fresh VM's daemon never had an identity.Fix
coderouter_usage::machine_source()resolves each key from the first place that has it: the process env,~/.config/cmux/model-plane.env, the image's/etc/cmux/model-plane.env, and forCMUX_VM_IDlast the bound/etc/cmux/daemon-instance-id. The bind agent (cmux-devbox-boot, cmux-host) writes that id before it starts the daemon, and rewrites it and restarts the daemon on a clone.cloud_fs(thefs-v1gate) and the machine spend poller both use it. The root-owned image stamp is still required, so a Mac or plain host stays unchanged./etcfor the shell and broke both agents. This fix leaves the shell's model plane alone.cloud.machinesrow): the newfile_opsfield, andfs-v1listed inmissing_featureswith compatibilitylimitedon a Cloud machine whose daemon lacks it. Before this, the row saidcompatibility: current, so the app could not see the problem before the sync.No image rebake is needed. The fix ships with the guest's cmux-tui (in-place machine update, or the next image).
Tests
fresh_vm_resolves_from_the_image_env_and_the_bound_id,earlier_layers_win_per_key_and_bad_bound_ids_are_ignored(coderouter_usage).a_fresh_image_vm_serves_fs_v1_from_the_baked_env_and_the_bound_id(cloud_move_journey). A daemon with only the baked env does not servefs-v1. Oncedaemon-instance-idexists it does,link sync pushsucceeds, and no per-home model-plane.env is written.aCloudMachineWithoutFileOpsIsReportedBeforeTheSync(CloudCLITargetTests).Verified on a Cloud VM
On a devbox VM with the manual
~/.config/cmux/model-plane.envremoved (nothing in~/.config/cmux) and the daemon restarted:c230bb58:identifylists nofs-v1;51b333f(the Rust at the PR head is unchanged since):identifylistsfs-v1, andcmux link sync pushof a git repo with an untracked file returnsok: true(14 files written). Still no per-home model-plane.env. The machine was paused again afterwards.No capture: the only app change is two fields in the
cloud.machines/ Cloud diagnostics JSON row (AppControl+Cloud.swift); no view, layout or string changes.Risk: the
fs-v1gate now also passes on a Cloud-stamped host whose only identity is the root-owned/etc/cmuxfiles. Before, a user-writable per-home file was enough, so the gate is no looser than it was.Agent session: agent session
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes a fresh Cloud VM's daemon never serving
fs-v1, socmux link sync push(Move to Cloud, Cloud first send) failed withfs.unavailableon every new machine.The daemon now resolves its model plane identity (
CMUX_CODEROUTER_URLandCMUX_VM_ID) from the process env, the per-homemodel-plane.env, the image's baked/etc/cmux/model-plane.env, and for the VM id the bound/etc/cmux/daemon-instance-idwritten by the bind agent before it starts the daemon. No per-home file is written, so the shell's model plane is left alone. Cloud diagnostics' machine row reports afile_opsfield and listsfs-v1as a missing feature on a Cloud machine whose daemon lacks it. The capability check now treatsfs-v1as conditional (served only on a Cloud host), so the isolated identify probe no longer requires it.Written for commit 185cd29. Summary will update on new commits.