mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
fix: add client-side fetch timeout, document structural validation tradeoff
Some checks failed
DB migration compat / Check if migrations changed (push) Has been cancelled
DB migration compat / Back-compat — Current branch migrations with ${{ needs.check-migrations-changed.outputs.base_branch }} branch code (push) Has been cancelled
DB migration compat / Forward-compat — Current branch code with ${{ needs.check-migrations-changed.outputs.base_branch }} branch migrations (push) Has been cancelled
DB migration compat / No migration changes (skipped) (push) Has been cancelled
Some checks failed
DB migration compat / Check if migrations changed (push) Has been cancelled
DB migration compat / Back-compat — Current branch migrations with ${{ needs.check-migrations-changed.outputs.base_branch }} branch code (push) Has been cancelled
DB migration compat / Forward-compat — Current branch code with ${{ needs.check-migrations-changed.outputs.base_branch }} branch migrations (push) Has been cancelled
DB migration compat / No migration changes (skipped) (push) Has been cancelled
Co-Authored-By: mantra <mantra@stack-auth.com>
This commit is contained in:
parent
53fb16db11
commit
2e40e48a0c
@ -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()}`);
|
||||
|
||||
@ -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.`);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user