From 966f21211d59e372dfd4d393531ef7d3c00a2492 Mon Sep 17 00:00:00 2001 From: "CJACK." <155826701+CJackHwang@users.noreply.github.com> Date: Thu, 30 Apr 2026 02:31:06 +0800 Subject: [PATCH] Fix nil-session guard in chat history test --- internal/httpapi/openai/chat/chat_history_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/httpapi/openai/chat/chat_history_test.go b/internal/httpapi/openai/chat/chat_history_test.go index 3ed8fed..2201f0f 100644 --- a/internal/httpapi/openai/chat/chat_history_test.go +++ b/internal/httpapi/openai/chat/chat_history_test.go @@ -126,6 +126,7 @@ func TestStartChatHistoryRecoversFromTransientWriteFailure(t *testing.T) { session := startChatHistory(historyStore, req, a, stdReq) if session == nil { t.Fatalf("expected session even when initial persistence fails") + return } if session.disabled { t.Fatalf("expected session to remain active after transient start failure")