Skip to content

flake: TestEditMessageRejectsArchivedChat #1502

@flake-investigator

Description

@flake-investigator

CI Failure

Failure

  • Test: coderd/x/chatd.TestEditMessageRejectsArchivedChat
  • Log excerpt:
=== FAIL: coderd/x/chatd TestEditMessageRejectsArchivedChat (0.28s)
    chatd_test.go:8493:
        Error: "[...]" should have 1 item(s), but has 2

Analysis

The test creates a chat with InitialUserContent, reads messages, and expects exactly one message before archiving the chat. The failure shows two messages were present, which suggests an asynchronous processor/worker created a second message before the test read the message list. This looks timing-dependent and intermittent.

No panic/OOM/data-race markers in the logs.

Assignment analysis

  • The test was introduced in commit f8fe5d680b3a325c7198ccce195f934a1a51e2fb (fix(coderd): reject API operations on archived chats), which added TestEditMessageRejectsArchivedChat to coderd/x/chatd/chatd_test.go.
  • Recent test changes and ownership align with that commit, so assigning to the author of that change.

Reproduction

go test ./coderd/x/chatd -run TestEditMessageRejectsArchivedChat -count=1

Related Issues

None found after searching coder/internal for:

  • TestEditMessageRejectsArchivedChat
  • chatd_test.go + archived edit
  • "should have 1 item(s), but has 2"

Metadata

Metadata

Assignees

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