@@ -3894,6 +3894,8 @@ describe('Internal Route Trust', () => {
38943894 const toolId = 'test_internal_minted_token_refusal'
38953895 beforeEach ( ( ) => {
38963896 mockForgetRejectedClientCredentialToken . mockReset ( )
3897+ mockInvalidateCoordinatedClientToken . mockReset ( )
3898+ mockInvalidateCoordinatedClientToken . mockResolvedValue ( undefined )
38973899 ; ( tools as Record < string , unknown > ) [ toolId ] = {
38983900 id : toolId ,
38993901 name : 'Internal Minted Token Refusal Test' ,
@@ -3937,6 +3939,9 @@ describe('Internal Route Trust', () => {
39373939
39383940 expect ( result . success ) . toBe ( false )
39393941 expect ( mockForgetRejectedClientCredentialToken ) . toHaveBeenCalledWith ( 'minted-token' )
3942+ expect ( mockInvalidateCoordinatedClientToken ) . toHaveBeenCalledWith ( 'minted-token' , {
3943+ minimumAgeMs : 60_000 ,
3944+ } )
39403945 } )
39413946
39423947 it ( 'drops the cached token after a 403 only once it is old enough to blame' , async ( ) => {
@@ -3946,19 +3951,24 @@ describe('Internal Route Trust', () => {
39463951 expect ( mockForgetRejectedClientCredentialToken ) . toHaveBeenCalledWith ( 'minted-token' , {
39473952 minimumAgeMs : 60_000 ,
39483953 } )
3954+ expect ( mockInvalidateCoordinatedClientToken ) . toHaveBeenCalledWith ( 'minted-token' , {
3955+ minimumAgeMs : 60_000 ,
3956+ } )
39493957 } )
39503958
39513959 it ( 'keeps the token after a call the provider accepts' , async ( ) => {
39523960 const result = await runWith ( 'service_account' , 200 )
39533961
39543962 expect ( result . success ) . toBe ( true )
39553963 expect ( mockForgetRejectedClientCredentialToken ) . not . toHaveBeenCalled ( )
3964+ expect ( mockInvalidateCoordinatedClientToken ) . not . toHaveBeenCalled ( )
39563965 } )
39573966
39583967 it ( "never drops a signed-in account's token" , async ( ) => {
39593968 await runWith ( 'oauth' , 401 )
39603969
39613970 expect ( mockForgetRejectedClientCredentialToken ) . not . toHaveBeenCalled ( )
3971+ expect ( mockInvalidateCoordinatedClientToken ) . not . toHaveBeenCalled ( )
39623972 } )
39633973
39643974 it ( 'reports an expired saved token instead of the bare refusal' , async ( ) => {
0 commit comments