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

推荐订阅源

有赞技术团队
有赞技术团队
Martin Fowler
Martin Fowler
N
Netflix TechBlog - Medium
WordPress大学
WordPress大学
罗磊的独立博客
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
Docker
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
I
InfoQ
J
Java Code Geeks
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
美团技术团队
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
C
Check Point 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(plugin-state): preserve fresh evicted entries · openc...
vincentkoc · 2026-05-04 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -61,6 +61,7 @@ Docs: https://docs.openclaw.ai

6161
6262

### Fixes

6363
64+

- Plugins/runtime state: keep the key being registered when namespace eviction runs in the same millisecond as existing entries, so `register` and `registerIfAbsent` do not report success while evicting their own fresh value. Thanks @vincentkoc.

6465

- Control UI/Talk: make failed Talk startup errors dismissable and clear the stale Talk error state when dismissed, so missing realtime voice provider configuration does not leave a permanent chat banner. Fixes #77071. Thanks @ijoshdavis.

6566

- Control UI/Talk: stop and clear failed realtime Talk sessions when dismissing runtime error banners, so the next Talk click starts a fresh session instead of only stopping the stale one. Thanks @vincentkoc.

6667

- Control UI/Talk: retry from a failed realtime Talk session on the next Talk click instead of requiring a separate stale-session stop click first. Thanks @vincentkoc.

Original file line numberDiff line numberDiff line change

@@ -259,6 +259,7 @@ function createStatements(db: DatabaseSync): PluginStateStatements {

259259

FROM plugin_state_entries

260260

WHERE plugin_id = ?

261261

AND namespace = ?

262+

AND entry_key <> ?

262263

AND (expires_at IS NULL OR expires_at > ?)

263264

ORDER BY created_at ASC, entry_key ASC

264265

LIMIT ?

@@ -387,6 +388,7 @@ function enforcePostRegisterLimits(params: {

387388

namespace: string;

388389

maxEntries: number;

389390

now: number;

391+

protectedKey: string;

390392

}): void {

391393

const namespaceCount = countRow(

392394

params.store.statements.countLiveNamespace.get(

@@ -399,6 +401,7 @@ function enforcePostRegisterLimits(params: {

399401

params.store.statements.deleteOldestNamespace.run(

400402

params.pluginId,

401403

params.namespace,

404+

params.protectedKey,

402405

params.now,

403406

namespaceCount - params.maxEntries,

404407

);

@@ -446,6 +449,7 @@ export function pluginStateRegister(params: {

446449

namespace: params.namespace,

447450

maxEntries: params.maxEntries,

448451

now,

452+

protectedKey: params.key,

449453

});

450454

});

451455

} catch (error) {

@@ -488,6 +492,7 @@ export function pluginStateRegisterIfAbsent(params: {

488492

namespace: params.namespace,

489493

maxEntries: params.maxEntries,

490494

now,

495+

protectedKey: params.key,

491496

});

492497

return true;

493498

});

Original file line numberDiff line numberDiff line change

@@ -264,6 +264,40 @@ describe("plugin state keyed store", () => {

264264

});

265265

});

266266
267+

it("keeps the just-registered key when namespace eviction timestamps tie", async () => {

268+

await withOpenClawTestState({ label: "plugin-state-eviction-tie-register" }, async () => {

269+

vi.useFakeTimers();

270+

vi.setSystemTime(1000);

271+

const store = createPluginStateKeyedStore<number>("discord", {

272+

namespace: "evict-tie-register",

273+

maxEntries: 1,

274+

});

275+
276+

await store.register("z", 1);

277+

await store.register("a", 2);

278+
279+

await expect(store.entries()).resolves.toMatchObject([{ key: "a", value: 2 }]);

280+

await expect(store.lookup("z")).resolves.toBeUndefined();

281+

});

282+

});

283+
284+

it("keeps a same-millisecond registerIfAbsent claim during namespace eviction", async () => {

285+

await withOpenClawTestState({ label: "plugin-state-eviction-tie-claim" }, async () => {

286+

vi.useFakeTimers();

287+

vi.setSystemTime(1000);

288+

const store = createPluginStateKeyedStore<number>("discord", {

289+

namespace: "evict-tie-claim",

290+

maxEntries: 1,

291+

});

292+
293+

await expect(store.registerIfAbsent("z", 1)).resolves.toBe(true);

294+

await expect(store.registerIfAbsent("a", 2)).resolves.toBe(true);

295+
296+

await expect(store.entries()).resolves.toMatchObject([{ key: "a", value: 2 }]);

297+

await expect(store.lookup("z")).resolves.toBeUndefined();

298+

});

299+

});

300+
267301

it("rejects when the per-plugin live row ceiling would be exceeded without evicting siblings", async () => {

268302

await withOpenClawTestState({ label: "plugin-state-plugin-limit" }, async () => {

269303

seedPluginStateEntriesForTests([