Skip to content

Commit 81fea91

Browse files
committed
fix: restore config dry-run schema validation
1 parent 9a49d14 commit 81fea91

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/cli/config-cli.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,6 +1313,7 @@ function collectDryRunSchemaErrors(params: {
13131313
}): ConfigSetDryRunError[] {
13141314
const validated = validateConfigObjectRaw(params.config, {
13151315
touchedPaths: params.operations.map((operation) => operation.setPath),
1316+
validateBundledChannels: true,
13161317
});
13171318
if (validated.ok) {
13181319
return [];

src/config/schema.base.generated.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21989,12 +21989,13 @@ export const GENERATED_BASE_CONFIG_SCHEMA: BaseConfigSchemaResponse = {
2198921989
"Web channel runtime settings for heartbeat and reconnect behavior when operating web-based chat surfaces. Use reconnect values tuned to your network reliability profile and expected uptime needs.",
2199021990
},
2199121991
channels: {
21992+
type: "object",
21993+
properties: {},
21994+
additionalProperties: true,
2199221995
title: "Channels",
2199321996
description:
2199421997
"Channel provider configurations plus shared defaults that control access policies, heartbeat visibility, and per-surface behavior. Keep defaults centralized and override per provider only where required.",
21995-
properties: {},
2199621998
required: [],
21997-
additionalProperties: true,
2199821999
},
2199922000
discovery: {
2200022001
type: "object",

src/config/validation.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,10 @@ function validateGatewayTailscaleBind(config: OpenClawConfig): ConfigValidationI
621621
*/
622622
export function validateConfigObjectRaw(
623623
raw: unknown,
624-
_opts?: {
624+
opts?: {
625625
sourceRaw?: unknown;
626626
touchedPaths?: ReadonlyArray<ReadonlyArray<string>>;
627+
validateBundledChannels?: boolean;
627628
},
628629
): { ok: true; config: OpenClawConfig } | { ok: false; issues: ConfigValidationIssue[] } {
629630
const normalizedRaw = stripDeprecatedValidationKeys(raw);
@@ -638,7 +639,9 @@ export function validateConfigObjectRaw(
638639
}
639640
const validatedConfig = validated.data as OpenClawConfig;
640641
const channelIssues =
641-
policyIssues.length > 0 ? collectRawBundledChannelConfigIssues(validatedConfig) : [];
642+
policyIssues.length > 0 || opts?.validateBundledChannels
643+
? collectRawBundledChannelConfigIssues(validatedConfig)
644+
: [];
642645
if (channelIssues.length > 0) {
643646
return {
644647
ok: false,

0 commit comments

Comments
 (0)