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

推荐订阅源

WordPress大学
WordPress大学
A
About on SuperTechFans
量子位
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
Google DeepMind News
Google DeepMind News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog
U
Unit 42
D
DataBreaches.Net
博客园 - Franky
D
Docker
宝玉的分享
宝玉的分享
Y
Y Combinator Blog
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
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
test: speed up slow vitest hotspots · openclaw/openclaw@b...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -850,43 +850,62 @@ describe("gateway server misc", () => {

850850

if (!configPath) {

851851

throw new Error("Missing OPENCLAW_CONFIG_PATH");

852852

}

853-

await fs.mkdir(path.dirname(configPath), { recursive: true });

854-

await fs.writeFile(

855-

configPath,

856-

JSON.stringify(

857-

{

858-

channels: {

859-

discord: {

860-

token: "token-123",

853+

let previousConfig: string | undefined;

854+

try {

855+

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

856+

} catch (err) {

857+

if ((err as NodeJS.ErrnoException).code !== "ENOENT") {

858+

throw err;

859+

}

860+

}

861+862+

try {

863+

await fs.mkdir(path.dirname(configPath), { recursive: true });

864+

await fs.writeFile(

865+

configPath,

866+

JSON.stringify(

867+

{

868+

channels: {

869+

discord: {

870+

token: "token-123",

871+

},

861872

},

862873

},

863-

},

864-

null,

865-

2,

866-

),

867-

"utf-8",

868-

);

874+

null,

875+

2,

876+

),

877+

"utf-8",

878+

);

869879870-

await withEnvAsync(

871-

{

872-

OPENCLAW_TEST_MINIMAL_GATEWAY: undefined,

873-

OPENCLAW_DISABLE_BUNDLED_PLUGINS: undefined,

874-

OPENCLAW_BUNDLED_PLUGINS_DIR: path.resolve("extensions"),

875-

},

876-

async () => {

877-

const autoPort = await getFreePort();

878-

const autoServer = await startGatewayServer(autoPort);

879-

await autoServer.close();

880-

},

881-

);

880+

await withEnvAsync(

881+

{

882+

OPENCLAW_TEST_MINIMAL_GATEWAY: undefined,

883+

OPENCLAW_DISABLE_BUNDLED_PLUGINS: undefined,

884+

OPENCLAW_BUNDLED_PLUGINS_DIR: path.resolve("extensions"),

885+

},

886+

async () => {

887+

const autoPort = await getFreePort();

888+

const autoServer = await startGatewayServer(autoPort);

889+

await autoServer.close();

890+

},

891+

);

882892883-

const updated = JSON.parse(await fs.readFile(configPath, "utf-8")) as Record<string, unknown>;

884-

const channels = updated.channels as Record<string, unknown> | undefined;

885-

const discord = channels?.discord as Record<string, unknown> | undefined;

886-

expect(discord).toMatchObject({

887-

token: "token-123",

888-

enabled: true,

889-

});

893+

const updated = JSON.parse(await fs.readFile(configPath, "utf-8")) as Record<string, unknown>;

894+

const channels = updated.channels as Record<string, unknown> | undefined;

895+

const discord = channels?.discord as Record<string, unknown> | undefined;

896+

expect(discord).toMatchObject({

897+

token: "token-123",

898+

enabled: true,

899+

});

900+

} finally {

901+

if (previousConfig === undefined) {

902+

await fs.rm(configPath, { force: true });

903+

} else {

904+

await fs.writeFile(configPath, previousConfig, "utf-8");

905+

}

906+

clearRuntimeConfigSnapshot();

907+

clearConfigCache();

908+

}

890909

});

891910892911

test("releases port after close", async () => {