From dfe9ab163aec6a4a8fa9d6a18ab4c50f5b2660ff Mon Sep 17 00:00:00 2001 From: Marc J Saint-jour <82672745+Junebugg1214@users.noreply.github.com> Date: Thu, 12 Mar 2026 20:21:48 -0400 Subject: [PATCH] fix: avoid blocking gateway snapshots on cortex history reads --- src/agents/cortex-history.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/agents/cortex-history.test.ts b/src/agents/cortex-history.test.ts index f98332a0206..6a6002486f5 100644 --- a/src/agents/cortex-history.test.ts +++ b/src/agents/cortex-history.test.ts @@ -4,6 +4,7 @@ import path from "node:path"; import { afterEach, describe, expect, it, vi } from "vitest"; import { appendCortexCaptureHistory, + getCachedLatestCortexCaptureHistoryEntry, getLatestCortexCaptureHistoryEntry, getLatestCortexCaptureHistoryEntrySync, readRecentCortexCaptureHistory, @@ -68,6 +69,11 @@ describe("cortex capture history", () => { sessionId: "session-1", channelId: "channel-1", }); + const cachedEntry = getCachedLatestCortexCaptureHistoryEntry({ + agentId: "main", + sessionId: "session-1", + channelId: "channel-1", + }); const syncEntry = getLatestCortexCaptureHistoryEntrySync({ agentId: "main", sessionId: "session-1", @@ -76,6 +82,7 @@ describe("cortex capture history", () => { expect(asyncEntry?.timestamp).toBe(2_000); expect(asyncEntry?.syncedCodingContext).toBe(true); + expect(cachedEntry?.timestamp).toBe(2_000); expect(syncEntry?.timestamp).toBe(2_000); expect(syncEntry?.syncPlatforms).toEqual(["claude-code", "cursor", "copilot"]); });