From 212bdc3b0829a24274a32b0dfec2a17b74226c10 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Mon, 3 Aug 2026 10:09:49 +0200 Subject: [PATCH] fix(devtest): resolve the pad endpoint by system lookup, not the service's cache --- crates/punktfunk-host/src/devtest.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/punktfunk-host/src/devtest.rs b/crates/punktfunk-host/src/devtest.rs index a7ca7306..ae7dede7 100644 --- a/crates/punktfunk-host/src/devtest.rs +++ b/crates/punktfunk-host/src/devtest.rs @@ -533,9 +533,11 @@ pub fn pad_endpoint(args: &[String]) -> Result<()> { Some("tone") => { let secs: u32 = args.get(2).and_then(|s| s.parse().ok()).unwrap_or(5); let hz: f32 = args.get(3).and_then(|s| s.parse().ok()).unwrap_or(60.0); - let Some(ep) = pe::endpoint_for(idx) else { + // `find` (a system lookup), NOT `endpoint_for` (the service's in-process cache): + // this runs as a separate CLI process and has no cache of its own. + let Some(ep) = pe::find(idx)? else { println!( - "pad-endpoint tone: no provisioned endpoint for pad {idx} — run `ensure` first" + "pad-endpoint tone: no pad-audio devnode for pad {idx} — run `ensure` first" ); return Ok(()); };