fix(update): repair plugins for legacy updater doctors · openclaw/openclaw@0556ac0
steipete
·
2026-05-20
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -428,11 +428,9 @@ describe("configured plugin install release step", () => {
|
428 | 428 | }); |
429 | 429 | }); |
430 | 430 | |
431 | | -it("defers package-manager plugins for writable legacy parents without explicit deferral", async () => { |
| 431 | +it("repairs package-manager plugins for writable legacy parents without explicit deferral", async () => { |
432 | 432 | mocks.repairMissingPluginInstallsForIds.mockResolvedValue({ |
433 | | -changes: [ |
434 | | -'Skipped package-manager repair for configured plugin "discord" during package update; rerun "openclaw doctor --fix" after the update completes.', |
435 | | -], |
| 433 | +changes: ['Installed missing configured plugin "discord".'], |
436 | 434 | warnings: [], |
437 | 435 | }); |
438 | 436 | |
@@ -459,12 +457,10 @@ describe("configured plugin install release step", () => {
|
459 | 457 | OPENCLAW_UPDATE_PARENT_SUPPORTS_DOCTOR_CONFIG_WRITE: "1", |
460 | 458 | }); |
461 | 459 | expect(result).toEqual({ |
462 | | -changes: [ |
463 | | -'Skipped package-manager repair for configured plugin "discord" during package update; rerun "openclaw doctor --fix" after the update completes.', |
464 | | -], |
| 460 | +changes: ['Installed missing configured plugin "discord".'], |
465 | 461 | warnings: [], |
466 | | -completed: false, |
467 | | -touchedConfig: false, |
| 462 | +completed: true, |
| 463 | +touchedConfig: true, |
468 | 464 | }); |
469 | 465 | }); |
470 | 466 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -36,7 +36,7 @@ describe("update-phase env helpers", () => {
|
36 | 36 | expect(isPostCoreConvergencePass(env)).toBe(true); |
37 | 37 | }); |
38 | 38 | |
39 | | -it("defers configured plugin repair for explicit or writable-parent update handoffs", () => { |
| 39 | +it("defers configured plugin repair only for explicit update handoffs", () => { |
40 | 40 | expect( |
41 | 41 | shouldDeferConfiguredPluginInstallRepair({ |
42 | 42 | [UPDATE_IN_PROGRESS_ENV]: "1", |
@@ -53,7 +53,7 @@ describe("update-phase env helpers", () => {
|
53 | 53 | [UPDATE_IN_PROGRESS_ENV]: "1", |
54 | 54 | [UPDATE_PARENT_SUPPORTS_DOCTOR_CONFIG_WRITE_ENV]: "1", |
55 | 55 | }), |
56 | | -).toBe(true); |
| 56 | +).toBe(false); |
57 | 57 | expect( |
58 | 58 | shouldDeferConfiguredPluginInstallRepair({ |
59 | 59 | [UPDATE_IN_PROGRESS_ENV]: "1", |
@@ -80,7 +80,7 @@ describe("update-phase env helpers", () => {
|
80 | 80 | [UPDATE_IN_PROGRESS_ENV]: "1", |
81 | 81 | [UPDATE_PARENT_SUPPORTS_DOCTOR_CONFIG_WRITE_ENV]: "1", |
82 | 82 | }), |
83 | | -).toBe(false); |
| 83 | +).toBe(true); |
84 | 84 | expect( |
85 | 85 | isLegacyPackageUpdateDoctorPass({ |
86 | 86 | [UPDATE_IN_PROGRESS_ENV]: "1", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -39,16 +39,15 @@ export function isUpdatePackageSwapInProgress(env: NodeJS.ProcessEnv): boolean {
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * True iff configured plugin install repair should be deferred because the |
42 | | - * updater guarantees a later post-core convergence pass. Shipped writable |
43 | | - * parents predate the explicit defer marker but still resume after the |
44 | | - * candidate doctor exits, so the candidate pass must not install payloads |
45 | | - * that the parent will immediately repair again from stale in-memory records. |
| 42 | + * updater guarantees a later post-core convergence pass. Older shipped |
| 43 | + * parents may set only the writable-config marker; they still resume after |
| 44 | + * the candidate doctor exits, so the candidate must repair payloads before |
| 45 | + * control returns to that stale process. |
46 | 46 | */ |
47 | 47 | export function shouldDeferConfiguredPluginInstallRepair(env: NodeJS.ProcessEnv): boolean { |
48 | 48 | return ( |
49 | 49 | isUpdatePackageSwapInProgress(env) && |
50 | | -(isTruthyEnvValue(env[UPDATE_DEFER_CONFIGURED_PLUGIN_INSTALL_REPAIR_ENV]) || |
51 | | -isTruthyEnvValue(env[UPDATE_PARENT_SUPPORTS_DOCTOR_CONFIG_WRITE_ENV])) |
| 50 | +isTruthyEnvValue(env[UPDATE_DEFER_CONFIGURED_PLUGIN_INSTALL_REPAIR_ENV]) |
52 | 51 | ); |
53 | 52 | } |
54 | 53 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。