You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three user-facing fixes landing as v0.1.1, all in the Tauri control plane
(no server / inference changes).
* fix(lumen-app): kill sidecar lumen-server on app exit
- Tauri's RunEvent::ExitRequested fires on the event-loop thread and
Tauri 2 may std::process::exit() before any tokio runtime drop, so
`kill_on_drop(true)` on the spawned `tokio::process::Child` never
actually delivers the kill. The orphaned lumen-server kept the port
and the model's wired RAM resident across app launches.
- New synchronous `ServerSupervisor::shutdown_blocking()` grabs the PID
via try_lock and sends SIGTERM directly through `nix::kill`, polls
every 100 ms for up to 3 s, then SIGKILL fallback. No tokio runtime
dependency — works after the runtime has been torn down.
- main.rs switches from `.run(ctx)` to `.build(ctx).run(closure)` so
we can hook ExitRequested and call shutdown_blocking() before the
process exits.
* fix(lumen-app): reclaim port at server start when prior sidecar leaked
- Defense-in-depth for the case where shutdown_blocking() never ran
(hard force-quit via Activity Monitor, panic mid-cleanup, etc.). On
`start()` we run `lsof -nP -iTCP:PORT -sTCP:LISTEN -t` and, for each
listening PID, verify via `ps -o comm=` that argv0 contains
"lumen-server" before sending SIGTERM/SIGKILL. Unrelated services on
the same port are left alone — the spawn will fail loudly instead.
* fix(lumen-app): auto-sync Metal memory caps to active model + ctx
- The METAL MEMORY card displayed two different sets of numbers: a
"tuned for <model> + ctx N (W/C/M GB)" hint computed from the active
model + context size, and the live input values which held whatever
`reset_memory_caps` had stored (system-default 70/2/85% of RAM).
On a 24 GB Mac with an 11 GB model + ctx 8192, hint said
10.742 / 2.000 / 13.742 but inputs showed 16 / 2 / 20.
- New `syncTunedMemoryCaps()` runs on (a) `setActive` (model change),
(b) `saveContext` (ctx change), (c) `onMount` (heal stale caps from
pre-feature sessions). `wired_limit_gb` cleared to null so the
backend emits byte-exact LUMEN_WIRED_LIMIT_BYTES from the safetensors
size — no GB-rounding that could truncate a 14.45 GB model to a
14 GB ceiling. No-op when already in sync or no active model is set.
* feat(lumen-app): live system memory indicator in topbar
- New `sysinfo::current_memory_usage()` parses `vm_stat`:
used = (wired + active + compressor-occupied) × page_size — same
formula Activity Monitor uses for "Memory Used". No new crate dep.
- `get_memory_usage` Tauri command polled every 2 s alongside the
existing metrics poll.
- Topbar actions row renders a compact `X.X/Y GB` chip with an inline
mini bar; >=80% turns warn-colored, >=92% turns hot. Helps the
operator catch wired-limit/RAM-pressure issues before the OS starts
paging or the GPU starts evicting weights.
Version bumped in three places per docs/release.md:
- crates/lumen-app/Cargo.toml 0.1.0 -> 0.1.1
- crates/lumen-app/tauri.conf.json 0.1.0 -> 0.1.1
- crates/lumen-app/frontend/package.json 0.1.0 -> 0.1.1
0 commit comments