惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
IT之家
IT之家
Google DeepMind News
Google DeepMind News
D
Docker
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 【当耐特】
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
月光博客
月光博客
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(sessions): keep plugin SDK maintenanceConfig backward...
2026-06-25 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -166,6 +166,65 @@ describe("session-store-runtime compatibility surface", () => {

166166

expect(getSessionEntry({ sessionKey: staleSessionKey, storePath })).toBeUndefined();

167167

});

168168
169+

it("accepts a pre-#88632 maintenanceConfig without the model-run fields", async () => {

170+

// Backward-compatibility guard: external plugin callers built `maintenanceConfig`

171+

// before `modelRunPruneAfterMs` / `modelRunPruneAfterConfigured` existed. That old

172+

// shape must still compile (the fields are optional) and behave as before — no

173+

// model-run-specific pruning.

174+

const staleModelRunKey = "agent:main:explicit:model-run-123e4567-e89b-12d3-a456-426614174000";

175+

const activeSessionKey = "agent:main:active";

176+

const now = Date.now();

177+

await saveSessionStore(

178+

storePath,

179+

{

180+

// A gateway model-run probe older than the 24h model-run window but well within the

181+

// 7d generic pruneAfter cutoff, so only model-run-specific pruning could remove it.

182+

[staleModelRunKey]: {

183+

sessionId: "session-probe",

184+

updatedAt: now - 2 * DAY_MS,

185+

},

186+

[activeSessionKey]: {

187+

sessionId: "session-active",

188+

updatedAt: now,

189+

},

190+

},

191+

{ skipMaintenance: true },

192+

);

193+
194+

// Note: intentionally NO modelRunPruneAfterMs / modelRunPruneAfterConfigured (old shape),

195+

// and maxEntries high enough that there is NO cap pressure.

196+

const legacyMaintenanceConfig = {

197+

mode: "enforce" as const,

198+

pruneAfterMs: 7 * DAY_MS,

199+

maxEntries: 500,

200+

resetArchiveRetentionMs: 7 * DAY_MS,

201+

maxDiskBytes: null,

202+

highWaterBytes: null,

203+

};

204+
205+

await expect(

206+

patchSessionEntry({

207+

sessionKey: activeSessionKey,

208+

storePath,

209+

maintenanceConfig: legacyMaintenanceConfig,

210+

update: () => ({ model: "gpt-5.5" }),

211+

}),

212+

).resolves.toMatchObject({

213+

model: "gpt-5.5",

214+

sessionId: "session-active",

215+

});

216+
217+

// The old-shape config disables model-run pruning, so the stale probe survives

218+

// (no model-run field => disabled; no cap pressure => nothing capped).

219+

expect(getSessionEntry({ sessionKey: staleModelRunKey, storePath })).toMatchObject({

220+

sessionId: "session-probe",

221+

});

222+

expect(getSessionEntry({ sessionKey: activeSessionKey, storePath })).toMatchObject({

223+

model: "gpt-5.5",

224+

sessionId: "session-active",

225+

});

226+

});

227+
169228

it("keeps deprecated whole-store mutations grouped as one compatibility operation", async () => {

170229

const firstSessionKey = "agent:main:first";

171230

const secondSessionKey = "agent:main:second";