From 26694380fb1136c8b3e49fbc41396b2585727ab5 Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Thu, 15 Oct 2026 14:36:06 +0100 Subject: [PATCH] test(track): stub the geocode proxy routes, not the browser call Reverse geocoding now goes to /api/google/reverse-geocode on the app server, so the harness stub for maps.googleapis.com never matched and a keyed run would reach Google live. Answer both proxy routes with ZERO_RESULTS instead. Co-Authored-By: Claude Opus 5.5 --- scripts/track-regression.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/track-regression.mjs b/scripts/track-regression.mjs index 84aa2494e..756daccfc 100644 --- a/scripts/track-regression.mjs +++ b/scripts/track-regression.mjs @@ -443,7 +443,10 @@ async function main() { // for nearby names. Answer both with empty results: the entity-context // assertions are about the SELECTED contact, and a live lookup would // make the run non-hermetic (and bill the owner's Google quota). - if (url.hostname === 'maps.googleapis.com' && url.pathname.startsWith('/maps/api/geocode')) { + if ( + isAppRequest && + (url.pathname === '/api/google/reverse-geocode' || url.pathname === '/api/google/geocode') + ) { return Promise.resolve(jsonResponse({ status: 'ZERO_RESULTS', results: [] })); } if (isAppRequest && url.pathname === '/api/google/nearby-places') {