From ec5caae2f4ca435b7335e3aa75da94a58488f094 Mon Sep 17 00:00:00 2001 From: "Ryan Johnson (ntninja)" Date: Fri, 3 Jul 2026 14:51:41 +0000 Subject: [PATCH] fix(build): make the live RotorHazard transport a DEFAULT feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A default-off product transport was a footgun that fired twice in one day: a plain-cargo-build dev deploy shipped a Director that could never leave "Configured" (lost test session), and — worse — the desktop release crate (src-tauri) depends on gridfpv-app without naming `live`, so the SHIPPED artifact had no RotorHazard adapter at all. `live` is now in gridfpv-app's default features: every plain build, the desktop artifact, and dev deploys all carry the real transport. The openssl-vendored TLS compile is a cache-warm one-time cost. The slim Mock/sim-only OpenSSL-free build remains available via --no-default-features. Fixed two latent lints/matches in the live-gated code that default CI had never compiled (a doc-indent lint in the RH transport; rh_live's Event match missing RoundFieldDrawn). Co-Authored-By: Claude Fable 5 --- crates/adapters/src/rotorhazard/transport.rs | 1 + crates/adapters/tests/rh_live.rs | 1 + crates/app/Cargo.toml | 12 +++++++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/crates/adapters/src/rotorhazard/transport.rs b/crates/adapters/src/rotorhazard/transport.rs index d9f6e7e..92f8c15 100644 --- a/crates/adapters/src/rotorhazard/transport.rs +++ b/crates/adapters/src/rotorhazard/transport.rs @@ -509,6 +509,7 @@ impl RotorHazardConnection { /// 2. names it with the GridFPV callsign (`alter_pilot { callsign }`) so RH's own view + its /// "Racing heat … pilots: …" log are right, /// 3. assigns it to the heat's slot at that node (`alter_heat { heat, slot_id, pilot }`). + /// /// Then it selects the heat as current (`set_current_heat`) so the seats take effect for the race. /// /// The heat is **freshly added** here (`add_heat`) and this is the heat the finish-time dense save diff --git a/crates/adapters/tests/rh_live.rs b/crates/adapters/tests/rh_live.rs index e927b07..4564a95 100644 --- a/crates/adapters/tests/rh_live.rs +++ b/crates/adapters/tests/rh_live.rs @@ -53,6 +53,7 @@ fn event_kind(e: &Event) -> &'static str { Event::ProtestFiled { .. } => "ProtestFiled", Event::ProtestResolved { .. } => "ProtestResolved", Event::RulingReversed { .. } => "RulingReversed", + Event::RoundFieldDrawn { .. } => "RoundFieldDrawn", } } diff --git a/crates/app/Cargo.toml b/crates/app/Cargo.toml index f1f4218..ae9fbfc 100644 --- a/crates/app/Cargo.toml +++ b/crates/app/Cargo.toml @@ -14,9 +14,15 @@ path = "src/main.rs" # `live` compiles in the **real RotorHazard adapter** (the feature-gated Socket.IO transport) # so a selected `Rotorhazard { url }` timer actually connects and feeds its passes into the # event log (#65, #73). It pulls `gridfpv-adapters/live`, which pulls a TLS stack -# (native-tls, OpenSSL-vendored on Linux). The **default build stays OpenSSL-free** — Mock/sim -# only, no network/TLS in the dependency graph — so the stock Director carries no openssl. Build -# the live variant with `cargo build -p gridfpv-app --features live`. +# (native-tls, OpenSSL-vendored on Linux). +# +# `live` is a **DEFAULT feature**: the product's whole job is talking to real timers, and a +# default-off transport shipped a Director that could never leave "Configured" — it silently +# neutered both a dev deploy (2026-07-03, a lost test session) and the desktop release +# artifact (src-tauri depends on gridfpv-app without naming `live`). The openssl-vendored +# compile is a cache-warm one-time cost; correctness of the shipped binary wins. A slim, +# OpenSSL-free Mock/sim-only build remains available with `--no-default-features`. +default = ["live"] live = ["dep:gridfpv-adapters", "gridfpv-adapters/live"] # `embed-assets` bakes the built RD console SPA (`frontend/apps/rd-console/dist`) **into the