Skip to content

test(coderd): TestPlugins/LinkSendAndDeliver is flaky (chat label empty) #353

Closed

Description

@ibetitsmike

Coder Agents filed this issue on behalf of @ibetitsmike.

Summary

TestPlugins/LinkSendAndDeliver is flaky on main. It fails at coderd/plugins_test.go:222: the chat label is "" where the test expects "bridge".

Evidence

Suspected cause (not verified)

The parallel subtest ConverseScopeOnlyReachesChats creates an unlabeled chat for the same member. Delivery then makes it the idle link's active chat, and send posts to that chat instead of creating a new one.

Acceptance

  • Root cause confirmed.
  • The subtests no longer share state, or the assertion no longer depends on which chat is active.
  • go test -race -count=20 -run 'TestPlugins/LinkSendAndDeliver' ./coderd/ passes.

Activity

  1. ibetitsmike commented on Nov 15, 2026

    @ibetitsmike
    OwnerAuthor

    Coder Agents acted on behalf of @ibetitsmike.

    Cause, found by the #305 workstream while testing #351 (reproduced on main c3d59eaf09, run 5 of 25): the parallel subtest ConverseScopeOnlyReachesChats creates an unlabeled chat for the same member. When that chat replies while the new link is idle, delivery makes it the active chat of the link, so the next send reuses it instead of creating a labeled chat, and the label comes back as "". Likely fix: give that subtest its own user.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions