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

推荐订阅源

腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
D
DataBreaches.Net
D
Docker
云风的 BLOG
云风的 BLOG
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
罗磊的独立博客
Martin Fowler
Martin Fowler
U
Unit 42
Engineering at Meta
Engineering at Meta
IT之家
IT之家
Vercel News
Vercel News
B
Blog RSS Feed
人人都是产品经理
人人都是产品经理
博客园 - Franky
博客园 - 【当耐特】
Stack Overflow Blog
Stack Overflow Blog
G
Google Developers Blog
MongoDB | Blog
MongoDB | 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
fix(memory-wiki): retry transient source-page rewrite rac...
ZengWen-DT · 2026-06-23 · via Recent Commits to openclaw:main

@@ -20,6 +20,7 @@ import {

2020

WIKI_RELATED_START_MARKER,

2121

} from "./markdown.js";

2222

import { resolveMemoryWikiTimestamp } from "./time.js";

23+

import { isRegularFileStat, writeGuardedVaultPage } from "./vault-page-write.js";

2324

import { initializeMemoryWikiVault } from "./vault.js";

24252526

const OKF_RESERVED_FILENAMES = new Set(["index.md", "log.md"]);

@@ -32,11 +33,6 @@ const OKF_RELATED_SECTION_PATTERN = new RegExp(

3233

const OKF_VOLATILE_TIMESTAMP_LINE_PATTERN = /^(?:importedAt|updatedAt): .*\n/gm;

3334

const OKF_HASH_CHARS = 8;

343535-

type FileStatLike = {

36-

isFile?: unknown;

37-

nlink?: unknown;

38-

};

39-4036

type OkfConceptDocument = {

4137

conceptId: string;

4238

relativePath: string;

@@ -88,18 +84,6 @@ function trimMarkdownExtension(value: string): string {

8884

return value.replace(/\.md$/i, "");

8985

}

908691-

function isRegularFileStat(value: unknown): value is FileStatLike & { nlink: number } {

92-

if (!value || typeof value !== "object") {

93-

return false;

94-

}

95-

const stat = value as FileStatLike;

96-

const isFile =

97-

typeof stat.isFile === "function"

98-

? (stat.isFile as () => boolean).call(stat)

99-

: stat.isFile === true;

100-

return isFile && typeof stat.nlink === "number";

101-

}

102-10387

type OkfBundleMetadata = {

10488

key: string;

10589

version?: string;

@@ -344,11 +328,12 @@ function safeDecodeOkfLinkPath(value: string | undefined): string {

344328

function getMarkdownDestinationSuffix(destination: string): string {

345329

const queryIndex = destination.indexOf("?");

346330

const fragmentIndex = destination.indexOf("#");

347-

const suffixIndex = queryIndex === -1

348-

? fragmentIndex

349-

: fragmentIndex === -1

350-

? queryIndex

351-

: Math.min(queryIndex, fragmentIndex);

331+

const suffixIndex =

332+

queryIndex === -1

333+

? fragmentIndex

334+

: fragmentIndex === -1

335+

? queryIndex

336+

: Math.min(queryIndex, fragmentIndex);

352337

return suffixIndex === -1 ? "" : destination.slice(suffixIndex);

353338

}

354339

@@ -481,25 +466,13 @@ async function writeOkfConceptPage(params: {

481466

) {

482467

return { changed: false, created: !pageStat };

483468

}

484-

try {

485-

if (isRegularFileStat(pageStat) && pageStat.nlink > 1) {

486-

await vault.remove(params.pagePath);

487-

}

488-

await vault.write(params.pagePath, params.content);

489-

} catch (error) {

490-

if (error instanceof FsSafeError) {

491-

if (error.code !== "symlink" && error.code !== "path-alias") {

492-

throw new Error(

493-

`Refusing to write OKF concept page (${error.code}): ${params.pagePath}: ${error.message}`,

494-

{ cause: error },

495-

);

496-

}

497-

throw new Error(`Refusing to write OKF concept page through symlink: ${params.pagePath}`, {

498-

cause: error,

499-

});

500-

}

501-

throw error;

502-

}

469+

await writeGuardedVaultPage({

470+

vault,

471+

pagePath: params.pagePath,

472+

content: params.content,

473+

pageStat,

474+

pageLabel: "OKF concept page",

475+

});

503476

return { changed: true, created: !pageStat };

504477

}

505478