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

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
T
Tor Project blog
U
Unit 42
G
Google Developers Blog
T
The Blog of Author Tim Ferriss
Recorded Future
Recorded Future
B
Blog
I
InfoQ
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
小众软件
小众软件
Spread Privacy
Spread Privacy
T
Tenable Blog
C
Cybersecurity and Infrastructure Security Agency CISA
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
I
Intezer
P
Proofpoint News Feed
A
About on SuperTechFans
S
Securelist
D
DataBreaches.Net
Security Latest
Security Latest
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
Know Your Adversary
Know Your Adversary
大猫的无限游戏
大猫的无限游戏
Cyberwarzone
Cyberwarzone
AWS News Blog
AWS News Blog
Engineering at Meta
Engineering at Meta
MyScale Blog
MyScale Blog
V
Visual Studio Blog
A
Arctic Wolf
Hugging Face - Blog
Hugging Face - Blog
Project Zero
Project Zero
博客园 - 司徒正美
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
Vercel News
Vercel News
T
Threatpost
博客园 - Franky
有赞技术团队
有赞技术团队
爱范儿
爱范儿
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
L
LINUX DO - 热门话题

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: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
test: clear config io broad matchers · openclaw/openclaw@3230314
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -106,6 +106,46 @@ describe("config io write", () => {

106106

return persisted.commands;

107107

};

108108109+

const requireRecord = (value: unknown, label: string): Record<string, unknown> => {

110+

if (!value || typeof value !== "object" || Array.isArray(value)) {

111+

throw new Error(`expected ${label} to be a record`);

112+

}

113+

return value as Record<string, unknown>;

114+

};

115+116+

const requireArray = (value: unknown, label: string): unknown[] => {

117+

if (!Array.isArray(value)) {

118+

throw new Error(`expected ${label} to be an array`);

119+

}

120+

return value;

121+

};

122+123+

const expectInstallRecord = (

124+

record: unknown,

125+

expected: { source: string; spec: string; installPath: string },

126+

) => {

127+

const actual = requireRecord(record, "plugin install record");

128+

expect(actual.source).toBe(expected.source);

129+

expect(actual.spec).toBe(expected.spec);

130+

expect(actual.installPath).toBe(expected.installPath);

131+

};

132+133+

const expectConfigWriteRejected = async (promise: Promise<unknown>) => {

134+

try {

135+

await promise;

136+

} catch (error) {

137+

expect(requireRecord(error, "config write rejection").code).toBe("CONFIG_WRITE_REJECTED");

138+

return;

139+

}

140+

throw new Error("expected config write rejection");

141+

};

142+143+

const expectPersistedHashResult = (result: unknown) => {

144+

const persistedHash = requireRecord(result, "config write result").persistedHash;

145+

expect(typeof persistedHash).toBe("string");

146+

expect(persistedHash).not.toBe("");

147+

};

148+109149

const createFastConfigIO = (home: string) =>

110150

createConfigIO({

111151

env: { OPENCLAW_TEST_FAST: "1" } as NodeJS.ProcessEnv,

@@ -155,8 +195,9 @@ describe("config io write", () => {

155195

logger: { warn, error: vi.fn() },

156196

});

157197158-

await expect(io.readConfigFileSnapshot()).resolves.toMatchObject({ exists: true });

159-

expect(io.loadConfig()).toMatchObject({ gateway: { mode: "local" } });

198+

const snapshot = await io.readConfigFileSnapshot();

199+

expect(snapshot.exists).toBe(true);

200+

expect(io.loadConfig().gateway).toEqual({ mode: "local" });

160201161202

expect(warn).toHaveBeenCalledWith(

162203

expect.stringContaining(

@@ -256,18 +297,18 @@ describe("config io write", () => {

256297

const initialRaw = await fs.readFile(configPath, "utf-8");

257298

const cfg = io.loadConfig();

258299259-

expect(cfg.plugins?.installs?.demo).toMatchObject({

300+

expectInstallRecord(cfg.plugins?.installs?.demo, {

260301

source: "npm",

261302

spec: "demo@1.0.0",

262303

installPath: pluginDir,

263304

});

264305

const snapshot = await io.readConfigFileSnapshot();

265-

expect(snapshot.sourceConfig.plugins?.installs?.demo).toMatchObject({

306+

expectInstallRecord(snapshot.sourceConfig.plugins?.installs?.demo, {

266307

source: "npm",

267308

spec: "demo@1.0.0",

268309

installPath: pluginDir,

269310

});

270-

expect(snapshot.runtimeConfig.plugins?.installs?.demo).toMatchObject({

311+

expectInstallRecord(snapshot.runtimeConfig.plugins?.installs?.demo, {

271312

source: "npm",

272313

spec: "demo@1.0.0",

273314

installPath: pluginDir,

@@ -350,25 +391,22 @@ describe("config io write", () => {

350391

},

351392

});

352393353-

await expect(

354-

readPersistedInstalledPluginIndex({

394+

const index = requireRecord(

395+

await readPersistedInstalledPluginIndex({

355396

stateDir: path.join(home, ".openclaw"),

356397

}),

357-

).resolves.toMatchObject({

358-

installRecords: {

359-

demo: {

360-

source: "npm",

361-

spec: "demo@1.0.0",

362-

installPath: pluginDir,

363-

},

364-

},

365-

plugins: [

366-

expect.objectContaining({

367-

pluginId: "demo",

368-

installRecordHash: expect.stringMatching(/^[a-f0-9]{64}$/u),

369-

}),

370-

],

398+

"persisted plugin index",

399+

);

400+

expectInstallRecord(requireRecord(index.installRecords, "install records").demo, {

401+

source: "npm",

402+

spec: "demo@1.0.0",

403+

installPath: pluginDir,

371404

});

405+

const plugins = requireArray(index.plugins, "plugin index plugins");

406+

expect(plugins).toHaveLength(1);

407+

const indexedPlugin = requireRecord(plugins[0], "indexed plugin");

408+

expect(indexedPlugin.pluginId).toBe("demo");

409+

expect(indexedPlugin.installRecordHash).toMatch(/^[a-f0-9]{64}$/u);

372410

const persistedConfig = JSON.parse(await fs.readFile(configPath, "utf-8")) as {

373411

plugins?: { installs?: unknown };

374412

};

@@ -415,20 +453,18 @@ describe("config io write", () => {

415453

},

416454

});

417455418-

await expect(

419-

readPersistedInstalledPluginIndex({

456+

const index = requireRecord(

457+

await readPersistedInstalledPluginIndex({

420458

stateDir: path.join(home, ".openclaw"),

421459

}),

422-

).resolves.toMatchObject({

423-

installRecords: {

424-

missing: {

425-

source: "npm",

426-

spec: "missing-plugin@1.0.0",

427-

installPath: pluginDir,

428-

},

429-

},

430-

plugins: [],

460+

"persisted plugin index",

461+

);

462+

expectInstallRecord(requireRecord(index.installRecords, "install records").missing, {

463+

source: "npm",

464+

spec: "missing-plugin@1.0.0",

465+

installPath: pluginDir,

431466

});

467+

expect(index.plugins).toEqual([]);

432468

const persistedConfig = JSON.parse(await fs.readFile(configPath, "utf-8")) as {

433469

plugins?: { installs?: unknown };

434470

};

@@ -464,7 +500,7 @@ describe("config io write", () => {

464500

await fs.writeFile(path.join(unwritableStatePath, "plugins"), "not a directory", "utf-8");

465501466502

const loadedConfig = io.loadConfig();

467-

expect(loadedConfig.plugins?.installs?.demo).toMatchObject({

503+

expectInstallRecord(loadedConfig.plugins?.installs?.demo, {

468504

source: "npm",

469505

spec: "demo@1.0.0",

470506

installPath: pluginDir,

@@ -478,7 +514,7 @@ describe("config io write", () => {

478514

);

479515480516

const persisted = JSON.parse(await fs.readFile(configPath, "utf-8")) as typeof original;

481-

expect(persisted.plugins.installs.demo).toMatchObject({

517+

expectInstallRecord(persisted.plugins.installs.demo, {

482518

source: "npm",

483519

spec: "demo@1.0.0",

484520

installPath: pluginDir,

@@ -512,7 +548,7 @@ describe("config io write", () => {

512548

);

513549514550

const persistedConfig = JSON.parse(await fs.readFile(configPath, "utf-8")) as typeof original;

515-

expect(persistedConfig.plugins.installs.demo).toMatchObject({

551+

expectInstallRecord(persistedConfig.plugins.installs.demo, {

516552

source: "npm",

517553

spec: "demo@1.0.0",

518554

installPath: pluginDir,

@@ -816,16 +852,14 @@ describe("config io write", () => {

816852

legacyIssues: [],

817853

} satisfies ConfigFileSnapshot;

818854819-

await expect(

855+

await expectConfigWriteRejected(

820856

io.writeConfigFile(

821857

{ update: { channel: "beta" } },

822858

{

823859

baseSnapshot,

824860

},

825861

),

826-

).rejects.toMatchObject({

827-

code: "CONFIG_WRITE_REJECTED",

828-

});

862+

);

829863830864

await expect(fs.readFile(configPath, "utf-8")).resolves.toBe(originalRaw);

831865

const entries = await fs.readdir(path.dirname(configPath));

@@ -872,29 +906,24 @@ describe("config io write", () => {

872906

legacyIssues: [],

873907

} satisfies ConfigFileSnapshot;

874908875-

await expect(

876-

io.writeConfigFile(

877-

{ meta: original.meta, gateway: { mode: "local" } },

878-

{

879-

allowConfigSizeDrop: true,

880-

baseSnapshot,

881-

},

882-

),

883-

).resolves.toMatchObject({

884-

persistedConfig: expect.objectContaining({ gateway: { mode: "local" } }),

885-

});

909+

const acceptedWrite = await io.writeConfigFile(

910+

{ meta: original.meta, gateway: { mode: "local" } },

911+

{

912+

allowConfigSizeDrop: true,

913+

baseSnapshot,

914+

},

915+

);

916+

expect(acceptedWrite.persistedConfig.gateway).toEqual({ mode: "local" });

886917887-

await expect(

918+

await expectConfigWriteRejected(

888919

io.writeConfigFile(

889920

{ meta: original.meta },

890921

{

891922

allowConfigSizeDrop: true,

892923

baseSnapshot,

893924

},

894925

),

895-

).rejects.toMatchObject({

896-

code: "CONFIG_WRITE_REJECTED",

897-

});

926+

);

898927

});

899928

});

900929

@@ -1059,8 +1088,8 @@ describe("config io write", () => {

10591088

logger: silentLogger,

10601089

});

106110901062-

await expect(

1063-

io.writeConfigFile({

1091+

expectPersistedHashResult(

1092+

await io.writeConfigFile({

10641093

agents: { list: [{ id: "main", default: true }] },

10651094

plugins: {

10661095

entries: {

@@ -1070,7 +1099,7 @@ describe("config io write", () => {

10701099

},

10711100

},

10721101

}),

1073-

).resolves.toMatchObject({ persistedHash: expect.any(String) });

1102+

);

10741103

});

1075110410761105

mockLoadPluginManifestRegistry.mockReturnValue({

@@ -1147,7 +1176,10 @@ describe("config io write", () => {

11471176

},

11481177

});

114911781150-

expect(JSON.parse(await fs.readFile(configPath, "utf-8"))).toEqual({

1179+

const persisted = JSON.parse(await fs.readFile(configPath, "utf-8")) as {

1180+

meta?: Record<string, unknown>;

1181+

};

1182+

expect(persisted).toEqual({

11511183

gateway: { mode: "local", port: 18789 },

11521184

models: {

11531185

providers: {

@@ -1159,10 +1191,12 @@ describe("config io write", () => {

11591191

},

11601192

},

11611193

meta: {

1162-

lastTouchedAt: expect.any(String),

1163-

lastTouchedVersion: expect.any(String),

1194+

lastTouchedAt: persisted.meta?.lastTouchedAt,

1195+

lastTouchedVersion: persisted.meta?.lastTouchedVersion,

11641196

},

11651197

});

1198+

expect(typeof persisted.meta?.lastTouchedAt).toBe("string");

1199+

expect(typeof persisted.meta?.lastTouchedVersion).toBe("string");

11661200

} finally {

11671201

if (previousConfigPath === undefined) {

11681202

delete process.env.OPENCLAW_CONFIG_PATH;

@@ -1227,24 +1261,21 @@ describe("config io write", () => {

12271261

agents: { defaults: { model: { primary: "openrouter/anthropic/claude-sonnet-4.6" } } },

12281262

});

122912631230-

expect(JSON.parse(await fs.readFile(configPath, "utf-8"))).toMatchObject({

1231-

gateway: {

1232-

auth: { token: "${OPENCLAW_GATEWAY_TOKEN}" },

1264+

const persisted = JSON.parse(await fs.readFile(configPath, "utf-8")) as {

1265+

gateway?: { auth?: { token?: string } };

1266+

};

1267+

expect(persisted.gateway?.auth?.token).toBe("${OPENCLAW_GATEWAY_TOKEN}");

1268+

expect(observedSources).toHaveLength(1);

1269+

const observedSource = requireRecord(observedSources[0], "observed source config");

1270+

expect(observedSource.gateway).toEqual({

1271+

mode: "local",

1272+

auth: { mode: "token", token: "gateway-token-runtime" },

1273+

});

1274+

expect(observedSource.agents).toEqual({

1275+

defaults: {

1276+

model: { primary: "openrouter/anthropic/claude-sonnet-4.6" },

12331277

},

12341278

});

1235-

expect(observedSources).toEqual([

1236-

expect.objectContaining({

1237-

gateway: {

1238-

mode: "local",

1239-

auth: { mode: "token", token: "gateway-token-runtime" },

1240-

},

1241-

agents: {

1242-

defaults: {

1243-

model: { primary: "openrouter/anthropic/claude-sonnet-4.6" },

1244-

},

1245-

},

1246-

}),

1247-

]);

12481279

} finally {

12491280

unsubscribe();

12501281

if (previousConfigPath === undefined) {