fix(cloud): keep first-send creates and panes stable across retries

Merged
TE
2d ago
+529-83

A Cloud start-chat retry now repeats its pending same-key create in the original billed team and name, before considering a workspace machine. The NEXT app-server send persists its sent state before the create goes out; a failed write refuses the request. A definitive refusal rotates its durable create key and permits a fresh machine pick; delayed attempts cannot alter the new request. The first tab target is persisted as a durable pane ID and retries resolve that pane on the pinned machine after its live daemon tree arrives.

Leo: "IF IT'S RELEVANT THEN FINISH IT UP REVIEW REFINE REPAIR GET THE STUFF IN". This repairs the requested NEXT client follow-ups on the new Cloud link. Classic Cloud behavior is unchanged.

Fixes #29149
Fixes #29153
Leo-ask: ask-fc38659f80

Risk: the retry refuses when its original pane no longer exists or the durable ledger cannot be written. The uncertain create retains its key and billed team.

Validation at f534125da05cc5a0642b2f121b462093966a26ae: cmux-ci Rust run 41447804033 passed all 42 selected start-chat tests, including refusal rotation and stale-attempt fences. Fleet Swift step 5e57e30805441099d8b9ab33 compiled the package and passed CloudStartChatMachineTests, CloudCreateRetryKeyTests, CloudPaneTests, and CloudOpenMachineExistingWorkspaceTests (4 suites, 0 failures). Cargo formatting and prepush guardrails passed. Independent Astra review returned SHIP at this exact head, with no follow-ups.

Agent session: agent session