mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 18:41:24 +00:00
fix(gateway): invalidate bootstrap cache on session rollover (openclaw#38535)
Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: yfge <1186273+yfge@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import crypto from "node:crypto";
|
||||
import { clearBootstrapSnapshotOnSessionRollover } from "../../agents/bootstrap-cache.js";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
import {
|
||||
evaluateSessionFreshness,
|
||||
@@ -58,6 +59,11 @@ export function resolveCronSession(params: {
|
||||
systemSent = false;
|
||||
}
|
||||
|
||||
clearBootstrapSnapshotOnSessionRollover({
|
||||
sessionKey: params.sessionKey,
|
||||
previousSessionId: isNewSession ? entry?.sessionId : undefined,
|
||||
});
|
||||
|
||||
const sessionEntry: SessionEntry = {
|
||||
// Preserve existing per-session overrides even when rolling to a new sessionId.
|
||||
...entry,
|
||||
|
||||
Reference in New Issue
Block a user