server: detect conversation boundaries via conv_hash to fix session bleed + K-shift NULL buffer crash
Three fixes:
1. Conversation boundary detection (fixes bugs 1+2: match nosedives
after harness trims, new sessions reusing stale KV cache):
- Preserve conv_hash across reset() instead of zeroing it, so
launch_slot_with_task can compare the previous session's hash
with the incoming task's hash
- In get_available_slot: compute task conv_hash, skip LCP-matched
slots with mismatched conv_hash, clear stale KV cache + prompt
tokens before prompt_load so the cache search targets the new
session
- In launch_slot_with_task: safety-net conv_hash check + clear
2. K-shift crash on ISWA caches with disparate sizes (Laguna XS.2
with kv-unified): when build_graph_shift creates k_shift/k_rot
input tensors but no layers have RoPE to reference them, the
scheduler never allocates a buffer. set_input_k_shift then
crashes on GGML_ASSERT(ggml_backend_buffer_is_host(dst->buffer)).
Fix: early-return if no layers have RoPE, plus a defensive
buffer-null guard in set_input matching the pattern already
used by llm_graph_input_attn_kv and llm_graph_input_dsv4_raw. F
fewtarius committed
022c16ed51f271ce016f6be5714fe23924c24c06
Parent: f629077