Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat intent threads as new based on gate.status. #4558

Merged

Conversation

jrobbins
Copy link
Collaborator

This should resolve a problem that Panos brought up in chat today.

When the review functionality was first designed, there was no gate.state variable, instead the state of the gate was always derived from the set of votes on that gate. So, in detect_intent, an incoming email message is considered to be the start of an intent thread if there were no votes on its gate. The problem with that is that a reviewer can manually vote REVIEW_STARTED or a vote of NO_RESPONSE can be entered for an assigned reviewer. So, the list of votes might not be empty even before the intent thread starts.

Now that we have gate.state and it has been backfilled for all existing gates, we can use that to make a better decision about when an incoming email message is actually the start of an intent thread. If the gate is in the initial PREPARING state, regardless of Votes, then we treat the thread as new, and so the gate becomes REVIEW_REQUESTED. If the gate was anything else, we treat the message as an ongoing discussion, which basically means that we leave the gate state as-is.

@jrobbins jrobbins requested a review from KyleJu November 13, 2024 01:09
@jrobbins jrobbins merged commit f9f5571 into main Nov 13, 2024
7 checks passed
@jrobbins jrobbins deleted the 20241112-treat-intent-threads-as-new-based-on-gate.status branch November 13, 2024 18:14
@ghost
Copy link

ghost commented Nov 26, 2024

Why aren't i receiving messages to my devics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants