KV-cache regression tests for long-context coding sessions
Local inference maintainers should test conversation state with the same care as model throughput. qMLX traced multi-minute follow-up delays to three serving bugs: a changing message ID broke byte-exact prefix matching, interrupted assistant replies disappeared from history, and checkpoint eviction discarded reusable state. On one M3 Ultra, disk restoration cut repeated prefill for 32,000 tokens from 88 seconds to 0.64 seconds.
A useful regression suite would replay a fixed coding session, interrupt generation, resume it, and record cache-hit length, tokens prefetched, and time to first token after every turn. It should fail when stable prompt prefixes change unexpectedly or server history diverges from the client transcript. Teams can run the suite first on 32,000-token and 100,000-token traces across their supported hardware; qMLX's measurements come from one machine and need reproduction before capacity planning.