@@ -3896,6 +3896,8 @@ describe('Internal Route Trust', () => {
38963896 const toolId = 'test_internal_minted_token_refusal'
38973897 beforeEach ( ( ) => {
38983898 mockForgetRejectedClientCredentialToken . mockReset ( )
3899+ mockInvalidateCoordinatedClientToken . mockReset ( )
3900+ mockInvalidateCoordinatedClientToken . mockResolvedValue ( undefined )
38993901 ; ( tools as Record < string , unknown > ) [ toolId ] = {
39003902 id : toolId ,
39013903 name : 'Internal Minted Token Refusal Test' ,
@@ -3939,6 +3941,9 @@ describe('Internal Route Trust', () => {
39393941
39403942 expect ( result . success ) . toBe ( false )
39413943 expect ( mockForgetRejectedClientCredentialToken ) . toHaveBeenCalledWith ( 'minted-token' )
3944+ expect ( mockInvalidateCoordinatedClientToken ) . toHaveBeenCalledWith ( 'minted-token' , {
3945+ minimumAgeMs : 60_000 ,
3946+ } )
39423947 } )
39433948
39443949 it ( 'drops the cached token after a 403 only once it is old enough to blame' , async ( ) => {
@@ -3948,19 +3953,24 @@ describe('Internal Route Trust', () => {
39483953 expect ( mockForgetRejectedClientCredentialToken ) . toHaveBeenCalledWith ( 'minted-token' , {
39493954 minimumAgeMs : 60_000 ,
39503955 } )
3956+ expect ( mockInvalidateCoordinatedClientToken ) . toHaveBeenCalledWith ( 'minted-token' , {
3957+ minimumAgeMs : 60_000 ,
3958+ } )
39513959 } )
39523960
39533961 it ( 'keeps the token after a call the provider accepts' , async ( ) => {
39543962 const result = await runWith ( 'service_account' , 200 )
39553963
39563964 expect ( result . success ) . toBe ( true )
39573965 expect ( mockForgetRejectedClientCredentialToken ) . not . toHaveBeenCalled ( )
3966+ expect ( mockInvalidateCoordinatedClientToken ) . not . toHaveBeenCalled ( )
39583967 } )
39593968
39603969 it ( "never drops a signed-in account's token" , async ( ) => {
39613970 await runWith ( 'oauth' , 401 )
39623971
39633972 expect ( mockForgetRejectedClientCredentialToken ) . not . toHaveBeenCalled ( )
3973+ expect ( mockInvalidateCoordinatedClientToken ) . not . toHaveBeenCalled ( )
39643974 } )
39653975
39663976 it ( 'reports an expired saved token instead of the bare refusal' , async ( ) => {
0 commit comments