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

推荐订阅源

博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
Vercel News
Vercel News
Recent Announcements
Recent Announcements
B
Blog RSS Feed
Y
Y Combinator Blog
M
MIT News - Artificial intelligence
MongoDB | Blog
MongoDB | Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
D
Docker
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
L
LangChain Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - 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(release): verify npm tarball before publish · opencla...
steipete · 2026-05-16 · via Recent Commits to openclaw:main

@@ -38,6 +38,10 @@ import {

3838

runInstalledWorkspaceBootstrapSmoke,

3939

WORKSPACE_TEMPLATE_PACK_PATHS,

4040

} from "./lib/workspace-bootstrap-smoke.mjs";

41+

import {

42+

collectInstalledPackageErrors,

43+

normalizeInstalledBinaryVersion,

44+

} from "./openclaw-npm-postpublish-verify.ts";

4145

import { listStaticExtensionAssetOutputs } from "./runtime-postbuild.mjs";

4246

import { sparkleBuildFloorsFromShortVersion, type SparkleBuildFloors } from "./sparkle-build.ts";

4347

import { buildCmdExeCommandLine } from "./windows-cmd-helpers.mjs";

@@ -330,6 +334,58 @@ function runPackedBundledPluginPostinstall(packageRoot: string): void {

330334

});

331335

}

332336337+

export function collectPackedInstalledPackageVerificationErrors(params: {

338+

expectedVersion: string;

339+

installedBinaryVersion?: string;

340+

packageRoot: string;

341+

}): string[] {

342+

const packageJson = JSON.parse(

343+

readFileSync(join(params.packageRoot, "package.json"), "utf8"),

344+

) as { version?: string };

345+

const errors = collectInstalledPackageErrors({

346+

expectedVersion: params.expectedVersion,

347+

installedVersion: packageJson.version?.trim() ?? "",

348+

packageRoot: params.packageRoot,

349+

});

350+

if (

351+

params.installedBinaryVersion !== undefined &&

352+

normalizeInstalledBinaryVersion(params.installedBinaryVersion) !== params.expectedVersion

353+

) {

354+

errors.push(

355+

`installed openclaw binary version mismatch: expected ${params.expectedVersion}, found ${params.installedBinaryVersion || "<missing>"}.`,

356+

);

357+

}

358+

return errors;

359+

}

360+361+

function verifyPackedInstalledPackage(params: {

362+

expectedVersion: string;

363+

packageRoot: string;

364+

prefixDir: string;

365+

tmpRoot: string;

366+

}): void {

367+

const installedBinaryVersion = execFileSync(

368+

resolveInstalledBinaryPath(params.prefixDir),

369+

["--version"],

370+

{

371+

cwd: params.tmpRoot,

372+

encoding: "utf8",

373+

shell: process.platform === "win32",

374+

stdio: ["ignore", "pipe", "pipe"],

375+

},

376+

).trim();

377+

const errors = collectPackedInstalledPackageVerificationErrors({

378+

expectedVersion: params.expectedVersion,

379+

installedBinaryVersion,

380+

packageRoot: params.packageRoot,

381+

});

382+

if (errors.length > 0) {

383+

throw new Error(

384+

`release-check: packed installed package verification failed:\n- ${errors.join("\n- ")}`,

385+

);

386+

}

387+

}

388+333389

export function writePackedBundledPluginActivationConfig(homeDir: string): void {

334390

const configPath = join(homeDir, ".openclaw", "openclaw.json");

335391

mkdirSync(join(homeDir, ".openclaw"), { recursive: true });

@@ -464,6 +520,14 @@ function runPackedCliSmoke(params: {

464520

function runPackedBundledChannelEntrySmoke(): void {

465521

const tmpRoot = mkdtempSync(join(tmpdir(), "openclaw-release-pack-smoke-"));

466522

try {

523+

const expectedVersion = (

524+

JSON.parse(readFileSync(resolve("package.json"), "utf8")) as {

525+

version?: string;

526+

}

527+

).version;

528+

if (!expectedVersion) {

529+

throw new Error("release-check: root package.json is missing version.");

530+

}

467531

const packDir = join(tmpRoot, "pack");

468532

mkdirSync(packDir);

469533

@@ -473,6 +537,12 @@ function runPackedBundledChannelEntrySmoke(): void {

473537

installPackedTarball(prefixDir, tarballPath, tmpRoot);

474538475539

const packageRoot = join(resolveGlobalRoot(prefixDir, tmpRoot), "openclaw");

540+

verifyPackedInstalledPackage({

541+

expectedVersion,

542+

packageRoot,

543+

prefixDir,

544+

tmpRoot,

545+

});

476546

const homeDir = join(tmpRoot, "home");

477547

const stateDir = join(tmpRoot, "state");

478548

mkdirSync(homeDir, { recursive: true });