There was no agreement not to expand to the Russian borders:
Did NATO Promise Not to Enlarge? Gorbachev Says “No”
Western leaders never pledged not to enlarge NATO, a point that several analysts have demonstrated. Mark Kramer explored the question in detail in a 2009 article in The Washington Quarterly. He drew on declassified American, German and Soviet records to make his case and noted that, in discussions on German reunification in the two-plus-four format (the two Germanys plus the United States, Soviet Union, Britain and France), the Soviets never raised the question of NATO enlargement other than how it might apply in the former German Democratic Republic (GDR).
https://www.brookings.edu/blog/up-front/2014/11/06/did-nato-promise-not-to-enlarge-gorbachev-says-no/