Skip to content

fix(cache): keep Mesh's caches in <platform cache>/mesh-llm after the Skippy move - #3230

Merged
i386 merged 1 commit into
Mesh-LLM:mainfrom
Virgile-pct:fix/keep-mesh-cache-location
Nov 29, 2026
Merged

i386 merged 1 commit into
Mesh-LLM:mainfrom
Virgile-pct:fix/keep-mesh-cache-location

Conversation

@Virgile-pct

@Virgile-pct Virgile-pct commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Original problem

Since #3193, Mesh's caches live in a different directory. The in-tree Skippy resolved application_cache_dir() to <platform cache>/mesh-llm; Skippy from crates.io resolves it to <platform cache>/skippy. mesh_cache_dir() says it preserves Mesh's location but delegates to Skippy, so everything built on it moved: model usage records, GGUF metadata, weight digests, the plugin blobstore, the Metal pipeline cache and materialized stages.

The native runtime cache moved the same way, from <platform cache>/mesh-llm/native-runtimes to <platform cache>/skippy/native-runtimes. Runtimes installed by earlier releases stay on disk, and runtime list and runtime prune no longer see them.

Diagnostics

On Windows (<platform cache> is %LOCALAPPDATA%), a release build of main served Qwen3-8B, whose digest a 0.80.0 node had already written to %LOCALAPPDATA%\mesh-llm\weights-digest\7ff051ec….json. Main computed it again and wrote the same file under %LOCALAPPDATA%\skippy\weights-digest. That machine's 0.80.0 cache also holds 2 GB of older CUDA runtimes in %LOCALAPPDATA%\mesh-llm\native-runtimes that main can't prune.

Fix

  • mesh_llm_skippy_adapter::mesh_cache_dir() resolves <platform cache>/mesh-llm itself, with the fallbacks the in-tree code had.
  • mesh_llm_system::native_runtime_install::mesh_cache_dir() resolves the same directory, for the crates that don't depend on the adapter. models commands now use it instead of Skippy's directory.
  • The runtime cache Mesh passes to Skippy is MESH_LLM_NATIVE_RUNTIME_CACHE_DIR, then <mesh cache>/native-runtimes. When only SKIPPY_NATIVE_RUNTIME_CACHE_DIR is set, Mesh passes nothing and Skippy reads it, as before.

Builds of main since #3193 wrote some entries under skippy. Nothing migrates them; the next run recomputes them under mesh-llm.

Validation

  • On Windows 11 (RTX 4070 Ti), runtime list --installed with no cache variable: main shows no runtime and the cache %LOCALAPPDATA%\skippy\native-runtimes; this branch shows the 0.76.1 and 0.78.1 CUDA runtimes under %LOCALAPPDATA%\mesh-llm\native-runtimes.
  • Serving Qwen3-8B with a release build of this branch writes nothing under %LOCALAPPDATA%\skippy and leaves the existing mesh-llm\weights-digest entry untouched.
  • cargo test -p mesh-llm-system --lib native_runtime_install (10 passed) and cargo test -p mesh-llm-host-runtime --lib mesh_cache_location pass; cargo fmt --all -- --check is clean.
  • cargo clippy -p mesh-llm-system -p mesh-llm-skippy-adapter -p mesh-llm-commands --all-targets -- -D warnings -A dead-code is clean on Windows. Without -A dead-code, clippy on Windows already fails on main with unused functions in mesh-llm-system/src/hardware/mod.rs, which this PR doesn't touch.
  • No UI change.

Summary by CodeRabbit

  • Improvements
    • Model files and native runtimes now use consistent cache locations. A configured Mesh cache location takes precedence; otherwise, an existing Skippy cache setting is respected, or a platform-appropriate default is used.

Skippy from crates.io resolves application_cache_dir() and its native
runtime cache under <platform cache>/skippy, while the in-tree copy used
<platform cache>/mesh-llm. mesh_cache_dir() delegated to Skippy, so since
Mesh-LLM#3193 model usage, GGUF metadata, weight digests, the blobstore and
materialized stages moved, and runtimes installed by earlier releases
are no longer seen by runtime list or prune.

Resolve <platform cache>/mesh-llm in Mesh itself, and hand Skippy
<mesh cache>/native-runtimes as the runtime cache unless one of the two
cache variables is set.
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Mesh now resolves its cache directory independently of Skippy’s application cache. Native runtime cache resolution applies Mesh and Skippy environment settings, and model output uses the shared Mesh cache path.

Changes: Mesh cache resolution

Layer / File(s) Summary
Define the Mesh cache path
mesh/crates/mesh-llm-skippy-adapter/src/lib.rs, mesh/crates/mesh-llm-system/src/native_runtime_install.rs
The adapter and native runtime installer resolve the Mesh cache directory using platform cache, $HOME/.cache, and temporary-directory fallbacks, then append mesh-llm.
Resolve and use native runtime cache paths
mesh/crates/mesh-llm-system/src/native_runtime_install.rs, mesh/crates/mesh-llm-commands/src/model_output.rs, mesh/crates/mesh-llm-host-runtime/src/models/local.rs
The runtime cache resolver handles Mesh and Skippy cache settings. Runtime installation and model output use the resolved paths. Tests check cache directory alignment and precedence cases.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: i386

Merge Risk: Minimal · up to 69352

Mesh now keeps its caches under the mesh-llm cache directory instead of skippy, and runtime install and listing resolve the same location. Existing skippy entries are not migrated and are recomputed on the next run. I found no merge-blocking risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: Mesh's caches are kept under /mesh-llm after the Skippy move. The raw summary and objectives confirm the change resolves the Mesh cache directory directly i…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: Mesh's caches are kept under <platform cache>/mesh-llm after the Skippy move. The raw summary and objectives confirm the change resolves the Mesh cache directory directly in the adapter and system crates, sets a Mesh-specific native runtime cache default, and documents the precedence. The title is specific, though it is long (81 characters) and uses the 'fix(cache):' prefix.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
Fix failing CI checks

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.1)

Clippy execution failed

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5e9d51c5-98f8-4a55-9f32-7f1969ace107
Commits

Reviewing files that changed from the base of the PR and between 74c8765 and 69352f8.

Files selected for processing: 4

  • mesh/crates/mesh-llm-commands/src/model_output.rs
  • mesh/crates/mesh-llm-host-runtime/src/models/local.rs
  • mesh/crates/mesh-llm-skippy-adapter/src/lib.rs
  • mesh/crates/mesh-llm-system/src/native_runtime_install.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@i386
i386 merged commit 9293f45 into Mesh-LLM:main Nov 29, 2026
16 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants