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

推荐订阅源

雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
V
V2EX
T
The Blog of Author Tim Ferriss
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
Stack Overflow Blog
Stack Overflow Blog
I
InfoQ
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
Recent Announcements
Recent Announcements
Vercel News
Vercel News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
美团技术团队
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks

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(plugins): decouple config-gated install fixture · op...
vincentkoc · 2026-05-03 · via Recent Commits to openclaw:main

@@ -533,10 +533,11 @@ describe("plugins cli install", () => {

533533

});

534534535535

it("does not persist incomplete config entries for config-gated bundled installs", async () => {

536+

const pluginId = "config-required-plugin";

536537

const cfg = {

537538

plugins: {

538539

entries: {

539-

"memory-lancedb": {

540+

[pluginId]: {

540541

config: {},

541542

},

542543

},

@@ -546,17 +547,31 @@ describe("plugins cli install", () => {

546547

},

547548

} as OpenClawConfig;

548549

loadConfig.mockReturnValue(cfg);

550+

findBundledPluginSourceMock.mockReturnValue({

551+

pluginId,

552+

localPath: `/app/dist/extensions/${pluginId}`,

553+

configSchema: {

554+

type: "object",

555+

required: ["token"],

556+

properties: {

557+

token: {

558+

type: "string",

559+

},

560+

},

561+

},

562+

requiresConfig: true,

563+

});

549564550-

await runPluginsCommand(["plugins", "install", "memory-lancedb"]);

565+

await runPluginsCommand(["plugins", "install", pluginId]);

551566552567

const writtenConfig = writeConfigFile.mock.calls.at(-1)?.[0] as OpenClawConfig;

553-

expect(writtenConfig.plugins?.entries?.["memory-lancedb"]).toBeUndefined();

568+

expect(writtenConfig.plugins?.entries?.[pluginId]).toBeUndefined();

554569

expect(writtenConfig.plugins?.load?.paths).toEqual(["/existing/plugin"]);

555570

expect(writePersistedInstalledPluginIndexInstallRecords).toHaveBeenCalledWith({

556-

"memory-lancedb": expect.objectContaining({

571+

[pluginId]: expect.objectContaining({

557572

source: "path",

558-

sourcePath: expect.stringContaining("memory-lancedb"),

559-

installPath: expect.stringContaining("memory-lancedb"),

573+

sourcePath: expect.stringContaining(pluginId),

574+

installPath: expect.stringContaining(pluginId),

560575

}),

561576

});

562577

expect(enablePluginInConfig).not.toHaveBeenCalled();

@@ -565,25 +580,37 @@ describe("plugins cli install", () => {

565580

});

566581567582

it("enables config-gated bundled installs when provider-backed config is explicit", async () => {

583+

const pluginId = "config-required-plugin";

568584

const cfg = {

569585

plugins: {

570586

entries: {

571-

"memory-lancedb": {

587+

[pluginId]: {

572588

config: {

573-

embedding: {

574-

apiKey: "sk-test",

575-

model: "text-embedding-3-small",

576-

},

589+

token: "sk-test",

577590

},

578591

},

579592

},

580593

},

581594

} as OpenClawConfig;

582-

const enabledCfg = createEnabledPluginConfig("memory-lancedb");

595+

const enabledCfg = createEnabledPluginConfig(pluginId);

583596

loadConfig.mockReturnValue(cfg);

597+

findBundledPluginSourceMock.mockReturnValue({

598+

pluginId,

599+

localPath: `/app/dist/extensions/${pluginId}`,

600+

configSchema: {

601+

type: "object",

602+

required: ["token"],

603+

properties: {

604+

token: {

605+

type: "string",

606+

},

607+

},

608+

},

609+

requiresConfig: true,

610+

});

584611

enablePluginInConfig.mockReturnValue({ config: enabledCfg });

585612586-

await runPluginsCommand(["plugins", "install", "memory-lancedb"]);

613+

await runPluginsCommand(["plugins", "install", pluginId]);

587614588615

expect(enablePluginInConfig).toHaveBeenCalled();

589616

expect(writeConfigFile).toHaveBeenCalledWith(enabledCfg);