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

推荐订阅源

Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
M
MIT News - Artificial intelligence
S
SegmentFault 最新的问题
博客园 - 叶小钗
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
L
LangChain Blog
Stack Overflow Blog
Stack Overflow Blog
博客园_首页
U
Unit 42
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

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(plugins): fail unresolved openclaw peer installs (#79...
ai-hpc · 2026-05-09 · via Recent Commits to openclaw:main

@@ -8,11 +8,17 @@ import {

88

import { createSuiteTempRootTracker } from "./test-helpers/fs-fixtures.js";

991010

const runCommandWithTimeoutMock = vi.fn();

11+

const resolveOpenClawPackageRootSyncMock = vi.fn();

11121213

vi.mock("../process/exec.js", () => ({

1314

runCommandWithTimeout: (...args: unknown[]) => runCommandWithTimeoutMock(...args),

1415

}));

151617+

vi.mock("../infra/openclaw-root.js", () => ({

18+

resolveOpenClawPackageRootSync: (...args: unknown[]) =>

19+

resolveOpenClawPackageRootSyncMock(...args),

20+

}));

21+1622

vi.resetModules();

17231824

const { installPluginFromNpmPackArchive, installPluginFromNpmSpec, PLUGIN_INSTALL_ERROR_CODE } =

@@ -372,6 +378,14 @@ afterAll(() => {

372378373379

beforeEach(() => {

374380

runCommandWithTimeoutMock.mockReset();

381+

resolveOpenClawPackageRootSyncMock.mockReset();

382+

const hostRoot = suiteTempRootTracker.makeTempDir();

383+

fs.writeFileSync(

384+

path.join(hostRoot, "package.json"),

385+

`${JSON.stringify({ name: "openclaw", version: "0.0.0-test" }, null, 2)}\n`,

386+

"utf8",

387+

);

388+

resolveOpenClawPackageRootSyncMock.mockReturnValue(hostRoot);

375389

vi.unstubAllEnvs();

376390

});

377391

@@ -713,6 +727,43 @@ describe("installPluginFromNpmSpec", () => {

713727

},

714728

);

715729730+

it("rejects managed npm plugins when their openclaw peer link cannot be repaired", async () => {

731+

const stateDir = suiteTempRootTracker.makeTempDir();

732+

const npmRoot = path.join(stateDir, "npm");

733+

const warnings: string[] = [];

734+735+

resolveOpenClawPackageRootSyncMock.mockReturnValue(null);

736+

mockNpmViewAndInstall({

737+

spec: "@openclaw/codex@2026.5.7",

738+

packageName: "@openclaw/codex",

739+

version: "2026.5.7",

740+

pluginId: "@openclaw/codex",

741+

npmRoot,

742+

peerDependencies: { openclaw: ">=2026.5.7" },

743+

});

744+745+

const result = await installPluginFromNpmSpec({

746+

spec: "@openclaw/codex@2026.5.7",

747+

npmDir: npmRoot,

748+

logger: { info: () => {}, warn: (message) => warnings.push(message) },

749+

});

750+751+

expect(result.ok).toBe(false);

752+

if (result.ok) {

753+

return;

754+

}

755+

expect(result.error).toContain("@openclaw/codex");

756+

expect(result.error).toContain("plugin-local node_modules/openclaw link");

757+

expect(warnings).toEqual(

758+

expect.arrayContaining([expect.stringContaining("Could not locate openclaw package root")]),

759+

);

760+

expect(fs.existsSync(path.join(npmRoot, "node_modules", "@openclaw", "codex"))).toBe(false);

761+

const managedManifest = JSON.parse(

762+

fs.readFileSync(path.join(npmRoot, "package.json"), "utf8"),

763+

) as { dependencies?: Record<string, string> };

764+

expect(managedManifest.dependencies?.["@openclaw/codex"]).toBeUndefined();

765+

});

766+716767

it.runIf(process.platform !== "win32")(

717768

"repairs root openclaw materialized by npm peer handling",

718769

async () => {