From 2e40e48a0c67e997ab88868edb14cd7e1278607b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 00:28:54 +0000 Subject: [PATCH] fix: add client-side fetch timeout, document structural validation tradeoff Co-Authored-By: mantra --- apps/dashboard/src/lib/config-update.tsx | 1 + packages/local-config-updater/src/index.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/apps/dashboard/src/lib/config-update.tsx b/apps/dashboard/src/lib/config-update.tsx index 05b712e4c..1cee1c0d0 100644 --- a/apps/dashboard/src/lib/config-update.tsx +++ b/apps/dashboard/src/lib/config-update.tsx @@ -505,6 +505,7 @@ async function updateRemoteDevelopmentEnvironmentConfigFile( config_update: configUpdate, wait_for_sync: true, }), + signal: AbortSignal.timeout(130_000), }); if (!response.ok) { throw new Error(`Failed to update local development environment config (${response.status}): ${await response.text()}`); diff --git a/packages/local-config-updater/src/index.ts b/packages/local-config-updater/src/index.ts index 00ba3815c..f880b783c 100644 --- a/packages/local-config-updater/src/index.ts +++ b/packages/local-config-updater/src/index.ts @@ -275,6 +275,11 @@ async function validateAgentUpdate(configFilePath: string, baselineConfig: Confi return; } + // Structural-only fallback: when jiti can't evaluate the config (e.g. missing + // runtime dependencies in import-with attributes), we can only verify that + // (a) something changed on disk and (b) the file still exports `config`. + // This cannot catch silently mis-applied values — an accepted tradeoff vs. + // blocking updates entirely for configs we can't evaluate. if (flattenConfigUpdate(configUpdate).length > 0 && !snapshotsChangedOnDisk(snapshots)) { throw new Error(`Config update validation failed for ${configFilePath}: the agent did not modify the config or any of its referenced files.`); }