fix: restore config dry-run schema validation · openclaw/openclaw@81fea91
steipete
·
2026-05-03
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1313,6 +1313,7 @@ function collectDryRunSchemaErrors(params: {
|
1313 | 1313 | }): ConfigSetDryRunError[] { |
1314 | 1314 | const validated = validateConfigObjectRaw(params.config, { |
1315 | 1315 | touchedPaths: params.operations.map((operation) => operation.setPath), |
| 1316 | +validateBundledChannels: true, |
1316 | 1317 | }); |
1317 | 1318 | if (validated.ok) { |
1318 | 1319 | return []; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -21989,12 +21989,13 @@ export const GENERATED_BASE_CONFIG_SCHEMA: BaseConfigSchemaResponse = {
|
21989 | 21989 | "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.", |
21990 | 21990 | }, |
21991 | 21991 | channels: { |
| 21992 | + type: "object", |
| 21993 | + properties: {}, |
| 21994 | + additionalProperties: true, |
21992 | 21995 | title: "Channels", |
21993 | 21996 | description: |
21994 | 21997 | "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: {}, |
21996 | 21998 | required: [], |
21997 | | - additionalProperties: true, |
21998 | 21999 | }, |
21999 | 22000 | discovery: { |
22000 | 22001 | type: "object", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -621,9 +621,10 @@ function validateGatewayTailscaleBind(config: OpenClawConfig): ConfigValidationI
|
621 | 621 | */ |
622 | 622 | export function validateConfigObjectRaw( |
623 | 623 | raw: unknown, |
624 | | -_opts?: { |
| 624 | +opts?: { |
625 | 625 | sourceRaw?: unknown; |
626 | 626 | touchedPaths?: ReadonlyArray<ReadonlyArray<string>>; |
| 627 | +validateBundledChannels?: boolean; |
627 | 628 | }, |
628 | 629 | ): { ok: true; config: OpenClawConfig } | { ok: false; issues: ConfigValidationIssue[] } { |
629 | 630 | const normalizedRaw = stripDeprecatedValidationKeys(raw); |
@@ -638,7 +639,9 @@ export function validateConfigObjectRaw(
|
638 | 639 | } |
639 | 640 | const validatedConfig = validated.data as OpenClawConfig; |
640 | 641 | const channelIssues = |
641 | | -policyIssues.length > 0 ? collectRawBundledChannelConfigIssues(validatedConfig) : []; |
| 642 | +policyIssues.length > 0 || opts?.validateBundledChannels |
| 643 | + ? collectRawBundledChannelConfigIssues(validatedConfig) |
| 644 | + : []; |
642 | 645 | if (channelIssues.length > 0) { |
643 | 646 | return { |
644 | 647 | ok: false, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。