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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
罗磊的独立博客
腾讯CDC
云风的 BLOG
云风的 BLOG
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
宝玉的分享
宝玉的分享
U
Unit 42
I
InfoQ
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
V2EX
美团技术团队
IT之家
IT之家
Stack Overflow Blog
Stack Overflow Blog
F
Fortinet All Blogs
GbyAI
GbyAI
S
SegmentFault 最新的问题

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
test: broaden plugin install update coverage · openclaw/o...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -101,6 +101,15 @@ function assertSimplePlugin(jsonFile, inspectFile, pluginId, method) {

101101

}

102102

}

103103104+

function assertUpdateOutput(logFile, expectedSnippet) {

105+

const output = fs.readFileSync(logFile, "utf8");

106+

if (!output.includes(expectedSnippet)) {

107+

throw new Error(

108+

`expected update output to include ${JSON.stringify(expectedSnippet)}:\n${output}`,

109+

);

110+

}

111+

}

112+104113

function assertClaudeBundleDisabled() {

105114

const data = readJson("/tmp/plugins-bundle-disabled.json");

106115

const plugin = (data.plugins || []).find((entry) => entry.id === "claude-bundle-e2e");

@@ -326,6 +335,62 @@ function assertPluginDirDeps() {

326335

assertRealPathInside(installPath, dependencyPackagePath, "local plugin copied dependency");

327336

}

328337338+

function assertLocalPathUpdateSkipped() {

339+

assertUpdateOutput("/tmp/plugins-dir-update.log", 'Skipping "demo-plugin-dir" (source: path).');

340+

}

341+342+

function assertNpmPlugin() {

343+

assertSimplePlugin(

344+

"/tmp/plugins-npm.json",

345+

"/tmp/plugins-npm-inspect.json",

346+

"demo-plugin-npm",

347+

"demo.npm",

348+

);

349+350+

const inspect = readJson("/tmp/plugins-npm-inspect.json");

351+

if (!Array.isArray(inspect.cliCommands) || !inspect.cliCommands.includes("demo-npm")) {

352+

throw new Error(`expected demo-npm cli command, got ${inspect.cliCommands?.join(", ")}`);

353+

}

354+355+

const cliOutput = fs.readFileSync("/tmp/plugins-npm-cli.txt", "utf8");

356+

if (!cliOutput.includes("demo-plugin-npm:pong")) {

357+

throw new Error(`unexpected npm plugin cli output: ${cliOutput.trim()}`);

358+

}

359+360+

const record = getInstallRecords()["demo-plugin-npm"];

361+

if (!record) {

362+

throw new Error("missing npm install record for demo-plugin-npm");

363+

}

364+

if (record.source !== "npm") {

365+

throw new Error(`unexpected npm install source: ${record.source}`);

366+

}

367+

if (record.spec !== "@openclaw/demo-plugin-npm@0.0.1") {

368+

throw new Error(`unexpected npm spec: ${record.spec}`);

369+

}

370+

if (record.resolvedName !== "@openclaw/demo-plugin-npm") {

371+

throw new Error(`unexpected npm resolved name: ${record.resolvedName}`);

372+

}

373+

if (record.resolvedVersion !== "0.0.1") {

374+

throw new Error(`unexpected npm resolved version: ${record.resolvedVersion}`);

375+

}

376+

const installPath = record.installPath?.replace(/^~(?=$|\/)/u, process.env.HOME);

377+

if (!installPath || !fs.existsSync(installPath)) {

378+

throw new Error(`npm install path missing on disk: ${installPath}`);

379+

}

380+

const nodeModulesRoot = path.dirname(path.dirname(installPath));

381+

const npmRoot = path.dirname(nodeModulesRoot);

382+

const dependencyPackagePath = path.join(nodeModulesRoot, "is-number", "package.json");

383+

if (!fs.existsSync(dependencyPackagePath)) {

384+

throw new Error(`missing npm plugin installed dependency: ${dependencyPackagePath}`);

385+

}

386+

assertRealPathInside(npmRoot, dependencyPackagePath, "npm plugin installed dependency");

387+

}

388+389+

function assertNpmPluginUpdateUnchanged() {

390+

assertUpdateOutput("/tmp/plugins-npm-update.log", "demo-plugin-npm is up to date (0.0.1).");

391+

assertNpmPlugin();

392+

}

393+329394

function assertMarketplaceUpdated() {

330395

const data = readJson("/tmp/plugins-marketplace-updated.json");

331396

const inspect = readJson("/tmp/plugins-marketplace-updated-inspect.json");

@@ -341,6 +406,49 @@ function assertMarketplaceUpdated() {

341406

}

342407

}

343408409+

function assertGitPluginUpdated() {

410+

const beforeCommit = process.argv[3];

411+

assertSimplePlugin(

412+

"/tmp/plugins-git-update.json",

413+

"/tmp/plugins-git-update-inspect.json",

414+

"demo-plugin-git-update",

415+

"demo.git.update.v2",

416+

);

417+418+

const inspect = readJson("/tmp/plugins-git-update-inspect.json");

419+

if (!Array.isArray(inspect.cliCommands) || !inspect.cliCommands.includes("demo-git-update")) {

420+

throw new Error(`expected demo-git-update cli command, got ${inspect.cliCommands?.join(", ")}`);

421+

}

422+423+

const cliOutput = fs.readFileSync("/tmp/plugins-git-update-cli.txt", "utf8");

424+

if (!cliOutput.includes("demo-plugin-git-update:pong-v2")) {

425+

throw new Error(`unexpected updated git plugin cli output: ${cliOutput.trim()}`);

426+

}

427+428+

const record = getInstallRecords()["demo-plugin-git-update"];

429+

if (!record) {

430+

throw new Error("missing git update install record for demo-plugin-git-update");

431+

}

432+

if (record.source !== "git") {

433+

throw new Error(`unexpected git update source: ${record.source}`);

434+

}

435+

if (record.gitRef !== "main") {

436+

throw new Error(`unexpected git update ref: ${record.gitRef}`);

437+

}

438+

if (!record.gitCommit || record.gitCommit === beforeCommit) {

439+

throw new Error(

440+

`expected git update commit to advance from ${beforeCommit}, got ${record.gitCommit}`,

441+

);

442+

}

443+

if (record.version !== "0.0.2") {

444+

throw new Error(`unexpected git update version: ${record.version}`);

445+

}

446+

assertUpdateOutput(

447+

"/tmp/plugins-git-update.log",

448+

"Updated demo-plugin-git-update: 0.0.1 -> 0.0.2.",

449+

);

450+

}

451+344452

async function assertClawHubPreflight() {

345453

const spec = process.env.CLAWHUB_PLUGIN_SPEC;

346454

if (!spec?.startsWith("clawhub:")) {

@@ -476,6 +584,14 @@ function assertClawHubRemoved() {

476584

}

477585

}

478586587+

function assertClawHubUpdated() {

588+

assertUpdateOutput(

589+

"/tmp/plugins-clawhub-update.log",

590+

`${process.env.CLAWHUB_PLUGIN_ID} already at 0.1.0.`,

591+

);

592+

assertClawHubInstalled();

593+

}

594+479595

const commands = {

480596

"record-fixture-plugin-trust": recordFixturePluginTrust,

481597

"demo-plugin": assertDemoPlugin,

@@ -493,6 +609,7 @@ const commands = {

493609

"demo-plugin-dir",

494610

"demo.dir",

495611

),

612+

"plugin-dir-update-skipped": assertLocalPathUpdateSkipped,

496613

"plugin-dir-deps": assertPluginDirDeps,

497614

"plugin-file": () =>

498615

assertSimplePlugin(

@@ -501,16 +618,20 @@ const commands = {

501618

"demo-plugin-file",

502619

"demo.file",

503620

),

621+

"plugin-npm": assertNpmPlugin,

622+

"plugin-npm-update": assertNpmPluginUpdateUnchanged,

504623

"bundle-disabled": assertClaudeBundleDisabled,

505624

"bundle-inspect": assertClaudeBundleInspect,

506625

"slash-install": assertSlashInstall,

507626

"plugin-git": assertGitPlugin,

627+

"plugin-git-updated": assertGitPluginUpdated,

508628

"marketplace-list": assertMarketplaceList,

509629

"marketplace-installed": assertMarketplaceInstalled,

510630

"marketplace-records": assertMarketplaceRecords,

511631

"marketplace-updated": assertMarketplaceUpdated,

512632

"clawhub-preflight": assertClawHubPreflight,

513633

"clawhub-installed": assertClawHubInstalled,

634+

"clawhub-updated": assertClawHubUpdated,

514635

"clawhub-removed": assertClawHubRemoved,

515636

};

516637