@@ -95,6 +95,9 @@ let lastSyncedSessionStorePath: string | undefined;
9595let lastSyncedSessionConfigJson : string | undefined ;
9696let activeSuiteGatewayServerCount = 0 ;
9797let activeSuiteHookScopeCount = 0 ;
98+ // Gateway tests exercise RPC/server behavior, not production bind auto-detection by default.
99+ // Keep suite fixtures loopback-stable inside containers; bind-specific tests opt in explicitly.
100+ const DEFAULT_GATEWAY_TEST_BIND = "loopback" as const ;
98101
99102function resolveGatewayTestMainSessionKeys ( ) : string [ ] {
100103 const resolved = resolveMainSessionKeyFromConfig ( ) ;
@@ -316,7 +319,7 @@ async function resetGatewayTestState(options: { uniqueConfigRoot: boolean }) {
316319 sessionStoreSaveDelayMs . value = 0 ;
317320 testTailnetIPv4 . value = undefined ;
318321 testTailscaleWhois . value = null ;
319- testState . gatewayBind = undefined ;
322+ testState . gatewayBind = DEFAULT_GATEWAY_TEST_BIND ;
320323 testState . gatewayAuth = { mode : "token" , token : "test-gateway-token-1234567890" } ;
321324 testState . gatewayControlUi = undefined ;
322325 testState . hooksConfig = undefined ;
@@ -407,7 +410,7 @@ async function resetGatewayTestRuntimeOnly() {
407410 sessionStoreSaveDelayMs . value = 0 ;
408411 testTailnetIPv4 . value = undefined ;
409412 testTailscaleWhois . value = null ;
410- testState . gatewayBind = undefined ;
413+ testState . gatewayBind = DEFAULT_GATEWAY_TEST_BIND ;
411414 testState . gatewayAuth = { mode : "token" , token : "test-gateway-token-1234567890" } ;
412415 testState . gatewayControlUi = undefined ;
413416 testState . hooksConfig = undefined ;
0 commit comments