fix(update): keep modern deferral metadata current · openclaw/openclaw@b3fc9fe
steipete
·
2026-05-18
·
via Recent Commits to openclaw:main
File tree
src/commands/doctor/shared
| Original file line number | Diff line number | Diff line change |
|---|
@@ -102,7 +102,7 @@ describe("update-phase env helpers", () => {
|
102 | 102 | [UPDATE_DEFER_CONFIGURED_PLUGIN_INSTALL_REPAIR_ENV]: "1", |
103 | 103 | [UPDATE_PARENT_SUPPORTS_DOCTOR_CONFIG_WRITE_ENV]: "1", |
104 | 104 | }), |
105 | | -).toBe(true); |
| 105 | +).toBe(false); |
106 | 106 | expect( |
107 | 107 | isLegacyParentWritableUpdateDoctorPass({ |
108 | 108 | [UPDATE_POST_CORE_CONVERGENCE_ENV]: "1", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -55,12 +55,15 @@ export function shouldDeferConfiguredPluginInstallRepair(env: NodeJS.ProcessEnv)
|
55 | 55 | /** |
56 | 56 | * True iff a new doctor is running inside a shipped parent that can persist |
57 | 57 | * doctor config repairs. Config writes must stay old-parent-readable because |
58 | | - * that parent resumes after the candidate doctor exits. |
| 58 | + * that parent resumes after the candidate doctor exits. Modern parents also |
| 59 | + * set the explicit deferral marker, so they should keep current metadata |
| 60 | + * writes while still deferring payload repair. |
59 | 61 | */ |
60 | 62 | export function isLegacyParentWritableUpdateDoctorPass(env: NodeJS.ProcessEnv): boolean { |
61 | 63 | return ( |
62 | 64 | isUpdatePackageSwapInProgress(env) && |
63 | | -isTruthyEnvValue(env[UPDATE_PARENT_SUPPORTS_DOCTOR_CONFIG_WRITE_ENV]) |
| 65 | +isTruthyEnvValue(env[UPDATE_PARENT_SUPPORTS_DOCTOR_CONFIG_WRITE_ENV]) && |
| 66 | +!isTruthyEnvValue(env[UPDATE_DEFER_CONFIGURED_PLUGIN_INSTALL_REPAIR_ENV]) |
64 | 67 | ); |
65 | 68 | } |
66 | 69 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。