Skip to content

Conversation

@gpaoloni
Copy link
Collaborator

Description

This PR is a cherry pick of the latest commit of #3644, which fixes the bug reported by USCH (https://tech-matters.atlassian.net/browse/CHI-3543).

The fix consist of moving the conversationJoined event subscriptions to be done during beforeAcceptTask event, rather than afterAcceptTask, to avoid a race condition on events ordering.

Checklist

Other Related Issues

None

Verification steps

AFTER YOU MERGE

  1. Cut a release tag using the Github workflow. Wait for it to complete and notify in the #aselo-deploys Slack channel.
  2. Comment on the ticket with the release tag version AND any additional instructions required to configure an environment to test the changes.
  3. Only then move the ticket into the QA column in JIRA

You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P

@gpaoloni gpaoloni requested a review from stephenhand October 24, 2025 18:24
manager.conversationsClient.once('conversationJoined', (c: Conversation) => trySendWelcomeMessage(c, 0, 0));
};

export const beforeAcceptTask = (setupObject: SetupObject, getMessage: GetMessage) => async (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be aware that beforeAcceptTask fires whether the counselor accepts the task or not. It seems like this would be unintended behaviour if the user didn't accept the task they were offered

I'm pretty sure this is the case because we've had production outages caused by this very problem before. I wouls at least very thoroughly test the scenario where a task is refused and accepted by someone else before merging this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disregard, tested and confirmed it happens just before accepting

@gpaoloni gpaoloni merged commit cdb6b3e into v2.42-rc Oct 24, 2025
22 checks passed
@gpaoloni gpaoloni deleted the gian_fix-welc-msg-rc branch October 24, 2025 20:35
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.

3 participants