From 92ffb9af8690d70abfd376283be4ea292ef3713d Mon Sep 17 00:00:00 2001 From: supermario_leo Date: Mon, 6 Apr 2026 20:16:22 +0800 Subject: [PATCH] fix(config): restore applyDefaults:true for AJV plugin/channel schema validation --- src/config/validation.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config/validation.ts b/src/config/validation.ts index 6a869888d01..01c320414c2 100644 --- a/src/config/validation.ts +++ b/src/config/validation.ts @@ -766,7 +766,8 @@ function validateConfigObjectWithPluginsBase( schema: channelSchema, cacheKey: `channel:${trimmed}`, value: config.channels[trimmed], - applyDefaults: opts.applyDefaults, + applyDefaults: true, // Always apply defaults for AJV schema validation; + // writeConfigFile persists persistCandidate, not validated.config (#61841) }); if (!result.ok) { for (const error of result.errors) { @@ -957,7 +958,8 @@ function validateConfigObjectWithPluginsBase( schema: record.configSchema, cacheKey: record.schemaCacheKey ?? record.manifestPath ?? pluginId, value: entry?.config ?? {}, - applyDefaults: opts.applyDefaults, + applyDefaults: true, // Always apply defaults for AJV schema validation; + // writeConfigFile persists persistCandidate, not validated.config (#61841) }); if (!res.ok) { for (const error of res.errors) {