@@ -46,35 +46,6 @@ const REPAIR_GUIDANCE = "Run `openclaw doctor --fix` to retry plugin repair.";
|
46 | 46 | const inspectGuidance = (pluginId: string) => |
47 | 47 | `Run \`openclaw plugins inspect ${pluginId} --runtime --json\` for details.`; |
48 | 48 | |
49 | | -function isBlockingRepairFailure(params: { |
50 | | -cfg: OpenClawConfig; |
51 | | -pluginId: string; |
52 | | -records: Record<string, PluginInstallRecord>; |
53 | | -smokeRecords: Record<string, PluginInstallRecord>; |
54 | | -}): boolean { |
55 | | -if (Object.hasOwn(params.smokeRecords, params.pluginId)) { |
56 | | -return true; |
57 | | -} |
58 | | -const normalizedPluginConfig = normalizePluginsConfig(params.cfg.plugins); |
59 | | -const enableState = resolveEffectiveEnableState({ |
60 | | -id: params.pluginId, |
61 | | -origin: "global", |
62 | | -config: normalizedPluginConfig, |
63 | | -rootConfig: params.cfg, |
64 | | -}); |
65 | | -if (enableState.enabled) { |
66 | | -return true; |
67 | | -} |
68 | | -const record = params.records[params.pluginId]; |
69 | | -if (!record) { |
70 | | -return false; |
71 | | -} |
72 | | -return Boolean( |
73 | | -resolveTrustedSourceLinkedOfficialNpmSpec({ pluginId: params.pluginId, record }) || |
74 | | -resolveTrustedSourceLinkedOfficialClawHubSpec({ pluginId: params.pluginId, record }), |
75 | | -); |
76 | | -} |
77 | | - |
78 | 49 | async function repairManagedNpmOpenClawPeerLinks(params: { |
79 | 50 | env: NodeJS.ProcessEnv; |
80 | 51 | }): Promise<{ changes: string[]; warnings: PostCoreConvergenceWarning[] }> { |
@@ -114,8 +85,10 @@ async function repairManagedNpmOpenClawPeerLinks(params: {
|
114 | 85 | /** |
115 | 86 | * Mandatory post-core convergence pass. Runs AFTER the core package files |
116 | 87 | * are swapped and the in-update doctor pass has already returned, but BEFORE |
117 | | - * the gateway is restarted. Failures here must block the restart so we |
118 | | - * never restart with a configured plugin whose payload is unloadable. |
| 88 | + * the gateway is restarted. Missing-plugin repair failures stay nonblocking: |
| 89 | + * an external package fetch may be transient, and failing the core update |
| 90 | + * would strand the user. Payload smoke failures still block the restart so we |
| 91 | + * never restart with an installed active plugin whose payload is unloadable. |
119 | 92 | */ |
120 | 93 | export async function runPostCorePluginConvergence(params: { |
121 | 94 | cfg: OpenClawConfig; |
@@ -165,14 +138,6 @@ export async function runPostCorePluginConvergence(params: {
|
165 | 138 | // configured plugin whose payload was deleted on disk would block the |
166 | 139 | // entire update — even though the gateway will never load that plugin. |
167 | 140 | const smokeRecords = filterRecordsToActive({ cfg: params.cfg, records }); |
168 | | -const blockingFailedPluginIds = (repair.failedPluginIds ?? []).filter((pluginId) => |
169 | | -isBlockingRepairFailure({ |
170 | | -cfg: params.cfg, |
171 | | - pluginId, |
172 | | - records, |
173 | | - smokeRecords, |
174 | | -}), |
175 | | -); |
176 | 141 | const smoke = await runPluginPayloadSmokeCheck({ records: smokeRecords, env }); |
177 | 142 | for (const failure of smoke.failures) { |
178 | 143 | warnings.push({ |
@@ -192,7 +157,7 @@ export async function runPostCorePluginConvergence(params: {
|
192 | 157 | ...peerLinkRepair.changes, |
193 | 158 | ], |
194 | 159 | warnings, |
195 | | -errored: blockingFailedPluginIds.length > 0 || smoke.failures.length > 0, |
| 160 | +errored: smoke.failures.length > 0, |
196 | 161 | smokeFailures: smoke.failures, |
197 | 162 | installRecords: records, |
198 | 163 | }; |
|