@@ -168,6 +168,11 @@ async function main() {
168168 const configDir = path . join ( root , 'config' ) ;
169169 const packRoot = path . join ( root , 'pack' ) ;
170170 const installRoot = path . join ( root , 'install' ) ;
171+ const bridgeScope = {
172+ tenant : 'tenant-1' ,
173+ runId : 'run-1' ,
174+ leaseId : 'lease-1' ,
175+ } ;
171176 fs . mkdirSync ( projectRoot , { recursive : true } ) ;
172177 fs . mkdirSync ( configDir , { recursive : true } ) ;
173178 fs . mkdirSync ( packRoot , { recursive : true } ) ;
@@ -332,6 +337,7 @@ async function main() {
332337 metroPublicBaseUrl : 'https://public.example.test' ,
333338 metroProxyBaseUrl : `http://127.0.0.1:${ hostPort } ` ,
334339 metroBearerToken : 'shared-token' ,
340+ ...bridgeScope ,
335341 metroPreparePort : metroPort ,
336342 metroStartupTimeoutMs : 30_000 ,
337343 metroProbeTimeoutMs : 1_000 ,
@@ -405,11 +411,20 @@ async function main() {
405411 assert . equal ( registerCalls > 0 , true , 'expected companion registration request' ) ;
406412 assert . equal ( bridgeCalls >= 2 , true , 'expected bridge retry before success' ) ;
407413 assert . equal ( bridgeSucceeded , true , 'expected bridge success after registration' ) ;
414+ assert . equal ( registerBody . tenantId , bridgeScope . tenant ) ;
415+ assert . equal ( registerBody . runId , bridgeScope . runId ) ;
416+ assert . equal ( registerBody . leaseId , bridgeScope . leaseId ) ;
408417 assert . equal ( registerBody . local_base_url , `http://127.0.0.1:${ metroPort } ` ) ;
418+ assert . equal ( bridgeBodies [ 0 ] ?. tenantId , bridgeScope . tenant ) ;
419+ assert . equal ( bridgeBodies [ 0 ] ?. runId , bridgeScope . runId ) ;
420+ assert . equal ( bridgeBodies [ 0 ] ?. leaseId , bridgeScope . leaseId ) ;
409421 assert . equal (
410422 bridgeBodies [ 0 ] ?. ios_runtime ?. metro_bundle_url ,
411423 'https://public.example.test/index.bundle?platform=ios&dev=true&minify=false' ,
412424 ) ;
425+ assert . equal ( bridgeBodies . at ( - 1 ) ?. tenantId , bridgeScope . tenant ) ;
426+ assert . equal ( bridgeBodies . at ( - 1 ) ?. runId , bridgeScope . runId ) ;
427+ assert . equal ( bridgeBodies . at ( - 1 ) ?. leaseId , bridgeScope . leaseId ) ;
413428 assert . equal (
414429 bridgeBodies . at ( - 1 ) ?. ios_runtime ?. metro_bundle_url ,
415430 'https://public.example.test/index.bundle?platform=ios&dev=true&minify=false' ,
0 commit comments