From f3072a95e61a29c16c9470646074ebb4c5202418 Mon Sep 17 00:00:00 2001 From: Jeremiah Ritchey <44681828+jeremiahritchey@users.noreply.github.com> Date: Tue, 29 Sep 2026 21:53:45 +0000 Subject: [PATCH] Clear recoverable snapshot errors before batched draft prefill --- .../shared-conversation-upstream-validation.md | 13 +++++++++++-- src/program/generate.cpp | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/plans/shared-conversation-upstream-validation.md b/docs/plans/shared-conversation-upstream-validation.md index 5aa0ac79..6ae00dab 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 a2bb0d13..7ee627be 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.