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

推荐订阅源

J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
C
Check Point Blog
D
Docker
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
博客园_首页
Apple Machine Learning Research
Apple Machine Learning Research
量子位
有赞技术团队
有赞技术团队
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
M
MIT News - Artificial intelligence
B
Blog
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
月光博客
月光博客

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: isolate plugin update home env · openclaw/openclaw@...
shakkernerd · 2026-06-23 · via Recent Commits to openclaw:main

@@ -5,6 +5,7 @@ import path from "node:path";

55

import { bundledPluginRootAt } from "openclaw/plugin-sdk/test-fixtures";

66

import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";

77

import type { OpenClawConfig } from "../config/config.js";

8+

import { withEnvAsync } from "../test-utils/env.js";

89

import type { PluginNpmIntegrityDriftParams } from "./install.js";

9101011

const APP_ROOT = "/app";

@@ -1774,7 +1775,6 @@ describe("updateNpmInstalledPlugins", () => {

17741775

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

17751776

JSON.stringify({ name: "@martian-engineering/lossless-claw", version: "0.9.0" }),

17761777

);

1777-

vi.stubEnv("HOME", home);

17781778

mockNpmViewMetadata({

17791779

name: "@martian-engineering/lossless-claw",

17801780

version: "0.9.0",

@@ -1783,19 +1783,21 @@ describe("updateNpmInstalledPlugins", () => {

17831783

});

17841784

installPluginFromNpmSpecMock.mockRejectedValue(new Error("installer should not run"));

178517851786-

const result = await updateNpmInstalledPlugins({

1787-

config: createNpmInstallConfig({

1788-

pluginId: "lossless-claw",

1789-

spec: "@martian-engineering/lossless-claw",

1790-

installPath: "~/.openclaw/extensions/lossless-claw",

1791-

resolvedName: "@martian-engineering/lossless-claw",

1792-

resolvedVersion: "0.9.0",

1793-

resolvedSpec: "@martian-engineering/lossless-claw@0.9.0",

1794-

integrity: "sha512-same",

1795-

shasum: "same",

1786+

const result = await withEnvAsync({ HOME: home }, () =>

1787+

updateNpmInstalledPlugins({

1788+

config: createNpmInstallConfig({

1789+

pluginId: "lossless-claw",

1790+

spec: "@martian-engineering/lossless-claw",

1791+

installPath: "~/.openclaw/extensions/lossless-claw",

1792+

resolvedName: "@martian-engineering/lossless-claw",

1793+

resolvedVersion: "0.9.0",

1794+

resolvedSpec: "@martian-engineering/lossless-claw@0.9.0",

1795+

integrity: "sha512-same",

1796+

shasum: "same",

1797+

}),

1798+

pluginIds: ["lossless-claw"],

17961799

}),

1797-

pluginIds: ["lossless-claw"],

1798-

});

1800+

);

1799180118001802

expect(installPluginFromNpmSpecMock).not.toHaveBeenCalled();

18011803

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

@@ -3990,9 +3992,7 @@ describe("syncPluginsForUpdateChannel", () => {

39903992

}),

39913993

);

399239943993-

const previousHome = process.env.HOME;

3994-

process.env.HOME = "/tmp/process-home";

3995-

try {

3995+

await withEnvAsync({ HOME: "/tmp/process-home" }, async () => {

39963996

const result = await syncPluginsForUpdateChannel({

39973997

channel: "beta",

39983998

env: {

@@ -4022,13 +4022,7 @@ describe("syncPluginsForUpdateChannel", () => {

40224022

sourcePath: "~/plugins/feishu",

40234023

installPath: "~/plugins/feishu",

40244024

});

4025-

} finally {

4026-

if (previousHome === undefined) {

4027-

delete process.env.HOME;

4028-

} else {

4029-

process.env.HOME = previousHome;

4030-

}

4031-

}

4025+

});

40324026

});

4033402740344028

it("installs an externalized bundled plugin and rewrites its old bundled path plugin index", async () => {