Cloud image: explicitly start the root Native receiver

Merged
TE
4d ago
+162-20

New supported Native-backed VM images explicitly start the root host with --native-receiver. A transport environment variable alone cannot activate it. Direct image startup stays unchanged. The bake rejects an old guest binary without the flag, and each clone smoke checks the running service is root and its actual argv contains the flag.

The optional native_receiver workflow input defaults off. Native candidates use native-image.json, with no direct Cloud promotion variable or channel-dev.json; they are for the VM API approved-image catalog at an exact revision. Production copy and repro modes refuse this option. The documented handoff pins the integrated guest SHA, bakes with existing protected development credentials, then selects the approved image revision through the deployment owner. No image pin, secret, running VM or deployed selector changes in this PR.

Request: “New supported Native-bound VMs must start cmux host run --native-receiver root-only (not merely CLOUD_VM_TRANSPORT env); keep direct/unsupported startup unchanged.”

Landing note: the option is inert until a bake is dispatched with native_receiver=true; until the receiver (#28947) is in the pinned guest binary, such a bake fails its help probe instead of producing an image. Leo: "but there's not really a point to be so baby gloves with a 'cutover' literally we're the only ones using cmux-next's cloud rn".

Validation: focused startup regression failed on the original host unit (1 fail / 1 pass), passes with the change (2 pass). Prepush static checks, feature-flag policy, migration policy and diff whitespace checks pass. All 19 workflow shell blocks parse. A dependency-free execution of the actual bake/smoke/candidate shell blocks with a recording command stub confirms flag forwarding, Native-only candidate output, and repro/prod-copy refusal. In CI at this head, tests/vm-image-cmux-vm-bake-workflow.test.ts and tests/vm-image-native-receiver.test.ts pass (Web tests 1/4 and 4/4), and web-typecheck passes. Prior art: #27099 and #27207 production-image workflow, #25238 root-unit restart policy, approved-image implementation 06d4bbff5d28 and recovery stack 584344318b30. These contracts remain in place.

Risk: the option changes startup for new Native images only. A missing receiver-capable binary fails bake. A configuration smoke does not prove enrollment, Native connectivity or model responses; those are the integrated acceptance proof. Follow-ups: #30212.

Agent session: agent session