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

推荐订阅源

J
Java Code Geeks
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
MyScale Blog
MyScale Blog
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
B
Blog RSS Feed
I
InfoQ
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
H
Help Net Security
L
LangChain Blog
M
MIT News - Artificial intelligence
Y
Y Combinator Blog
aimingoo的专栏
aimingoo的专栏

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(release): bound artifact package scans · openclaw/ope...
vincentkoc · 2026-06-16 · via Recent Commits to openclaw:main

@@ -19,6 +19,7 @@ const DEFAULT_OUTPUT_NAME = "openclaw-current.tgz";

1919

const PACKAGE_URL_DOWNLOAD_TIMEOUT_MS = 60_000;

2020

const PACKAGE_URL_MAX_BYTES = 250 * 1024 * 1024;

2121

const PACKAGE_URL_MAX_REDIRECTS = 5;

22+

export const ARTIFACT_TARBALL_SCAN_MAX_ENTRIES = 10_000;

2223

const COMMAND_STDOUT_CAPTURE_MAX_CHARS = 8 * 1024 * 1024;

2324

const COMMAND_STDERR_CAPTURE_MAX_CHARS = 128 * 1024;

2425

const COMMAND_TIMEOUT_KILL_AFTER_MS = 5_000;

@@ -280,20 +281,6 @@ function formatCapturedCommandOutput(buffer) {

280281281282

export const runCommandForTest = run;

282283283-

async function walkFiles(dir) {

284-

const entries = await fs.readdir(dir, { withFileTypes: true });

285-

const files = [];

286-

for (const entry of entries) {

287-

const absolute = path.join(dir, entry.name);

288-

if (entry.isDirectory()) {

289-

files.push(...(await walkFiles(absolute)));

290-

} else if (entry.isFile()) {

291-

files.push(absolute);

292-

}

293-

}

294-

return files;

295-

}

296-297284

async function sha256(file) {

298285

const hash = createHash("sha256");

299286

const handle = await fs.open(file, "r");

@@ -326,17 +313,51 @@ async function assertExpectedSha256(file, expected) {

326313

}

327314328315

async function findSingleTarball(dir) {

329-

const files = (await walkFiles(path.resolve(ROOT_DIR, dir)))

330-

.filter((file) => /\.t(?:ar\.)?gz$/u.test(path.basename(file)))

331-

.toSorted((a, b) => a.localeCompare(b));

332-

if (files.length !== 1) {

316+

const root = path.resolve(ROOT_DIR, dir);

317+

const pending = [root];

318+

const tarballs = [];

319+

let scannedEntries = 0;

320+321+

while (pending.length > 0) {

322+

const currentDir = pending.pop();

323+

if (!currentDir) {

324+

continue;

325+

}

326+

const handle = await fs.opendir(currentDir);

327+

for await (const entry of handle) {

328+

scannedEntries += 1;

329+

if (scannedEntries > ARTIFACT_TARBALL_SCAN_MAX_ENTRIES) {

330+

throw new Error(

331+

`source=artifact scan exceeded ${ARTIFACT_TARBALL_SCAN_MAX_ENTRIES} filesystem entries under ${dir}; provide a smaller artifact directory containing exactly one .tgz.`,

332+

);

333+

}

334+335+

const absolute = path.join(currentDir, entry.name);

336+

if (entry.isDirectory()) {

337+

pending.push(absolute);

338+

continue;

339+

}

340+

if (entry.isFile() && /\.t(?:ar\.)?gz$/u.test(entry.name)) {

341+

tarballs.push(absolute);

342+

if (tarballs.length > 1) {

343+

throw new Error(

344+

`source=artifact requires exactly one .tgz under ${dir}; found at least 2: ${tarballs.toSorted((a, b) => a.localeCompare(b)).join(", ")}`,

345+

);

346+

}

347+

}

348+

}

349+

}

350+351+

if (tarballs.length !== 1) {

333352

throw new Error(

334-

`source=artifact requires exactly one .tgz under ${dir}; found ${files.length}: ${files.join(", ")}`,

353+

`source=artifact requires exactly one .tgz under ${dir}; found ${tarballs.length}: ${tarballs.join(", ")}`,

335354

);

336355

}

337-

return files[0];

356+

return tarballs[0];

338357

}

339358359+

export const findSingleTarballForTest = findSingleTarball;

360+340361

export async function readArtifactPackageCandidateMetadata(dir) {

341362

const metadataPath = path.join(path.resolve(ROOT_DIR, dir), "package-candidate.json");

342363

let raw;