From 5761538c07c0b90284fc2f1fa7ada473fbbafa95 Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Sat, 10 Oct 2026 00:49:34 +0200 Subject: [PATCH] fix(runtime): allow verified MTP cold load its own finite budget --- crates/leleka-runtime/src/backend.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/leleka-runtime/src/backend.rs b/crates/leleka-runtime/src/backend.rs index e28459a6..f6207342 100644 --- a/crates/leleka-runtime/src/backend.rs +++ b/crates/leleka-runtime/src/backend.rs @@ -50,9 +50,9 @@ const FRAME_LIMIT: usize = 64 * 1024; const OUTPUT_LIMIT: u32 = 4096; const QUEUE: usize = 16; const REPLY_TIMEOUT: Duration = Duration::from_secs(1200); -// The explicitly selected pinned archive must be copied from its external -// volume and fully hashed/CRC checked before admission. Its cold physical load -// has a separate finite budget; ordinary controls and Native stay unchanged. +// Explicit KAR/MTP files require private copies and complete pinned admission +// after the base GGUF hashes. Their cold physical load has a separate finite +// budget; ordinary controls and Native stay unchanged. const KAR_LOAD_REPLY_TIMEOUT: Duration = Duration::from_secs(7200); const BACKPRESSURE_TIMEOUT: Duration = Duration::from_secs(30); const GENERATION_TIMEOUT: Duration = Duration::from_secs(24 * 60 * 60); @@ -220,7 +220,9 @@ impl Backend for Proxy { validate_kar_selection(&config, self.kar_configured)?; validate_mtp_selection(&config, self.mtp_configured)?; self.idle()?; - let timeout = if requires_kar(&config.inference_mode) { + let timeout = if requires_kar(&config.inference_mode) + || matches!(config.inference_mode, InferenceMode::ExperimentalMtp { .. }) + { KAR_LOAD_REPLY_TIMEOUT } else { REPLY_TIMEOUT