mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:00:42 +00:00
fix(config): recover critical config clobbers
This commit is contained in:
@@ -100,6 +100,9 @@ The Gateway also keeps a trusted last-known-good copy after a successful startup
|
||||
`openclaw.json` is later changed outside OpenClaw and no longer validates, startup
|
||||
and hot reload preserve the broken file as a timestamped `.clobbered.*` snapshot,
|
||||
restore the last-known-good copy, and log a loud warning with the recovery reason.
|
||||
Startup read recovery also treats sharp size drops, missing config metadata, and a
|
||||
missing `gateway.mode` as critical clobber signatures when the last-known-good
|
||||
copy had those fields.
|
||||
If a status/log line is accidentally prepended before an otherwise valid JSON
|
||||
config, gateway startup and `openclaw doctor --fix` can strip the prefix,
|
||||
preserve the polluted file as `.clobbered.*`, and continue with the recovered
|
||||
|
||||
@@ -303,6 +303,7 @@ Common signatures:
|
||||
- `.clobbered.*` exists → an external direct edit or startup read was restored.
|
||||
- `.rejected.*` exists → an OpenClaw-owned config write failed schema or clobber checks before commit.
|
||||
- `Config write rejected:` → the write tried to drop required shape, shrink the file sharply, or persist invalid config.
|
||||
- `missing-meta-vs-last-good`, `gateway-mode-missing-vs-last-good`, or `size-drop-vs-last-good:*` → startup treated the current file as clobbered because it lost fields or size compared with the last-known-good backup.
|
||||
- `Config last-known-good promotion skipped` → the candidate contained redacted secret placeholders such as `***`.
|
||||
|
||||
Fix options:
|
||||
|
||||
Reference in New Issue
Block a user