Context
Follow-up from PR #2326 (port node launcher to Rust). Tracked in #2598.
Problem
The Python launcher explicitly checked is_unix_socket("/var/run/dstack.sock") before any TEE operation, failing early with a descriptive error. The Rust launcher has no pre-check -- it fails later inside emit_event() with a less descriptive error.
Action
Add an early check in TEE mode before calling emit_event():
if args.platform == Platform::Tee {
if !std::path::Path::new(DSTACK_UNIX_SOCKET).exists() {
return Err(LauncherError::DstackSocketMissing);
}
}
Low priority -- UX improvement only.