Skip to content

cloud: one-command dev loop on a kept Cloud machine (build, patch-push, restart, journey in about a minute) - #36251

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
lane/cloud-devloop
Nov 5, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
lane/cloud-devloop

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

A machine-side change (cmux-tui, cmux-host or acpmux) can now be checked end to end on a real Cloud machine in about a minute, with no image bake or nightly: bun scripts/cmux-next/cloud-devloop.ts --credentials FILE.

Leo, 2026-11-05: "Just running commands and then we're seeing, Oh, okay, we gotta fix this. Then we gotta fix that ... we hill climb within, like, you know, several minutes, we have multiple iterations within that instead of, like, one iteration every couple minutes."

What changes

scripts/cmux-next/cloud-devloop.ts: one kept Cloud machine (cloud-devloop, created on first use) is the dev box. One command:

  1. rsyncs the worktree's changed files to a warm checkout on a Linux build host (--build-host or CLOUD_DEVLOOP_BUILD_HOST);
  2. builds cmux-tui, the guest's one multi-call binary (dev profile, stripped, the guest's Ubuntu release, baseline zig CPU for libghostty-vt);
  3. pushes a zstd --patch-from delta of what the machine already runs (0.3 MB after a one-line acpmux edit) in 512 KiB fs/write pieces, SHA-256-checked;
  4. flips /opt/cmux/current to a dev profile and restarts cmux-host and acpmux.service; --restore undoes it;
  5. runs the Cloud journey on that machine and prints the first red step with the journal lines since the run began.

cloud-journey.ts:

  • --machine ID runs on an existing machine, keeps it, and resets an earlier run's model stub.
  • --keyed-start checks that the app's keyed acpmux start still holds after acpmux.service's restart delay, which is the take-over race of cmux-platform#845.

Measured (production, agent test account)

iteration build push install and restart journey total
one-line acpmux edit 20.7 s 5.9 s 14.6 s 22.4 s 66.8 s
no change 0.9 s none none 20.9 s 27.2 s

--keyed-start was red on production before #845 deployed and green after, 36 s each run.

Tests

cloud-devloop.test.ts and cloud-journey.test.ts: 21 pass and 0 fail on the fleet.

Changelog

none

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Machine-side changes (cmux-tui, cmux-host, acpmux) can now be checked end to end on a kept Cloud machine in about a minute, with no image bake or nightly. bun scripts/cmux-next/cloud-devloop.ts --credentials FILE rsyncs the worktree's changed files to a warm fleet Linux build host, builds the multi-call cmux-tui binary there, pushes a zstd --patch-from delta in 512 KiB pieces, flips /opt/cmux/current to a dev profile, restarts the host and acpmux units, and runs the Cloud journey on that same machine, printing the first failing step with the machine's journal lines.

  • One-line acpmux edit: build 20.7 s, push 5.9 s, install+restart 14.6 s, journey 22.4 s, about 67 s total; a no-change rerun is about 27 s.
  • --restore puts the image's binary back; --snapshot creates the dev machine as the next base image.
  • cloud-journey.ts gains --machine ID (run on an existing machine and keep it, resetting an earlier run's model stub) and --keyed-start, which verifies the keyed acpmux start still holds after acpmux.service's restart delay — the take-over race of cmux-platform#845.
  • 21 tests pass, 0 fail on the fleet.

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

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits November 4, 2026 22:42
…ush, restart, journey)

scripts/cmux-next/cloud-devloop.ts: syncs this worktree's changes to a warm fleet
Linux checkout, builds cmux-tui there (dev profile, stripped, baseline zig CPU for
libghostty-vt), pushes a zstd --patch-from delta to one persistent Cloud machine in
512 KiB fs/write pieces, flips /opt/cmux/current to a dev profile, restarts
cmux-host and acpmux, and runs the Cloud journey on that machine, printing the
first red step with the machine's journal. --restore puts the image's binary back.

cloud-journey.ts: --machine ID runs on an existing machine and keeps it (resetting
an earlier run's model stub), and --keyed-start checks the app's keyed acpmux
start still holds after acpmux.service's restart delay (the take-over race of
cmux-platform#845).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo
teamleaderleo temporarily deployed to cmux-next-cloud-journey November 5, 2026 06:46 — with GitHub Actions Inactive
@cursor

cursor Bot commented Nov 5, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

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

Review db0ef2f: 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=pr36251 -f ref=lane/cloud-devloop -f platform=macos -f backend_mode=local

Shipped in:

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/41992440601 at c293fc3 failed: cmux-next crash ends the app.
Those jobs last passed at 3deee62. This pull request is one of 3 merged since: #36285, #36207, #36251.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 5, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 5, 2026

Copy link
Copy Markdown

Found 3 test failures on Blacksmith runners:

Failures

Test View Logs
nightly cmux-tui resolve/nightly cmux-tui resolve View Logs
test_every_compile_job_names_its_warm_sources (main.ThisTree.test_every_compile_job
_names_its_warm_sources)/
test_every_compile_job_names_its_warm_sources (main.ThisTree.test_every_compile_job
_names_its_warm_sources)
View Logs
the six-hour schedule must allow 90 minutes for a cold cache build and use the matching
runner, Xcode, and visible timing output/
the six-hour schedule must allow 90 minutes for a cold cache build and use the matching
runner, Xcode, and visible timing output
View Logs

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

@teamleaderleo teamleaderleo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (codex gpt-6.1-sol xhigh, next-review, since=20261105T073655Z): SHIP at db0ef2f

SHIP at db0ef2f

Visual verdict: no images; Leo tries the build

    • [P1] [follow-up] [category:correctness] [finding:F1] [outcome:pending] cloud-devloop.ts:503 uses the nonexistent cloud.machine.snapshot operation, so every --snapshot invocation fails with an unknown-operation error. Call cloud.snapshot.create instead.
    • [P2] [follow-up] [category:correctness] [finding:F2] [outcome:pending] cloud-journey.ts:497-503 resets only Claude’s stub endpoint. The Codex stub writes /home/cmux/.codex/config.toml, which remains pointed at the old loopback provider on later --machine --agent codex runs without --model stub.
    • [P2] [follow-up] [category:correctness] [finding:F3] [outcome:pending] cloud-devloop.ts:270-276 searches only the first cloud.machine.list page. Since the API is paginated (default limit 50), an existing named dev machine beyond that page is missed and another machine is created.
    • [P2] [follow-up] [category:reliability] [finding:F4] [outcome:pending] cloud-devloop.ts:280-286 proceeds after the 300-second status loop even if the machine is still not running, causing later install/exec failures instead of reporting a provisioning timeout.

Follow-ups:

  • [finding:F1] Fix the snapshot operation.
  • [finding:F2] Reset the Codex stub configuration.
  • [finding:F3] Page through machine listings.
  • [finding:F4] Fail explicitly when the machine-start timeout expires.

@teamleaderleo
teamleaderleo merged commit c293fc3 into feat-cmux-next Nov 5, 2026
197 of 205 checks passed
@teamleaderleo
teamleaderleo deleted the lane/cloud-devloop branch November 5, 2026 08:00
austinywang added a commit that referenced this pull request Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was previously deployed

2 inactive deployments
cmux-next-cloud-journey — db0ef2f9 Deployed Nov 5, 2026 by teamleaderleo via journey #3
ci-routing-agent — db0ef2f9 Deployed Nov 5, 2026 by teamleaderleo via cmux-tui tree preflight #114859
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