@@ -3118,10 +3118,6 @@ it.effect("shares linked summaries and reuses them for display without asking th
31183118 let calls = 0 ;
31193119 let failing = false ;
31203120 const reference = { projectId : "p1" as ProjectId , repository : "acme/web" , number : 1 } ;
3121- const linkedReference = {
3122- ...reference ,
3123- url : "https://github.com/acme/web/pull/1" ,
3124- } ;
31253121 const service = yield * makeService ( {
31263122 projects : [ project ( { id : "p1" , title : "web" , workspaceRoot : "/a" , repository : "acme/web" } ) ] ,
31273123 providers : [
@@ -3151,8 +3147,8 @@ it.effect("shares linked summaries and reuses them for display without asking th
31513147
31523148 yield * Effect . all (
31533149 [
3154- service . summary ( linkedReference , { recoverTransientFailure : false } ) ,
3155- service . summary ( linkedReference , { recoverTransientFailure : false } ) ,
3150+ service . summary ( reference , { recoverTransientFailure : false } ) ,
3151+ service . summary ( reference , { recoverTransientFailure : false } ) ,
31563152 ] ,
31573153 { concurrency : "unbounded" } ,
31583154 ) ;
@@ -3161,7 +3157,7 @@ it.effect("shares linked summaries and reuses them for display without asking th
31613157 yield * TestClock . adjust ( "61 seconds" ) ;
31623158 failing = true ;
31633159 const strict = yield * Effect . flip (
3164- service . summary ( linkedReference , { recoverTransientFailure : false } ) ,
3160+ service . summary ( reference , { recoverTransientFailure : false } ) ,
31653161 ) ;
31663162 assert . strictEqual ( strict . _tag , "PullRequestOperationError" ) ;
31673163
@@ -3216,6 +3212,43 @@ it.effect("reads a linked pull request URL from a non-Git project", () =>
32163212 } ) ,
32173213) ;
32183214
3215+ it . effect ( "keeps URL-only summaries on different hosts separate" , ( ) =>
3216+ Effect . gen ( function * ( ) {
3217+ let githubCalls = 0 ;
3218+ let bitbucketCalls = 0 ;
3219+ const service = yield * makeService ( {
3220+ projects : [ project ( { id : "parent" , title : "work" , workspaceRoot : "/work" } ) ] ,
3221+ providers : [
3222+ fakeProvider ( "github" , {
3223+ getChangeRequestSummary : ( ) => {
3224+ githubCalls += 1 ;
3225+ return Effect . succeed ( changeRequest ( 7 , "2026-09-03T00:00:00Z" ) ) ;
3226+ } ,
3227+ } ) ,
3228+ fakeProvider ( "bitbucket" , {
3229+ getChangeRequestSummary : ( ) => {
3230+ bitbucketCalls += 1 ;
3231+ return Effect . succeed ( changeRequest ( 7 , "2026-09-03T00:00:00Z" ) ) ;
3232+ } ,
3233+ } ) ,
3234+ ] ,
3235+ } ) ;
3236+ const reference = {
3237+ projectId : "parent" as ProjectId ,
3238+ repository : "acme/web" ,
3239+ number : 7 ,
3240+ } ;
3241+
3242+ yield * service . summary ( { ...reference , url : "https://github.com/acme/web/pull/7" } ) ;
3243+ yield * service . summary ( {
3244+ ...reference ,
3245+ url : "https://bitbucket.org/acme/web/pull-requests/7" ,
3246+ } ) ;
3247+
3248+ assert . deepStrictEqual ( [ githubCalls , bitbucketCalls ] , [ 1 , 1 ] ) ;
3249+ } ) ,
3250+ ) ;
3251+
32193252it . effect ( "does not use providers that cannot resolve URL-only summary hosts" , ( ) =>
32203253 Effect . gen ( function * ( ) {
32213254 for ( const testCase of [
@@ -3234,6 +3267,11 @@ it.effect("does not use providers that cannot resolve URL-only summary hosts", (
32343267 repository : "pingdotgg/t3code" ,
32353268 url : "https://bitbucket.acme.test/pingdotgg/t3code/pull-requests/9435" ,
32363269 } ,
3270+ {
3271+ provider : "github" as const ,
3272+ repository : "pingdotgg/t3code" ,
3273+ url : "https://github.acme.test/pingdotgg/t3code/pull/9435" ,
3274+ } ,
32373275 ] ) {
32383276 const service = yield * makeService ( {
32393277 projects : [ project ( { id : "parent" , title : "work" , workspaceRoot : "/work" } ) ] ,
0 commit comments