Skip to content

Commit fbba6de

Browse files
committed
fix(mesh): let the hardware smokes install the runtime they need
`just mesh-e2e-hardware` and `just mesh-e2e-admission` failed on a clean checkout, each telling the reader to run the recipe that was already running: MeshLLM native runtime for MeshLLM 0.75.1 is not installed; run `just mesh-e2e-hardware` to prepare it That instruction was true while the recipes pre-seeded the cache with the deleted `ensure-mesh-native-runtime.sh`. Without it the guard is circular, and `mesh-e2e-confidence` never reaches its third example. The guard was also unnecessary: in both files the very next statement is `initialize_host_runtime()`, which installs the signed release runtime when the cache has none. It refused immediately before the code that would have fixed the condition it was complaining about. `mesh_agent_e2e` never had the guard, which is why it kept working. Downloading the signed artifact is also the behaviour we want here. The old script built llama.cpp from source into the cache, so a cold run compiled a toolchain to run a 100MB smoke test. Verified on a genuinely cold cache — every entry moved aside first, so the only runtime present afterwards was the one this installed: just mesh-e2e-hardware cache: (empty) -> 0.75.1, downloaded not built [smoke] completion status=200 OK content="PONG" [smoke] PASS: serve→client→inference proven over mesh just mesh-e2e-admission [admission] PASS 1/3: trusted client admitted, sees routed model [admission] PASS 2/3: trusted client inference routed over mesh: "PONG" [admission] PASS 3/3: non-member saw gossip but inference was rejected: 503 [admission] PASS: owner allowlist gates mesh membership and inference Reported by @wesbillman in review. CI never runs these recipes and a warm developer cache hides the failure, so neither CI nor local iteration would have caught it. Signed-off-by: Michael Neale <[email protected]>
1 parent d3cdb0e commit fbba6de

2 files changed

Lines changed: 9 additions & 18 deletions

File tree

‎crates/buzz-relay/examples/mesh_admission_smoke.rs‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,11 @@ fn env(name: &str) -> anyhow::Result<String> {
5454
std::env::var(name).map_err(|_| anyhow::anyhow!("{name} is required for this role"))
5555
}
5656

57+
/// Installs the signed release runtime when none is cached — the same path the
58+
/// desktop takes. Deliberately no "is it installed?" precondition: this runs in
59+
/// three separate processes, and a guard here would refuse before reaching the
60+
/// call that does the installing.
5761
async fn init_native_runtime() -> anyhow::Result<()> {
58-
let cache = mesh_llm_sdk::native_runtime::native_runtime_cache(None)?;
59-
let current = mesh_llm_sdk::native_runtime::CURRENT_MESH_VERSION;
60-
if !cache
61-
.installed()?
62-
.iter()
63-
.any(|runtime| runtime.mesh_version == current)
64-
{
65-
anyhow::bail!("MeshLLM native runtime for MeshLLM {current} is not installed; run `just mesh-e2e-hardware` once to prepare it");
66-
}
6762
mesh_llm_host_runtime::initialize_host_runtime()
6863
.await
6964
.map_err(|error| anyhow::anyhow!("MeshLLM host runtime init failed: {error}"))

‎crates/buzz-relay/examples/mesh_serve_client_smoke.rs‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,11 @@ const CLIENT_CONSOLE_PORT: u16 = 13132;
4141
async fn main() -> anyhow::Result<()> {
4242
let model = std::env::var("MESH_SMOKE_MODEL").unwrap_or_else(|_| DEFAULT_MODEL.to_string());
4343
eprintln!("[smoke] model: {model}");
44-
let cache = mesh_llm_sdk::native_runtime::native_runtime_cache(None)?;
45-
let current = mesh_llm_sdk::native_runtime::CURRENT_MESH_VERSION;
46-
if !cache
47-
.installed()?
48-
.iter()
49-
.any(|runtime| runtime.mesh_version == current)
50-
{
51-
anyhow::bail!("MeshLLM native runtime for MeshLLM {current} is not installed; run `just mesh-e2e-hardware` to prepare it");
52-
}
44+
// No cache precondition: `initialize_host_runtime` installs the signed
45+
// release runtime itself when none is present, which is how the desktop
46+
// gets one too. The guard that used to stand here refused before reaching
47+
// this line and told the reader to run the very recipe that runs this
48+
// example.
5349
mesh_llm_host_runtime::initialize_host_runtime()
5450
.await
5551
.map_err(|error| anyhow::anyhow!("MeshLLM host runtime init failed: {error}"))?;

0 commit comments

Comments
 (0)