fix(appd): mark session Stopped when WEFT_RUNTIME_BIN is absent

Previously the supervisor returned Ok(()) without updating the session
state, leaving it in Starting indefinitely. Now it sets state to
Stopped, removes the abort sender, and broadcasts AppState:stopped
before returning, consistent with every other early-exit path.
This commit is contained in:
Marco Allegretti 2026-03-11 18:43:16 +01:00
parent 099283bc4b
commit 0fea8f58e4

View file

@ -134,6 +134,13 @@ pub(crate) async fn supervise(
Ok(b) => b,
Err(_) => {
tracing::debug!(session_id, %app_id, "WEFT_RUNTIME_BIN not set; skipping process spawn");
let mut reg = registry.lock().await;
reg.set_state(session_id, AppStateKind::Stopped);
reg.remove_abort_sender(session_id);
let _ = reg.broadcast().send(Response::AppState {
session_id,
state: AppStateKind::Stopped,
});
return Ok(());
}
};