Tighten extraction persistence success gating

This commit is contained in:
Youzini-afk
2026-04-10 00:01:30 +08:00
parent bdaead8876
commit 8bf01e6ff3
2 changed files with 52 additions and 5 deletions

View File

@@ -6505,7 +6505,11 @@ function updateProcessedHistorySnapshot(chat, lastProcessedAssistantFloor) {
function shouldAdvanceProcessedHistory(batchStatus) {
if (!batchStatus || typeof batchStatus !== "object") return false;
return batchStatus?.stages?.core?.outcome === "success";
return (
batchStatus?.stages?.core?.outcome === "success" &&
batchStatus?.stages?.finalize?.outcome === "success" &&
batchStatus?.completed === true
);
}
function computePostProcessArtifacts(