Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

Clear recoverable snapshot errors before batched draft prefill

Jeremiah Ritcheyf3072a95e61a
diff --git a/docs/plans/shared-conversation-upstream-validation.md b/docs/plans/shared-conversation-upstream-validation.md
index 5aa0ac794..6ae00dabb 100644
--- a/docs/plans/shared-conversation-upstream-validation.md
+++ b/docs/plans/shared-conversation-upstream-validation.md
@@ -1,11 +1,20 @@
# Conversation cache validation
-The core review branch is being brought onto upstream 0.1.26 (`4c68013`). Results
-below belong to the earlier 0.1.25 implementation (`cabd50c` through `1d9e4e7`),
+The core review branch is based on upstream 0.1.26 (`4c68013`). Recorded model
+results below belong to the earlier 0.1.25 implementation (`cabd50c` through `1d9e4e7`),
not the new base. The Windows admission test is @midhatn's `32cf918`, retained as
`b319d43`. Historical records and the general Pi benchmark remain on local branch
`feat/conversation-cache-upstream` at `cb8d90c`; they are outside the core patch.
+## Current offline checks
+
+After separating the general benchmark tooling and merging 0.1.26, all 47 tool
+tests and the 22 cache-harness tests under Python `-O` pass. Recoverable snapshot
+rejection now clears its diagnostic error before the new batched draft-prefill
+path runs. That C++ integration change still needs an engine build and model
+validation; these Python passes do not establish it. No benchmark server or GPU
+was used for these checks.
+
## Recorded Linux evidence (2026-09-29)
EPYC 7532, RTX 4090, GCC 15.2, CUDA 13.4, SM89, portable AVX2, IQ3_S. Paired
diff --git a/src/program/generate.cpp b/src/program/generate.cpp
index a2bb0d139..7ee627bee 100644
--- a/src/program/generate.cpp
+++ b/src/program/generate.cpp
@@ -3267,6 +3267,7 @@ int main(int argc, char** argv) {
size_t estimate = 0;
if (!strata::core::conversation_snapshot_bytes(view, ss, g, mtp.kv_state(), estimate, err)) {
std::fprintf(stderr, "strata serve: conversation cache: skip parking (%s)\n", err.c_str());
+ err.clear(); // A recoverable miss must not poison the batched draft prefill's error channel.
return true;
}
if (!conversations.make_room(estimate, held)) {
@@ -3846,6 +3847,7 @@ int main(int argc, char** argv) {
if (incoming && !strata::core::conversation_snapshot_validate(*incoming, ss, g, mtp.kv_state(), err)) {
std::fprintf(stderr, "strata serve: conversation cache: discard invalid snapshot (%s)\n", err.c_str());
incoming.reset();
+ err.clear();
}
// Preserve the outgoing branch before any checkpoint rewind, reset,
// or incoming restore overwrites the positional state it requires.