Cloud start and move: put the project on the machine with link seed push

Merged
TE
4d ago
+116-51

Piece 4 of the Cloud project seed (leo-workspace design/cloud.md, "Getting the project onto the machine"), the start-chat wiring on its own. Leo, on the start screen's line:

Your project folder is copied up.
we'll want to deal with the edge cases for this too

#30634 added cmux link seed push. This PR makes the app use it, so a Cloud start or move seeds a GitHub working copy from its remote plus one bundle and copies anything else. It is split out of #30655: that PR also feeds the seed's live progress into the startup checklist, but it is built on #30517, whose base checklist (#30386) has an open revert (#30792). The progress feed follows in #30655 once the checklist re-lands. This PR depends on neither of those.

What changes

  • start-chat copy (link/start_chat_cli.rs) pushes with seed_cli::push instead of sync_cli::push. seed_cli::push itself refuses a machine without fs-v1 (machine_outdated), as the old pre-check did. The ledger is unchanged: a finished copy is never pushed again, and a retry tries the next work root the same way. The success answer gains mode (seed | copy), fallback_code, fallback_why, install_url (when the machine needs the cmux GitHub App) and skipped_files, all read with get (no new panic-ratchet hits).
  • Swift:
    • CloudMoveCLI.syncPush becomes seedPush, which runs cmux link seed push. Its callers are the move's sync and the Cloud handler's copy.
    • The move's frozen sync passes --sync seed; Bring Back Local keeps --sync pull.
    • CmuxNextApp's line count is unchanged (check-app-size). The tests expect the new arguments.

Tests

  • Rust (cmux-ci test, Linux):
    • the start_chat_cli tests (push stand-ins now answer a Value), plus a_copy_answers_how_the_push_went;
    • tests/link_seed.rs and tests/cloud_move_journey.rs (two real daemons: the seed, then a --sync seed move);
    • clippy -D warnings.
  • Swift: cmux-ci compile-check --app; CloudMoveTests and CloudBringBackTests expect link seed push and --sync seed.

Risk: every Cloud start and move now reaches the machine through the seed. Any seed failure the push can recover from (not git, no GitHub remote, a private repo without the App, a missing base, a failed clone, a machine without git-seed-v1) falls back to the same streamed copy as before, and the answer says why.

Follow-ups: #30637 (a card for the GitHub App install; until then install_url is in the answer only), #30644, #30668, #30669; the checklist progress feed in #30655.

Agent session: agent session

šŸ¤– Generated with Claude Code


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


Summary by cubic

Cloud start and move now put the project on the machine with cmux link seed push instead of a streamed copy. The start-chat copy CLI pushes through seed_cli::push, seeding a git folder from its GitHub remote plus one bundle and copying when it can't. The copy's answer now carries how it went: mode (seed or copy), fallback_code, fallback_why, install_url, and skipped_files. The Swift app's move and copy steps call link seed push, and the move's frozen sync passes --sync seed instead of --sync push. Seed failures fall back to the same streamed copy as before, with the reason in the answer.