Repository navigation
feat(cloud): select NEXT backend at runtime in Rust - #35133
Conversation
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-7f47f1f7d409b2d65458
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-7f47f1f7d409b2d65458
|
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)
red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: Shipped in:
|
|
Found 7 test failures on Blacksmith runners: Failures
|
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-7f47f1f7d409b2d65458
|
Awareness note from an agent lane that does not own this PR; it is not a review or a request to take the PR over. For awareness: this PR added cmux-tui/crates/cmux-cloud-environment/src/lib.rs with the cmux.com and cmux-staging origins after the classic Cloud route guard (#35040) landed, so tests/test_classic_cloud_routes.py went red on base. #35160 adds keep: allowlist entries for that file, like the ones #34982 added for cmux-cloud-config. |
|
Lead: after this PR merged, the feat tip does not compile on macOS: |
|
Leo: this PR (2a10af8) made the feat-cmux-next Rust panic ratchet red: |
…psible_if, from #35133) 2a10af8 (#35133) added a nested if let / if in Resolver::set in cmux-cloud-environment/src/lib.rs, which clippy -D warnings rejects (collapsible_if). It is now one let chain, as clippy suggests: the same two conditions in the same order, the same early return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…te guard (#35160) #35133 added cmux-tui/crates/cmux-cloud-environment/src/lib.rs with the cmux.com and cmux-staging origins after #35040 landed the guard, so tests/test_classic_cloud_routes.py is red on base. Add keep: entries like #34982's for cmux-cloud-config. Agent-Session: https://cmux.com/deeplink/agent?id=aid-86478c59962584e11925 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: cmux-bot[bot] <348531757+cmux-bot[bot]@users.noreply.github.com>
…5133) (#35172) The feat tip does not compile: crates/cmux-tui/src/cli/cloud_environment/relaunch.rs:41:45: error: type annotations needed (tip watcher, STATUS 11474). #35133 (2a10af8) compares kevent.data with `libc::ESRCH as _`; the cast target is ambiguous. kevent.data is intptr_t on macOS, so cast to libc::intptr_t. No behavior change.
- cloud help lists the offered preview-share and preview-revoke verbs (#34460), with en and ja rows; help_lists_exactly_the_offered_cloud_verbs and cloud_help_lists_every_offered_cloud_action were red. - quick_start_commands_parse skips the BACKEND section's cmux cloud env lines, as it skips the secret and client-session sections: #35133 put them beside SECRETS as a usage pattern (env set local|dev|...), not as quick-start commands, and cloud_environment.rs tests that grammar. The third red, clippy collapsible_if in cmux-cloud-environment (#35133), is in landq entries 0ea80ae (a964) and cf0afc5 (a968). Red on tip: cmuxterm-hq run 41803875674.
… indexing_slicing 841 > 831) (#35180) * base red: cloud env reads and writes its JSON reply with get and set (panic ratchet, from #35133) cmux-tui clippy::indexing_slicing went 831 to 837 at 2a10af8 (#35133): cli/cloud_environment.rs read value["name"], value["restart_required"] and value["restart_scheduled"] and wrote three keys with value[..] = x. The reads now use get(..) (a missing key reads as before: no name prints unknown, no flag is false); the writes use cmux_json::JsonSet::set on the serialized Selection (an object, so set inserts exactly as the index write did). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * base red: code mode reads the wrap_up tool name and box with get (panic ratchet, from #34360) 9642629 (#34360) added three cmux-tui clippy::indexing_slicing rows in cli/mcp/code_mode.rs: t["name"] == WRAP_UP in descriptors and two answered["value"] reads in exec_mode. They now use get(..): a tool with no string name does not match (as Null != WRAP_UP did), and the box is kept only when the call's value is an object, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * base red: cloud environment set collapses its nested if (clippy collapsible_if, from #35133) 2a10af8 (#35133) added a nested if let / if in Resolver::set in cmux-cloud-environment/src/lib.rs, which clippy -D warnings rejects (collapsible_if). It is now one let chain, as clippy suggests: the same two conditions in the same order, the same early return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * base red: the cloud environment reader passes the bundle id without a borrow (clippy needless_borrow, from #35133) 2a10af8 (#35133) passed &bundle (a &&str) to Resolver::new in cmux-tui/src/cloud_environment.rs, which clippy -D warnings rejects (needless_borrow). It now passes bundle, a &str: the same value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * base red: link sync reads a too-large folder's stat kind and revision with get (panic ratchet, from #35138) f26eebe (#35138) added two cmux-tui clippy::indexing_slicing rows in link/sync_cli.rs (Listings::entry): stat["kind"] and stat["revision"]. The tip went 839 to 841 with them (tip watcher, 24f3425). They now read with get(..): a missing or non-string key gives the same empty kind and None revision as the Null index read did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * base red: a link sync test moves home into its FsService roots (clippy redundant_clone, from #35149) 4ce3393 (#35149) added Roots::new([home.clone()]) in cmux-tui/tests/link_sync.rs; the test does not use home after it, so clippy -D warnings rejects the clone (redundant_clone). It now moves home: the same roots. Test code only; no panic ratchet effect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… it by its push paths (red) feat-cmux-next is to require 'clippy (changed cmux-tui packages)': #35133 and #35149 merged with it red because no check was required. A path-filtered required check never reports on other pull requests and leaves them pending, so the workflow must run on each one and skip its jobs when no push path changed.
…cloud env` lines; they parse in cloud_environment (#35557) #35133 added `cmux cloud env get` and `cmux cloud env set local|dev|preview-N|staging|prod` to cloud help's outro. This CLI runs them itself (cloud_environment.rs), like the secret and client-session lines the quick-start check already leaves out, so that check counted 12 commands for its 10 and went red on feat. It now leaves them out too, and cloud_environment's new the_help_env_lines_parse checks that both lines (every named environment of `set`) parse.
|
Base red from this PR: cloud help's quick-start check counted the two new (BASE RED SUITE for the cmux-next Performance Lead; nothing to do unless you disagree with the fix.) |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
NEXT Cloud backend iteration currently requires separate app builds, and the native app and daemon choose deployments independently. This adds one Rust deployment table and a persisted per-bundle
cmux cloud env get|set local|dev|preview-N|staging|prod --jsonselection. DEV defaults to dev, NEXT nightly defaults to prod, and Release/RC are locked to prod.Leo: "let's also get our iteration loop good for the whole working on cloud type thing".
The CLI validates the app bundle before asking it to apply a saved change. The following app-wiring PR consumes this JSON and implements that apply method; an older app saves it and reports that a manual restart is needed. The helper waits for the exact app process to exit before reopening its bundle. Auth namespace revisions rotate only on an actual environment change, including when returning to an earlier environment. Preview share tokens retain their development issuer. NEXT nightly sharing now follows the selected deployment (prod by default), matching its API token issuer. Empty CMUX_SHARE_ROOM_URL still disables sharing. Classic deployment fallback behavior is preserved.
The state-root baseline declares this crate as the sole resolver for the validated per-bundle selection path. The table, persistence tests and CLI adapter stay in this seam so no second endpoint table is needed in the app.
Observed / Not run
🤖 Generated with Codex
Agent session: agent session