fix: stabilize channel migration

This commit is contained in:
Peter Steinberger
2026-01-13 06:27:55 +00:00
parent 90342a4f3a
commit 993c1de361
6 changed files with 39 additions and 24 deletions

View File

@@ -352,11 +352,15 @@ export function createConfigIO(overrides: ConfigIoDeps = {}) {
}
const migrated = applyLegacyMigrations(resolved);
const resolvedConfig = migrated.next ?? resolved;
const legacyIssues = findLegacyConfigIssues(resolvedConfig);
const resolvedConfigRaw = migrated.next ?? resolved;
const legacyIssues = findLegacyConfigIssues(resolvedConfigRaw);
const validated = validateConfigObject(resolvedConfig);
const validated = validateConfigObject(resolvedConfigRaw);
if (!validated.ok) {
const resolvedConfig =
typeof resolvedConfigRaw === "object" && resolvedConfigRaw !== null
? (resolvedConfigRaw as ClawdbotConfig)
: {};
return {
path: configPath,
exists: true,