mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 03:30:29 +00:00
fix(agents): invalidate stale cli sessions on auth changes
This commit is contained in:
@@ -167,6 +167,7 @@ describe("updateSessionStoreAfterAgentRun", () => {
|
||||
sessionId: "claude-cli-session-1",
|
||||
cliSessionBinding: {
|
||||
sessionId: "claude-cli-session-1",
|
||||
authEpoch: "auth-epoch-1",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -181,11 +182,13 @@ describe("updateSessionStoreAfterAgentRun", () => {
|
||||
expect(second.sessionKey).toBe(first.sessionKey);
|
||||
expect(second.sessionEntry?.cliSessionBindings?.["claude-cli"]).toEqual({
|
||||
sessionId: "claude-cli-session-1",
|
||||
authEpoch: "auth-epoch-1",
|
||||
});
|
||||
|
||||
const persisted = loadSessionStore(storePath, { skipCache: true })[first.sessionKey!];
|
||||
expect(persisted?.cliSessionBindings?.["claude-cli"]).toEqual({
|
||||
sessionId: "claude-cli-session-1",
|
||||
authEpoch: "auth-epoch-1",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user