Thanks to visit codestin.com
Credit goes to github.com

Skip to content

flake: TestActiveServer_AnthropicProviderToolPreRequestGuard #1589

Description

@flake-investigator

CI Failure Details

CI Run: https://github.com/coder/coder/actions/runs/27441018780
Failed Job: https://github.com/coder/coder/actions/runs/27441018780/job/81114905916 (test-go-pg-17)
Commit: d6aa3d61ee4ad38b60d887641ff8084f4b676c2b (TJ) coder/coder@d6aa3d6

Failing Test

TestActiveServer_AnthropicProviderToolPreRequestGuard/allowed_web_search_survives_when_provider_tool_is_enabled

File: coderd/x/chatd/chatd_test.go (around line ~6957)

Error Output

=== FAIL: coderd/x/chatd TestActiveServer_AnthropicProviderToolPreRequestGuard/allowed_web_search_survives_when_provider_tool_is_enabled (31.12s)
    chatd_test.go:6957:
        Error Trace: /home/runner/work/coder/coder/testutil/eventually.go:45
                     /home/runner/work/coder/coder/coderd/x/chatd/chatd_chainmode_test.go:493
                     /home/runner/work/coder/coder/coderd/x/chatd/chatd_test.go:6957
        Error:       Received unexpected error:
                     context deadline exceeded
        Messages:    Eventually timed out
    chatd_test.go:6960:
        Error:       "[...]" should have 2 item(s), but has 1

Error Analysis

The test waits for a second Anthropic streaming request after inserting a provider tool pair message and sending a follow-up user message. The testutil.Eventually loop timed out (context deadline exceeded), and the recorded requests list only contained 1 item instead of the expected 2.

Root Cause Assessment

Likely flaky timing in chatd processing or request recording for provider tool guard scenarios; the second generation request was not observed before the test deadline.

Data Race / Panic / OOM Checks

Searched the job logs for WARNING: DATA RACE, panic:, out of memory, signal: killed — none found.

Assignment Analysis

Intended blame command:

  • git blame -L 6930,6985 coderd/x/chatd/chatd_test.go

Proxy via history (available tooling):

  • git log --oneline -10 --follow coderd/x/chatd/chatd_test.go
    • Most recent substantive change touching this test file: 4debd23c ("fix: chatd refactor") by Hugo Dutka.

Assigning to @hugodutka as the most recent modifier of the failing test area.

Related Issues

Searched coder/internal for:

  • TestActiveServer_AnthropicProviderToolPreRequestGuard
  • AnthropicProviderToolPreRequestGuard
  • coderd/x/chatd/chatd_test.go
  • context deadline exceeded + chatd

No matching issues found.

Reproduction

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

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions