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

推荐订阅源

Y
Y Combinator Blog
GbyAI
GbyAI
爱范儿
爱范儿
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
M
MIT News - Artificial intelligence
量子位
宝玉的分享
宝玉的分享
MongoDB | Blog
MongoDB | Blog
V
Visual Studio Blog
罗磊的独立博客
F
Fortinet All Blogs
美团技术团队
博客园_首页
博客园 - 【当耐特】
L
LangChain Blog
月光博客
月光博客
腾讯CDC
The Cloudflare Blog
D
Docker
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

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: scope manager reindex state · openclaw/openclaw@e4f...
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

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

1818

providerUnavailableReason: "No embeddings provider available.",

1919

})),

2020

);

21+

const originalFtsOnlyStateDir = process.env.OPENCLAW_STATE_DIR;

22+
23+

function setFtsOnlyStateDir(stateDir: string): void {

24+

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

25+

}

26+
27+

function restoreFtsOnlyStateDir(): void {

28+

if (originalFtsOnlyStateDir === undefined) {

29+

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

30+

} else {

31+

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

32+

}

33+

}

2134
2235

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

2336

createEmbeddingProvider: createEmbeddingProviderMock,

@@ -44,7 +57,7 @@ describe("memory manager FTS-only reindex", () => {

4457

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

4558

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

4659

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

47-

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

60+

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

4861

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

4962

});

5063

@@ -54,7 +67,7 @@ describe("memory manager FTS-only reindex", () => {

5467

manager = null;

5568

}

5669

await closeAllMemorySearchManagers();

57-

vi.unstubAllEnvs();

70+

restoreFtsOnlyStateDir();

5871

});

5972
6073

afterAll(async () => {

Original file line numberDiff line numberDiff line change

@@ -13,6 +13,19 @@ import type { MemoryIndexMeta } from "./manager-reindex-state.js";

1313
1414

type SessionDeltaState = { lastSize: number; pendingBytes: number; pendingMessages: number };

1515

type SyncSessionParams = { needsFullReindex: boolean; targetSessionFiles?: string[] };

16+

const originalReindexStateDir = process.env.OPENCLAW_STATE_DIR;

17+
18+

function setReindexStateDir(stateDir: string): void {

19+

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

20+

}

21+
22+

function restoreReindexStateDir(): void {

23+

if (originalReindexStateDir === undefined) {

24+

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

25+

} else {

26+

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

27+

}

28+

}

1629
1730

type ReindexHarness = {

1831

sync: (params: { reason?: string; force?: boolean }) => Promise<void>;

@@ -42,11 +55,11 @@ describe("memory manager reindex recovery", () => {

4255

workspaceDir = path.join(fixtureRoot, "workspace");

4356

memoryDir = path.join(workspaceDir, "memory");

4457

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

45-

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

58+

setReindexStateDir(path.join(fixtureRoot, "state"));

4659

});

4760
4861

afterEach(async () => {

49-

vi.unstubAllEnvs();

62+

restoreReindexStateDir();

5063

vi.restoreAllMocks();

5164

if (manager) {

5265

await manager.close();