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

推荐订阅源

博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
罗磊的独立博客
The GitHub Blog
The GitHub Blog
L
LangChain Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
DataBreaches.Net
宝玉的分享
宝玉的分享
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
N
Netflix TechBlog - Medium
The Cloudflare Blog
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
美团技术团队
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
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(proxy): preserve migration compatibility · openclaw/o...
vincentkoc · 2026-06-19 · via Recent Commits to openclaw:main

@@ -24,6 +24,7 @@ type LegacyCaptureSessionRow = {

2424

source_scope: string;

2525

source_process: string;

2626

proxy_url: string | null;

27+

blob_dir: string;

2728

};

28292930

type LegacyCaptureEventRow = {

@@ -153,6 +154,7 @@ function readLegacyDebugProxyCapture(params: { sourcePath: string; blobDir: stri

153154

sessions: LegacyCaptureSessionRow[];

154155

events: LegacyCaptureEventRow[];

155156

blobs: LegacyCaptureBlobRow[];

157+

blobDirs: string[];

156158

} {

157159

const sqlite = requireNodeSqlite();

158160

const db = new sqlite.DatabaseSync(params.sourcePath, { readOnly: true });

@@ -192,7 +194,7 @@ function readLegacyDebugProxyCapture(params: { sourcePath: string; blobDir: stri

192194

]);

193195

const sessions = db

194196

.prepare(

195-

`SELECT id, started_at, ended_at, mode, source_scope, source_process, proxy_url

197+

`SELECT id, started_at, ended_at, mode, source_scope, source_process, proxy_url, blob_dir

196198

FROM capture_sessions

197199

ORDER BY started_at ASC, id ASC`,

198200

)

@@ -220,6 +222,7 @@ function readLegacyDebugProxyCapture(params: { sourcePath: string; blobDir: stri

220222

source_scope: event.source_scope,

221223

source_process: event.source_process,

222224

proxy_url: null,

225+

blob_dir: params.blobDir,

223226

});

224227

sessionIds.add(event.session_id);

225228

}

@@ -233,15 +236,33 @@ function readLegacyDebugProxyCapture(params: { sourcePath: string; blobDir: stri

233236

rows.push(event);

234237

blobEvents.set(event.data_blob_id, rows);

235238

}

239+

const blobDirBySession = new Map(

240+

sessions.map((session) => [session.id, session.blob_dir] as const),

241+

);

242+

const usedBlobDirs = new Set<string>();

236243

const blobs: LegacyCaptureBlobRow[] = [];

237244

for (const [blobId, referencingEvents] of blobEvents) {

238-

const blobPath = path.join(params.blobDir, `${blobId}.bin.gz`);

245+

const candidateBlobDirs = [

246+

...new Set(

247+

[

248+

...referencingEvents.map(

249+

(event) => blobDirBySession.get(event.session_id) ?? params.blobDir,

250+

),

251+

params.blobDir,

252+

],

253+

),

254+

];

255+

const blobPath =

256+

candidateBlobDirs

257+

.map((blobDir) => path.join(blobDir, `${blobId}.bin.gz`))

258+

.find(fileExists) ?? path.join(candidateBlobDirs[0] ?? params.blobDir, `${blobId}.bin.gz`);

239259

const data = fs.readFileSync(blobPath);

240260

const raw = gunzipSync(data);

241261

const sha256 = createHash("sha256").update(raw).digest("hex");

242262

if (sha256.slice(0, 24) !== blobId) {

243263

throw new Error(`legacy debug proxy blob hash mismatch: ${blobPath}`);

244264

}

265+

usedBlobDirs.add(path.dirname(blobPath));

245266

blobs.push({

246267

blobId,

247268

contentType: referencingEvents.find((event) => event.content_type)?.content_type ?? null,

@@ -254,7 +275,7 @@ function readLegacyDebugProxyCapture(params: { sourcePath: string; blobDir: stri

254275

),

255276

});

256277

}

257-

return { sessions, events, blobs };

278+

return { sessions, events, blobs, blobDirs: [...usedBlobDirs] };

258279

} finally {

259280

db.close();

260281

}

@@ -519,6 +540,14 @@ export function migrateLegacyDebugProxyCaptureSidecar(params: {

519540

archiveLegacyDebugProxySqlite({ sourcePath: detected.sourcePath, changes, warnings });

520541

if (!fileExists(detected.sourcePath) && fileExists(`${detected.sourcePath}.migrated`)) {

521542

archiveLegacyDebugProxyBlobs({ blobDir: detected.blobDir, changes, warnings });

543+

for (const blobDir of legacy.blobDirs) {

544+

if (path.resolve(blobDir) === path.resolve(detected.blobDir) || !dirExists(blobDir)) {

545+

continue;

546+

}

547+

warnings.push(

548+

`Left migrated debug proxy capture blobs in stored session directory: ${blobDir}`,

549+

);

550+

}

522551

}

523552

return { changes, warnings };

524553

}