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

推荐订阅源

MyScale Blog
MyScale Blog
J
Java Code Geeks
Vercel News
Vercel News
A
About on SuperTechFans
G
Google Developers Blog
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
博客园 - 司徒正美
S
SegmentFault 最新的问题
D
DataBreaches.Net
博客园_首页
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
量子位
雷峰网
雷峰网
IT之家
IT之家
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
博客园 - 三生石上(FineUI控件)
H
Help Net Security
宝玉的分享
宝玉的分享
博客园 - 叶小钗

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(memory-wiki): preserve fs-safe write diagnostics (#83...
clawsweeper · 2026-05-19 · via Recent Commits to openclaw:main

@@ -346,6 +346,80 @@ describe("syncMemoryWikiBridgeSources", () => {

346346

await expect(fs.readFile(externalTarget, "utf8")).resolves.toBe("external target\n");

347347

});

348348349+

async function createDirectoryCollisionFixture(params: {

350+

workspaceName: string;

351+

vaultName: string;

352+

populateDirectory?: boolean;

353+

}) {

354+

const workspaceDir = await createBridgeWorkspace(params.workspaceName);

355+

const { rootDir: vaultDir, config } = await createVault({

356+

rootDir: nextCaseRoot(params.vaultName),

357+

config: {

358+

vaultMode: "bridge",

359+

bridge: {

360+

enabled: true,

361+

readMemoryArtifacts: true,

362+

indexMemoryRoot: true,

363+

},

364+

},

365+

});

366+

const memoryPath = path.join(workspaceDir, "MEMORY.md");

367+

await fs.writeFile(memoryPath, "# Durable Memory\n", "utf8");

368+

registerBridgeArtifacts([

369+

{

370+

kind: "memory-root",

371+

workspaceDir,

372+

relativePath: "MEMORY.md",

373+

absolutePath: memoryPath,

374+

agentIds: ["main"],

375+

contentType: "markdown",

376+

},

377+

]);

378+

const appConfig: OpenClawConfig = {

379+

agents: {

380+

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

381+

},

382+

};

383+

const first = await syncMemoryWikiBridgeSources({ config, appConfig });

384+

const pagePath = first.pagePaths[0] ?? "";

385+

const pageAbsPath = path.join(vaultDir, pagePath);

386+

await fs.rm(pageAbsPath);

387+

await fs.mkdir(pageAbsPath);

388+

if (params.populateDirectory) {

389+

await fs.writeFile(path.join(pageAbsPath, "child.md"), "blocking child\n", "utf8");

390+

}

391+

await fs.writeFile(memoryPath, "# Updated Durable Memory\n", "utf8");

392+

return { appConfig, config, pageAbsPath };

393+

}

394+395+

it("reports non-symlink bridge source write safety failures without symlink wording", async () => {

396+

const { appConfig, config } = await createDirectoryCollisionFixture({

397+

workspaceName: "not-file-workspace",

398+

vaultName: "not-file-vault",

399+

populateDirectory: true,

400+

});

401+402+

const second = syncMemoryWikiBridgeSources({ config, appConfig });

403+

await expect(second).rejects.toThrow(

404+

/Refusing to write imported source page \((not-empty|not-file|path-mismatch)\): sources\//u,

405+

);

406+

await expect(second).rejects.not.toThrow("through symlink");

407+

});

408+409+

it("does not remove empty directory bridge source collisions as hardlinks", async () => {

410+

const { appConfig, config, pageAbsPath } = await createDirectoryCollisionFixture({

411+

workspaceName: "empty-directory-workspace",

412+

vaultName: "empty-directory-vault",

413+

});

414+415+

const second = syncMemoryWikiBridgeSources({ config, appConfig });

416+

await expect(second).rejects.toThrow(

417+

/Refusing to write imported source page \((not-file|path-mismatch)\): sources\//u,

418+

);

419+

await expect(second).rejects.not.toThrow("through symlink");

420+

await expect(fs.stat(pageAbsPath)).resolves.toSatisfy((stat) => stat.isDirectory());

421+

});

422+349423

it("replaces bridge source page hardlinks without clobbering their target", async () => {

350424

const workspaceDir = await createBridgeWorkspace("hardlink-workspace");

351425

const { rootDir: vaultDir, config } = await createVault({