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

推荐订阅源

量子位
D
Docker
月光博客
月光博客
MongoDB | Blog
MongoDB | Blog
Vercel News
Vercel News
美团技术团队
博客园 - 叶小钗
I
InfoQ
Jina AI
Jina AI
博客园 - 司徒正美
雷峰网
雷峰网
B
Blog
Y
Y Combinator Blog
A
About on SuperTechFans
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Recent Announcements
Recent Announcements
V
V2EX
N
Netflix TechBlog - Medium

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: preserve watcher test state · openclaw/openclaw@338e119
shakkernerd · 2026-06-26 · via Recent Commits to openclaw:main

File tree

  • extensions/memory-core/src/memory

Original file line numberDiff line numberDiff line change

@@ -16,6 +16,19 @@ const createEmbeddingProviderMock = vi.hoisted(() =>

1616

providerUnavailableReason: "No embeddings provider available.",

1717

})),

1818

);

19+

const originalSelfHealStateDir = process.env.OPENCLAW_STATE_DIR;

20+
21+

function setSelfHealStateDir(stateDir: string): void {

22+

Reflect.set(process.env, "OPENCLAW_STATE_DIR", stateDir);

23+

}

24+
25+

function restoreSelfHealStateDir(): void {

26+

if (originalSelfHealStateDir === undefined) {

27+

Reflect.deleteProperty(process.env, "OPENCLAW_STATE_DIR");

28+

} else {

29+

Reflect.set(process.env, "OPENCLAW_STATE_DIR", originalSelfHealStateDir);

30+

}

31+

}

1932
2033

vi.mock("./embeddings.js", () => ({

2134

createEmbeddingProvider: createEmbeddingProviderMock,

@@ -49,7 +62,7 @@ describe("memory manager self-heal missing identity with FTS-only chunks", () =>

4962

workspaceDir = path.join(fixtureRoot, `case-${caseId++}`);

5063

await fs.mkdir(path.join(workspaceDir, "memory"), { recursive: true });

5164

await fs.writeFile(path.join(workspaceDir, "MEMORY.md"), "Alpha topic\n\nKeep this note.");

52-

vi.stubEnv("OPENCLAW_STATE_DIR", path.join(workspaceDir, "state"));

65+

setSelfHealStateDir(path.join(workspaceDir, "state"));

5366

indexPath = resolveOpenClawAgentSqlitePath({ agentId: "main" });

5467

});

5568

@@ -59,7 +72,7 @@ describe("memory manager self-heal missing identity with FTS-only chunks", () =>

5972

manager = null;

6073

}

6174

await closeAllMemorySearchManagers();

62-

vi.unstubAllEnvs();

75+

restoreSelfHealStateDir();

6376

});

6477
6578

afterAll(async () => {

Original file line numberDiff line numberDiff line change

@@ -121,6 +121,19 @@ const {

121121
122122

const CHOKIDAR_FACTORY_KEY = Symbol.for("openclaw.test.memoryWatchFactory");

123123

const NATIVE_FACTORY_KEY = Symbol.for("openclaw.test.memoryNativeWatchFactory");

124+

const originalWatcherStateDir = process.env.OPENCLAW_STATE_DIR;

125+
126+

function setWatcherStateDir(stateDir: string): void {

127+

Reflect.set(process.env, "OPENCLAW_STATE_DIR", stateDir);

128+

}

129+
130+

function restoreWatcherStateDir(): void {

131+

if (originalWatcherStateDir === undefined) {

132+

Reflect.deleteProperty(process.env, "OPENCLAW_STATE_DIR");

133+

} else {

134+

Reflect.set(process.env, "OPENCLAW_STATE_DIR", originalWatcherStateDir);

135+

}

136+

}

124137
125138

vi.mock("openclaw/plugin-sdk/memory-core-host-engine-foundation", async (importOriginal) => {

126139

const actual =

@@ -194,7 +207,7 @@ describe("memory watcher config", () => {

194207

}

195208

await closeAllMemorySearchManagers();

196209

clearRegistry();

197-

vi.unstubAllEnvs();

210+

restoreWatcherStateDir();

198211

if (workspaceDir) {

199212

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

200213

workspaceDir = "";

@@ -204,7 +217,7 @@ describe("memory watcher config", () => {

204217
205218

async function setupWatcherWorkspace(seedFile: { name: string; contents: string }) {

206219

workspaceDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-memory-watch-"));

207-

vi.stubEnv("OPENCLAW_STATE_DIR", path.join(workspaceDir, "state"));

220+

setWatcherStateDir(path.join(workspaceDir, "state"));

208221

extraDir = path.join(workspaceDir, "extra");

209222

await fs.mkdir(path.join(workspaceDir, "memory"), { recursive: true });

210223

await fs.mkdir(extraDir, { recursive: true });