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

推荐订阅源

A
About on SuperTechFans
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
宝玉的分享
宝玉的分享
美团技术团队
量子位
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
爱范儿
爱范儿
J
Java Code Geeks
博客园 - Franky
Last Week in AI
Last Week in AI
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
GbyAI
GbyAI
Recent Announcements
Recent Announcements
小众软件
小众软件
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
MyScale Blog
MyScale 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: harden env helper lifecycle coverage · openclaw/ope...
shakkernerd · 2026-06-25 · via Recent Commits to openclaw:main

@@ -5,16 +5,18 @@ import {

55

captureEnv,

66

captureFullEnv,

77

createPathResolutionEnv,

8+

deleteTestEnvValue,

9+

setTestEnvValue,

810

withEnv,

911

withEnvAsync,

1012

withPathResolutionEnv,

1113

} from "./env.js";

12141315

function restoreEnvKey(key: string, previous: string | undefined): void {

1416

if (previous === undefined) {

15-

delete process.env[key];

17+

deleteTestEnvValue(key);

1618

} else {

17-

process.env[key] = previous;

19+

setTestEnvValue(key, previous);

1820

}

1921

}

2022

@@ -25,8 +27,8 @@ describe("env test utils", () => {

2527

const snapshot = captureEnv([keyA, keyB]);

2628

const prevA = process.env[keyA];

2729

const prevB = process.env[keyB];

28-

process.env[keyA] = "mutated";

29-

delete process.env[keyB];

30+

setTestEnvValue(keyA, "mutated");

31+

deleteTestEnvValue(keyB);

30323133

snapshot.restore();

3234

@@ -38,8 +40,8 @@ describe("env test utils", () => {

3840

const key = "OPENCLAW_ENV_TEST_ADDED";

3941

const prevHome = process.env.HOME;

4042

const snapshot = captureFullEnv();

41-

process.env[key] = "1";

42-

delete process.env.HOME;

43+

setTestEnvValue(key, "1");

44+

deleteTestEnvValue("HOME");

43454446

snapshot.restore();

4547

@@ -74,7 +76,7 @@ describe("env test utils", () => {

7476

it("withEnv can delete a key only inside callback", () => {

7577

const key = "OPENCLAW_ENV_TEST_SYNC_DELETE";

7678

const prev = process.env[key];

77-

process.env[key] = "outer";

79+

setTestEnvValue(key, "outer");

78807981

const seen = withEnv({ [key]: undefined }, () => process.env[key]);

8082

@@ -110,7 +112,7 @@ describe("env test utils", () => {

110112

it("withEnvAsync can delete a key only inside callback", async () => {

111113

const key = "OPENCLAW_ENV_TEST_ASYNC_DELETE";

112114

const prev = process.env[key];

113-

process.env[key] = "outer";

115+

setTestEnvValue(key, "outer");

114116115117

const seen = await withEnvAsync({ [key]: undefined }, async () => process.env[key]);

116118

@@ -125,9 +127,9 @@ describe("env test utils", () => {

125127

const previousOpenClawHome = process.env.OPENCLAW_HOME;

126128

const previousStateDir = process.env.OPENCLAW_STATE_DIR;

127129

const previousBundledDir = process.env.OPENCLAW_BUNDLED_PLUGINS_DIR;

128-

process.env.OPENCLAW_HOME = "/srv/openclaw-home";

129-

process.env.OPENCLAW_STATE_DIR = "/srv/openclaw-state";

130-

process.env.OPENCLAW_BUNDLED_PLUGINS_DIR = "/srv/openclaw-bundled";

130+

setTestEnvValue("OPENCLAW_HOME", "/srv/openclaw-home");

131+

setTestEnvValue("OPENCLAW_STATE_DIR", "/srv/openclaw-state");

132+

setTestEnvValue("OPENCLAW_BUNDLED_PLUGINS_DIR", "/srv/openclaw-bundled");

131133132134

try {

133135

const env = createPathResolutionEnv(homeDir, {

@@ -149,7 +151,7 @@ describe("env test utils", () => {

149151

const homeDir = path.join(path.sep, "tmp", "openclaw-home");

150152

const resolvedHomeDir = path.resolve(homeDir);

151153

const previousOpenClawHome = process.env.OPENCLAW_HOME;

152-

process.env.OPENCLAW_HOME = "/srv/openclaw-home";

154+

setTestEnvValue("OPENCLAW_HOME", "/srv/openclaw-home");

153155154156

try {

155157

const seen = withPathResolutionEnv(