mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-14 14:43:16 -06:00
b1db87fb36
* fix(doctor): commit legacy migrations even when unrelated validation fails (#76798) migrateLegacyConfig previously returned config: null when post-migration validation found any issue (e.g. a missing plugin). The caller then kept the unmigrated config as the candidate, so doctor --fix never wrote the legacy migration to disk. Now when validation fails after a successful migration, the migrated config is returned with partiallyValid: true. applyLegacyCompatibilityStep always commits the migrated config to state.candidate, ensuring agents.defaults.llm and other known-legacy keys are cleaned up on doctor --fix even when an unrelated provider or plugin issue blocks the full validator. Adds regression test asserting that candidate is updated to the migrated shape when partiallyValid is set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fixup: extend skipPluginValidation to write path with E2E coverage Thread skipPluginValidationOnWrite through loadAndMaybeMigrateDoctorConfig return value into runWriteConfigHealth so replaceConfigFile bypasses plugin validation when migration is only partially valid. Add E2E test verifying the flag propagates end-to-end. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fixup(doctor): wire skipPluginValidation through full write path (#76800) Clawsweeper P2 x2: 1. io.ts exported writeConfigFile wrapper now passes skipPluginValidation to createConfigIO so both write-phase validation and post-write loadConfig re-read honor the flag. 2. mutate.ts tryWriteSingleTopLevelIncludeMutation now skips plugin validation when writeOptions.skipPluginValidation is set, so include-write fast path no longer blocks safe legacy migrations with unrelated plugin errors. Adds regression test: skipPluginValidation bypasses plugin schema rejection on writeConfigFile and falls back to throwing when flag is not set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fixup(doctor): bail out of include fast path when skipPluginValidation is set (#76800) Clawsweeper P2: after the include write, readConfigFileSnapshotForWrite() calls loadConfig() which validates with plugins; refreshedSnapshot.valid is false when an unrelated plugin issue exists, causing the include path to throw even though skipPluginValidation was requested. Simplest fix: return false from tryWriteSingleTopLevelIncludeMutation when skipPluginValidation is set, letting the root writer handle the write with plugin validation disabled end-to-end (including post-write readback via createConfigIO({ pluginValidation: "skip" })). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(doctor): cover partial legacy migration writes --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>