Skip to content

flake: TestAdvisorChainMode_SnapshotKeepsFullHistory #1510

@flake-investigator

Description

@flake-investigator

CI Run: https://github.com/coder/coder/actions/runs/25187004962
Failed Job: test-go-pg (ubuntu-latest) (https://github.com/coder/coder/actions/runs/25187004962/job/73846908985)
Failure time: 2026-04-30T20:18:54Z (same day as Slack alert)
Commit: 27b527dc7f6a3a19302d61ee060f105d263117ec (author: david-fraley)

Failure:

=== FAIL: coderd/x/chatd TestAdvisorChainMode_SnapshotKeepsFullHistory (25.44s)
    chatd_test.go:9583:
        Error:       Condition never satisfied
        Test:        TestAdvisorChainMode_SnapshotKeepsFullHistory

Log snippet:

2026-04-30 20:16:38.332 [warn]  chatdebug: failed to load runtime admin chat debug logging setting  error="context canceled"
2026-04-30 20:16:38.332 [info]  processor: chat interrupted  chat_id=6581010f-10a8-470d-8606-64dcd042abe0
chatd_test.go:9583:
    Error:       Condition never satisfied

Error analysis:

  • Single test failure in coderd/x/chatd/chatd_test.go.
  • The failing assertion is a require.Eventually that waits for the chain-mode advisor call to complete and the chat to reach a waiting/error status. It timed out, suggesting the processing loop didn’t settle in time.
  • No panic/OOM indicators seen in the job logs around the failure; no data race warnings observed in this job.

Root cause classification: Flaky test (timing-dependent processing in chain mode + advisor snapshot flow).

Assignment analysis:

  • Intended blame: git blame -L 9453,9608 coderd/x/chatd/chatd_test.go (function TestAdvisorChainMode_SnapshotKeepsFullHistory).
  • File history via API (git log --oneline -10 --follow coderd/x/chatd/chatd_test.go) shows commit 17409a515c (“feat(coderd): wire advisor runtime to admin config”) by Thomas Kosiewski as the most recent substantive change introducing this test.
  • The test does not exist in the parent commit 06bad73df4 of 17409a515c, confirming that commit as the introducer.

Assignee: @ThomasK33

Related issues search (coder/internal):

Reproduction (best effort):

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions