fix(test): keep CLI hook context out of history assertion (#129768)

This commit is contained in:
Dallin Romney
2026-08-26 09:31:14 -07:00
committed by GitHub
parent 3e9edd9692
commit babde7b7d0
+3 -1
View File
@@ -745,7 +745,9 @@ describeLive("gateway live (cli backend)", () => {
sessionId?: string;
}>("chat.history", { sessionKey });
const cliSessionId = resolveImportedClaudeCliSessionId(nativeHistory.messages ?? []);
expect(JSON.stringify(nativeHistory.messages ?? [])).toContain(memoryToken);
// Hook-only runtime context belongs to the provider session, not the operator-visible
// transcript. The resumed reply below proves that the live provider retained it.
expect(JSON.stringify(nativeHistory.messages ?? [])).not.toContain(memoryToken);
expect(cliSessionId).toBeTruthy();
const continuitySessionId = nativeHistory.sessionId;
expect(continuitySessionId).toBeTruthy();