[GH-ISSUE #6982] [Issue]: Reinstalling or updating the local model runtime deletes the installed decision model #3907

Closed
opened 2026-10-21 06:08:39 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kolacheee on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6982

Originally assigned to: @kolacheee on GitHub.

Summary

Reinstalling or updating the local model's llama.cpp runtime deletes the installed decision model. cleanupBundledArtifacts in packages/server/src/services/sidecar/sidecar-runtime.service.ts removes every folder in <data>/sidecar-runtime/ except mlx and the runtime it keeps. The Decision sidecar (#6556) keeps its whole runtime and model in <data>/sidecar-runtime/decision/, which that list does not cover.

Expected behavior

Only old llama.cpp runtime folders are removed. The decision model and its runtime stay installed.

Actual behavior

sidecar-runtime/decision/ is deleted with them: about 10 GB for Open-Jev 2B and 25 GB for Open-Jev 9B, which then have to be downloaded again. Every path into the cleanup does it:

  • Reinstall runtime (reinstallRuntime → resetRuntime() → cleanup with nothing kept).
  • Installing or updating the llama.cpp runtime (installLatest → cleanup keeping only the new runtime folder). This runs the first time the local model's runtime is installed, and on every Marinara update that changes the pinned llama.cpp build.
  • Switching to the MLX backend (cleanupInactiveRuntimeBackends("mlx") → resetRuntime()); Open-Jev does not run on macOS, so this one matters less.

Steps to reproduce

Reproduced in a throwaway data folder on staging c29513958:

  1. Create sidecar-runtime/decision/ (with a model file), sidecar-runtime/mlx/ and sidecar-runtime/b10188-linux-x64-vulkan/ under an empty DATA_DIR.
  2. Call sidecarRuntimeService.resetRuntime(), which Reinstall runtime calls.
  3. Before: b10188-linux-x64-vulkan decision mlx. After: mlx. The decision model is gone.

Environment

  • Marinara Engine version: staging c29513958
  • Install type: source
  • OS + version: Fedora 44
  • Browser or app shell: not applicable (server-side)

Logs, screenshots, or video

None; the deletion is silent.

Additional context

  • The Decision sidecar has not shipped in a release yet (it first ships in the next one), and the pinned llama.cpp build (b10188) has not changed since v2.4.6. So the next release is affected through Reinstall runtime and through installing the local model's runtime after the decision model; the first llama.cpp update after it deletes every installed decision model.
  • Suggested fix: remove only folders this service creates (llama.cpp runtime folders and its temporary artifacts) instead of everything except a keep list, so a future sibling such as decision cannot be caught again. A regression should pin that decision survives both resetRuntime() and an install.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @kolacheee on GitHub (Oct 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6982 Originally assigned to: @kolacheee on GitHub. ## Summary Reinstalling or updating the local model's llama.cpp runtime deletes the installed decision model. `cleanupBundledArtifacts` in `packages/server/src/services/sidecar/sidecar-runtime.service.ts` removes every folder in `<data>/sidecar-runtime/` except `mlx` and the runtime it keeps. The Decision sidecar (#6556) keeps its whole runtime and model in `<data>/sidecar-runtime/decision/`, which that list does not cover. ## Expected behavior Only old llama.cpp runtime folders are removed. The decision model and its runtime stay installed. ## Actual behavior `sidecar-runtime/decision/` is deleted with them: about 10 GB for Open-Jev 2B and 25 GB for Open-Jev 9B, which then have to be downloaded again. Every path into the cleanup does it: - **Reinstall runtime** (`reinstallRuntime` → `resetRuntime()` → cleanup with nothing kept). - **Installing or updating the llama.cpp runtime** (`installLatest` → cleanup keeping only the new runtime folder). This runs the first time the local model's runtime is installed, and on every Marinara update that changes the pinned llama.cpp build. - Switching to the MLX backend (`cleanupInactiveRuntimeBackends("mlx")` → `resetRuntime()`); Open-Jev does not run on macOS, so this one matters less. ## Steps to reproduce Reproduced in a throwaway data folder on staging c29513958: 1. Create `sidecar-runtime/decision/` (with a model file), `sidecar-runtime/mlx/` and `sidecar-runtime/b10188-linux-x64-vulkan/` under an empty `DATA_DIR`. 2. Call `sidecarRuntimeService.resetRuntime()`, which **Reinstall runtime** calls. 3. Before: `b10188-linux-x64-vulkan decision mlx`. After: `mlx`. The decision model is gone. ## Environment - Marinara Engine version: staging c29513958 - Install type: source - OS + version: Fedora 44 - Browser or app shell: not applicable (server-side) ## Logs, screenshots, or video None; the deletion is silent. ## Additional context - The Decision sidecar has not shipped in a release yet (it first ships in the next one), and the pinned llama.cpp build (`b10188`) has not changed since v2.4.6. So the next release is affected through **Reinstall runtime** and through installing the local model's runtime after the decision model; the first llama.cpp update after it deletes every installed decision model. - Suggested fix: remove only folders this service creates (llama.cpp runtime folders and its temporary artifacts) instead of everything except a keep list, so a future sibling such as `decision` cannot be caught again. A regression should pin that `decision` survives both `resetRuntime()` and an install. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:08:39 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3907
No description provided.