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

推荐订阅源

IT之家
IT之家
J
Java Code Geeks
小众软件
小众软件
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
C
Check Point Blog
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
腾讯CDC
T
The Blog of Author Tim Ferriss
大猫的无限游戏
大猫的无限游戏
量子位
M
MIT News - Artificial intelligence
Last Week in AI
Last Week in AI
L
LangChain 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
test(plugin-state): seed limit fixtures in one transactio...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -12,6 +12,7 @@ import {

1212

sweepExpiredPluginStateEntries,

1313

} from "./plugin-state-store.js";

1414

import { resolvePluginStateDir, resolvePluginStateSqlitePath } from "./plugin-state-store.paths.js";

15+

import { seedPluginStateEntriesForTests } from "./plugin-state-store.test-helpers.js";

15161617

afterEach(() => {

1718

vi.useRealTimers();

@@ -126,22 +127,38 @@ describe("plugin state keyed store", () => {

126127127128

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

128129

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

129-

const stores = Array.from({ length: 10 }, (_, index) =>

130-

createPluginStateKeyedStore("discord", {

131-

namespace: `ns-${index}`,

132-

maxEntries: 101,

133-

}),

134-

);

135-

for (let namespaceIndex = 0; namespaceIndex < stores.length; namespaceIndex += 1) {

136-

for (let entryIndex = 0; entryIndex < 100; entryIndex += 1) {

137-

await stores[namespaceIndex].register(`k-${entryIndex}`, { namespaceIndex, entryIndex });

138-

}

139-

}

130+

seedPluginStateEntriesForTests([

131+

...Array.from({ length: 999 }, (_, entryIndex) => ({

132+

pluginId: "discord",

133+

namespace: "limit",

134+

key: `k-${entryIndex}`,

135+

value: { namespaceIndex: 0, entryIndex },

136+

})),

137+

{

138+

pluginId: "discord",

139+

namespace: "sibling",

140+

key: "k-0",

141+

value: { namespaceIndex: 1, entryIndex: 0 },

142+

},

143+

]);

144+145+

const limitStore = createPluginStateKeyedStore("discord", {

146+

namespace: "limit",

147+

maxEntries: 1_001,

148+

});

149+

const siblingStore = createPluginStateKeyedStore("discord", {

150+

namespace: "sibling",

151+

maxEntries: 10,

152+

});

140153141-

await expect(stores[0].register("overflow", { overflow: true })).rejects.toMatchObject({

154+

await expect(limitStore.register("overflow", { overflow: true })).rejects.toMatchObject({

142155

code: "PLUGIN_STATE_LIMIT_EXCEEDED",

143156

});

144-

await expect(stores[1].lookup("k-0")).resolves.toEqual({ namespaceIndex: 1, entryIndex: 0 });

157+

await expect(siblingStore.lookup("k-0")).resolves.toEqual({

158+

namespaceIndex: 1,

159+

entryIndex: 0,

160+

});

161+

await expect(limitStore.lookup("overflow")).resolves.toBeUndefined();

145162

});

146163

});

147164