fix: allow onboarding config size drops

This commit is contained in:
Peter Steinberger
2026-05-01 13:39:23 +01:00
parent 394bc9c465
commit 12882a88b1
5 changed files with 5 additions and 1 deletions

View File

@@ -83,6 +83,7 @@ async function runNonInteractiveMigrationImport(params: {
await replaceConfigFile({
nextConfig: config,
...(params.baseHash !== undefined ? { baseHash: params.baseHash } : {}),
writeOptions: { allowConfigSizeDrop: true },
});
logConfigUpdated(params.runtime);
return config;

View File

@@ -208,6 +208,7 @@ export async function runNonInteractiveLocalSetup(params: {
await replaceConfigFile({
nextConfig,
...(baseHash !== undefined ? { baseHash } : {}),
writeOptions: { allowConfigSizeDrop: true },
});
logConfigUpdated(runtime);
await preparePostConfigBundledRuntimeDeps({ config: nextConfig, runtime });

View File

@@ -42,6 +42,7 @@ export async function runNonInteractiveRemoteSetup(params: {
await replaceConfigFile({
nextConfig,
...(baseHash !== undefined ? { baseHash } : {}),
writeOptions: { allowConfigSizeDrop: true },
});
logConfigUpdated(runtime);

View File

@@ -537,6 +537,7 @@ describe("runSetupWizard", () => {
}),
}),
}),
writeOptions: expect.objectContaining({ allowConfigSizeDrop: true }),
}),
);
expect(ensureWorkspaceAndSessions).toHaveBeenCalledWith(

View File

@@ -61,7 +61,7 @@ async function writeWizardConfigFile(config: OpenClawConfig): Promise<OpenClawCo
commit: async (nextConfig, writeOptions) => {
await replaceConfigFile({
nextConfig,
...(writeOptions ? { writeOptions } : {}),
writeOptions: { ...writeOptions, allowConfigSizeDrop: true },
afterWrite: { mode: "auto" },
});
},