diff --git a/scripts/check-gateway-watch-regression.mjs b/scripts/check-gateway-watch-regression.mjs index 04856fb6777..925ea5f9b16 100644 --- a/scripts/check-gateway-watch-regression.mjs +++ b/scripts/check-gateway-watch-regression.mjs @@ -588,6 +588,10 @@ async function main() { // Refresh the build stamp after the gateway build finishes so run-node // does not spuriously rebuild inside the bounded watch window. writeBuildStamp({ cwd: process.cwd() }); + } else { + // Restored CI artifacts can be older than the fresh checkout mtimes. + // Refresh only the stamp so run-node trusts the already-built dist. + writeBuildStamp({ cwd: process.cwd() }); } const preflightBuildRequirement = resolveBuildRequirement(buildRunNodeDeps(process.env));