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

推荐订阅源

GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
G
Google Developers Blog
D
Docker
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
T
The Blog of Author Tim Ferriss
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
I
InfoQ
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
Google DeepMind News
Google DeepMind News

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): cover missing plugin uninstall teardown · ...
vincentkoc · 2026-05-03 · via Recent Commits to openclaw:main

@@ -735,6 +735,138 @@ describe("uninstallPlugin", () => {

735735

expect(runCommandWithTimeoutMock).not.toHaveBeenCalled();

736736

});

737737738+

it.each([

739+

{

740+

name: "enabled entry only, no installed code",

741+

pluginId: "missing-entry-plugin",

742+

config: createPluginConfig({

743+

entries: {

744+

"missing-entry-plugin": { enabled: true },

745+

},

746+

}),

747+

expectedActions: {

748+

entry: true,

749+

install: false,

750+

allowlist: false,

751+

denylist: false,

752+

loadPath: false,

753+

memorySlot: false,

754+

contextEngineSlot: false,

755+

channelConfig: false,

756+

directory: false,

757+

},

758+

expectedConfig: {},

759+

},

760+

{

761+

name: "install record and channel config, no runtime plugin",

762+

pluginId: "missing-channel-plugin",

763+

config: createPluginConfig({

764+

installs: {

765+

"missing-channel-plugin": createNpmInstallRecord("missing-channel-plugin"),

766+

},

767+

channels: {

768+

"missing-channel-plugin": { enabled: true, token: "stale" },

769+

discord: { enabled: true },

770+

},

771+

}),

772+

expectedActions: {

773+

entry: false,

774+

install: true,

775+

allowlist: false,

776+

denylist: false,

777+

loadPath: false,

778+

memorySlot: false,

779+

contextEngineSlot: false,

780+

channelConfig: true,

781+

directory: false,

782+

},

783+

expectedConfig: {

784+

channels: {

785+

discord: { enabled: true },

786+

},

787+

},

788+

},

789+

{

790+

name: "linked path record, missing source directory",

791+

pluginId: "missing-linked-plugin",

792+

config: createPluginConfig({

793+

installs: {

794+

"missing-linked-plugin": createPathInstallRecord(

795+

"/missing/openclaw/plugin",

796+

"/missing/openclaw/plugin",

797+

),

798+

},

799+

loadPaths: ["/missing/openclaw/plugin", "/keep/this/plugin"],

800+

}),

801+

expectedActions: {

802+

entry: false,

803+

install: true,

804+

allowlist: false,

805+

denylist: false,

806+

loadPath: true,

807+

memorySlot: false,

808+

contextEngineSlot: false,

809+

channelConfig: false,

810+

directory: false,

811+

},

812+

expectedConfig: {

813+

plugins: {

814+

load: {

815+

paths: ["/keep/this/plugin"],

816+

},

817+

},

818+

},

819+

},

820+

{

821+

name: "policy and slots only, no entry or install record",

822+

pluginId: "missing-policy-plugin",

823+

config: createPluginConfig({

824+

allow: ["missing-policy-plugin", "other-plugin"],

825+

deny: ["missing-policy-plugin"],

826+

slots: {

827+

memory: "missing-policy-plugin",

828+

contextEngine: "missing-policy-plugin",

829+

},

830+

}),

831+

expectedActions: {

832+

entry: false,

833+

install: false,

834+

allowlist: true,

835+

denylist: true,

836+

loadPath: false,

837+

memorySlot: true,

838+

contextEngineSlot: true,

839+

channelConfig: false,

840+

directory: false,

841+

},

842+

expectedConfig: {

843+

plugins: {

844+

allow: ["other-plugin"],

845+

slots: {

846+

memory: "memory-core",

847+

contextEngine: "legacy",

848+

},

849+

},

850+

},

851+

},

852+

] as const)(

853+

"uninstall teardown matrix: $name",

854+

async ({ pluginId, config, expectedActions, expectedConfig }) => {

855+

const result = await uninstallPlugin({

856+

config,

857+

pluginId,

858+

deleteFiles: true,

859+

extensionsDir: path.join(tempDir, "extensions"),

860+

});

861+862+

const successfulResult = expectSuccessfulUninstall(result);

863+

expect(successfulResult.actions).toEqual(expectedActions);

864+

expect(successfulResult.config).toEqual(expectedConfig);

865+

expect(successfulResult.warnings).toEqual([]);

866+

expect(runCommandWithTimeoutMock).not.toHaveBeenCalled();

867+

},

868+

);

869+738870

it("removes config entries", async () => {

739871

const config = createPluginConfig({

740872

entries: createSinglePluginEntries(),