fix: dedupe config future-version warning per process (#75927)

This commit is contained in:
Dallin Romney
2026-05-02 11:45:46 +08:00
committed by GitHub
parent 3f766c8c62
commit c8fe007c42
2 changed files with 6 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ Docs: https://docs.openclaw.ai
### Fixes
- Config: log the "newer OpenClaw" version warning once per process instead of once per config snapshot read. (#75927) Thanks @romneyda.
- Gateway/chat history: merge Claude CLI transcript imports for Anthropic-routed sessions that still have a Claude CLI binding, so local chat history does not hide CLI JSONL turns. Fixes #75850. Thanks @alfredjbclaw.
- Media: trim serialized JSON suffixes after local `MEDIA:` directive file extensions, so generated-image metadata cannot pollute the parsed media path and cause false `ENOENT` delivery failures. Fixes #75182. Thanks @TnzGit and @hclsys.
- Cron: make scheduler reload schedule comparison tolerate malformed persisted jobs, so one bad cron entry no longer aborts the whole tick. Fixes #75886. Thanks @samfox-ai.

View File

@@ -156,6 +156,7 @@ type ShippedPluginInstallConfigReadMigration = {
const CONFIG_HEALTH_STATE_FILENAME = "config-health.json";
const loggedInvalidConfigs = new Set<string>();
const warnedFutureTouchedVersions = new Set<string>();
type ConfigHealthFingerprint = {
hash: string;
@@ -952,6 +953,10 @@ function warnIfConfigFromFuture(cfg: OpenClawConfig, logger: Pick<typeof console
return;
}
if (shouldWarnOnTouchedVersion(VERSION, touched)) {
if (warnedFutureTouchedVersions.has(touched)) {
return;
}
warnedFutureTouchedVersions.add(touched);
logger.warn(
`Config was last written by a newer OpenClaw (${touched}); current version is ${VERSION}.`,
);