From 0496eccfb25e53c3f4cd3869b2f7bcc111927dcb Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 22 Feb 2026 21:33:37 +0900 Subject: fix(clear-cache): enforce 1 GB repo cache size limit during GC Composer caps the repo cache at 1 GB during garbage collection, but Mozart was passing u64::MAX (no limit). Align with Composer behavior. Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/clear_cache.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/mozart/src/commands/clear_cache.rs b/crates/mozart/src/commands/clear_cache.rs index e0ae111..7bca623 100644 --- a/crates/mozart/src/commands/clear_cache.rs +++ b/crates/mozart/src/commands/clear_cache.rs @@ -20,7 +20,8 @@ pub async fn execute( let repo_cache = Cache::repo(&config); let files_cache = Cache::files(&config); - repo_cache.gc(config.cache_ttl, u64::MAX)?; + // Composer enforces a 1 GB cap on the repo cache during GC + repo_cache.gc(config.cache_ttl, 1024 * 1024 * 1024)?; files_cache.gc(config.cache_files_ttl, config.cache_files_maxsize)?; console.info("Cache garbage collection complete."); -- cgit v1.3.1