Skip to content

LuisAdaptiveRecognizer incorrectly clones turncontext leading to middleware being ignored. #4536

Closed

Description

Version

4.10.0

Describe the bug

In Adaptive libraries we moved to a new Recognzer model which allows you to recognize arbitrary Activity objects.  The legacy LuisRecognizer implements IRecognzier which is TurnContext based and only recognizes the turnContext.Activity.  To prevent us from forking the old recognizer code, we simply created a cloned TurnContext with TurnContext.Activity=ActivityToRecgonize.

The issue is that we didn't do a full clone of the TurnContext, namely we dropped the internal middleware queues that the TurnContext has.  This means that outgoing messages from the Luis (aka trace messages) were not sent through middleware and so not logged into transcripts at all.  

To Reproduce

  1. Add transcriptmiddleware
  2. call LuisRecognizer
  3. Trace will show up in emulator output, but not in transcript, because the transcript middleware is bypassed.

Expected behavior

Middleware should be invoked by LuisRecognizer SendActivities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Area: AdaptiveThe issue is related to Adaptive dialogsbugIndicates an unexpected problem or an unintended behavior.needs-triageThe issue has just been created and it has not been reviewed by the team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions