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

推荐订阅源

博客园 - 聂微东
Y
Y Combinator Blog
WordPress大学
WordPress大学
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
A
About on SuperTechFans
小众软件
小众软件
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
Recent Announcements
Recent Announcements
GbyAI
GbyAI
I
InfoQ
The GitHub Blog
The GitHub Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
罗磊的独立博客
C
Check Point Blog
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
量子位
雷峰网
雷峰网
Hugging Face - Blog
Hugging Face - Blog

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: keep model-run pruning internal · openclaw/openclaw@...
jalehman · 2026-06-25 · via Recent Commits to openclaw:main

@@ -41,12 +41,7 @@ export type ResolvedSessionMaintenanceConfig = {

4141

mode: SessionMaintenanceMode;

4242

pruneAfterMs: number;

4343

maxEntries: number;

44-

// Optional so external plugin callers that construct a pre-#88632 maintenanceConfig

45-

// (without the model-run fields) still compile; the resolver always sets both, and all

46-

// internal readers treat an absent value as "unset" (model-run pruning disabled).

47-

modelRunPruneAfterMs?: number | null;

48-

/** True when modelRunPruneAfter was explicitly set instead of using the pressure-gated default. */

49-

modelRunPruneAfterConfigured?: boolean;

44+

modelRunPruneAfterMs: number;

5045

resetArchiveRetentionMs: number | null;

5146

maxDiskBytes: number | null;

5247

highWaterBytes: number | null;

@@ -84,24 +79,6 @@ function resolveResetArchiveRetentionMs(

8479

}

8580

}

868187-

function resolveModelRunPruneAfterMs(maintenance?: SessionMaintenanceConfig): number | null {

88-

const raw = maintenance?.modelRunPruneAfter;

89-

if (raw === false) {

90-

return null;

91-

}

92-

const normalized = normalizeStringifiedOptionalString(raw);

93-

if (!normalized) {

94-

return DEFAULT_MODEL_RUN_PRUNE_AFTER_MS;

95-

}

96-

try {

97-

return parseDurationMs(normalized, { defaultUnit: "d" });

98-

} catch {

99-

// The schema rejects invalid explicit values. Keep direct resolver callers fail-closed

100-

// rather than silently enabling the default 24h model-run cleanup.

101-

return null;

102-

}

103-

}

104-10582

function resolveMaxDiskBytes(maintenance?: SessionMaintenanceConfig): number | null {

10683

const raw = maintenance?.maxDiskBytes;

10784

const normalized = normalizeStringifiedOptionalString(raw);

@@ -163,8 +140,7 @@ export function resolveMaintenanceConfigFromInput(

163140

mode: maintenance?.mode ?? DEFAULT_SESSION_MAINTENANCE_MODE,

164141

pruneAfterMs,

165142

maxEntries: maintenance?.maxEntries ?? DEFAULT_SESSION_MAX_ENTRIES,

166-

modelRunPruneAfterMs: resolveModelRunPruneAfterMs(maintenance),

167-

modelRunPruneAfterConfigured: maintenance?.modelRunPruneAfter !== undefined,

143+

modelRunPruneAfterMs: DEFAULT_MODEL_RUN_PRUNE_AFTER_MS,

168144

resetArchiveRetentionMs: resolveResetArchiveRetentionMs(maintenance, pruneAfterMs),

169145

maxDiskBytes,

170146

highWaterBytes: resolveHighWaterBytes(maintenance, maxDiskBytes),

@@ -198,24 +174,15 @@ export function shouldRunSessionEntryMaintenance(params: {

198174

}

199175200176

export function shouldRunModelRunPrune(params: {

201-

maintenance: Pick<

202-

ResolvedSessionMaintenanceConfig,

203-

"maxEntries" | "modelRunPruneAfterConfigured" | "modelRunPruneAfterMs"

204-

>;

177+

maintenance: Pick<ResolvedSessionMaintenanceConfig, "maxEntries">;

205178

entryCount: number;

206179

/**

207180

* True when the caller caps immediately to `maxEntries` in the same pass (forced

208181

* maintenance / `sessions cleanup`) rather than using the batched high-water trigger.

209182

*/

210183

force?: boolean;

211184

}): boolean {

212-

if (params.maintenance.modelRunPruneAfterMs == null) {

213-

return false;

214-

}

215-

if (params.maintenance.modelRunPruneAfterConfigured) {

216-

return true;

217-

}

218-

// Unset default is pressure-gated, and must align with whichever cap step runs alongside it.

185+

// Model-run cleanup is pressure-gated, and must align with whichever cap step runs alongside it.

219186

// Forced maintenance caps immediately down to `maxEntries`, so prune stale probes first whenever

220187

// that cap would actually evict; otherwise stale probes would survive while real sessions get

221188

// capped (the inverse of #88632). Batched runtime writes instead use the high-water trigger.