Flaky test: tests/sentry/api/endpoints/test_organization_ai_conversations.py::OrganizationAIConversationsEndpointTest::test_tokens_only_counted_from_ai_client_spans
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 21h 10m
- Merged PRs (30d)
- 635
Description
Failing test: `tests/sentry/api/endpoints/test_organization_ai_conversations.py::OrganizationAIConversationsEndpointTest::test_tokens_only_counted_from_ai_client_spans`
Sentry sha: 4a80dec864917198998a489a30e28e2fbdcef252
Run: https://github.com/getsentry/sentry/actions/runs/22426766678
```
[1m[31mtests/sentry/api/endpoints/test_organization_ai_conversations.py[0m:1256: in test_tokens_only_counted_from_ai_client_spans
assert conversation["flow"] == ["Test Agent"]
[1m[31mE AssertionError: assert [] == ['Test Agent'][0m
[1m[31mE [0m
[1m[31mE Right contains one more item: 'Test Agent'[0m
[1m[31mE [0m
[1m[31mE Full diff:[0m
[1m[31mE + [][0m
[1m[31mE - [[0m
[1m[31mE - 'Test Agent',[0m
[1m[31mE - ][0m
```
Contributor guide
Research direction
Start with tests/sentry/api/endpoints/test_organization_ai_conversations.py and rerun OrganizationAIConversationsEndpointTest::test_tokens_only_counted_from_ai_client_spans using the reported Sentry SHA and GitHub Actions run. Investigate why conversation["flow"] is intermittently empty; done means the test reliably observes ["Test Agent"] and passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100