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

推荐订阅源

博客园_首页
J
Java Code Geeks
博客园 - 聂微东
量子位
C
Check Point Blog
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
B
Blog
罗磊的独立博客
腾讯CDC
GbyAI
GbyAI
博客园 - 【当耐特】
A
About on SuperTechFans
M
MIT News - Artificial intelligence
U
Unit 42
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队

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(memory): clamp batch timeout minutes · openclaw/openc...
steipete · 2026-05-31 · via Recent Commits to openclaw:main

File tree

  • extensions/memory-core/src/memory

Original file line numberDiff line numberDiff line change

@@ -35,10 +35,16 @@ class IntervalSyncHarness extends MemoryManagerSyncOps {

3535

protected providerLifecycle = { mode: "active" as const, providerId: "test" };

3636

protected db = {} as DatabaseSync;

3737
38-

constructor(intervalMinutes: number) {

38+

constructor(params: { intervalMinutes?: number; batchTimeoutMinutes?: number }) {

3939

super();

4040

this.settings = {

41-

sync: { intervalMinutes },

41+

sync: { intervalMinutes: params.intervalMinutes ?? 0 },

42+

remote: {

43+

batch: {

44+

enabled: true,

45+

timeoutMinutes: params.batchTimeoutMinutes,

46+

},

47+

},

4248

} as ResolvedMemorySearchConfig;

4349

}

4450

@@ -53,6 +59,10 @@ class IntervalSyncHarness extends MemoryManagerSyncOps {

5359

}

5460

}

5561
62+

batchConfig(): ReturnType<MemoryManagerSyncOps["resolveBatchConfig"]> {

63+

return this.resolveBatchConfig();

64+

}

65+
5666

protected computeProviderKey(): string {

5767

return "test";

5868

}

@@ -85,11 +95,19 @@ describe("MemoryManagerSyncOps interval sync", () => {

8595

it("clamps oversized interval sync timers", () => {

8696

vi.useFakeTimers();

8797

const setIntervalSpy = vi.spyOn(globalThis, "setInterval");

88-

const harness = new IntervalSyncHarness(Number.MAX_SAFE_INTEGER);

98+

const harness = new IntervalSyncHarness({ intervalMinutes: Number.MAX_SAFE_INTEGER });

8999
90100

harness.arm();

91101
92102

expect(setIntervalSpy).toHaveBeenCalledWith(expect.any(Function), MAX_TIMER_TIMEOUT_MS);

93103

harness.stop();

94104

});

105+
106+

it("clamps oversized batch timeout minutes", () => {

107+

const harness = new IntervalSyncHarness({

108+

batchTimeoutMinutes: Number.MAX_SAFE_INTEGER,

109+

});

110+
111+

expect(harness.batchConfig().timeoutMs).toBe(MAX_TIMER_TIMEOUT_MS);

112+

});

95113

});

Original file line numberDiff line numberDiff line change

@@ -1568,7 +1568,7 @@ export abstract class MemoryManagerSyncOps {

15681568

wait: batch?.wait ?? true,

15691569

concurrency: Math.max(1, batch?.concurrency ?? 2),

15701570

pollIntervalMs: batch?.pollIntervalMs ?? 2000,

1571-

timeoutMs: (batch?.timeoutMinutes ?? 60) * 60 * 1000,

1571+

timeoutMs: resolveTimerTimeoutMs((batch?.timeoutMinutes ?? 60) * 60 * 1000, 60 * 60_000),

15721572

};

15731573

}

15741574