fix: route annotation queue score lookups to queriers (#13801)

## Summary

- route Discovery and annotation queue endpoints to queriers so score
lookups, item hydration, and review reads do not fall through to
ingesters
- make Discovery source_stream required at the API response boundary
- cover Discovery, queue item detail, and review routing with regression
tests

The QueueItem remains reference-only. Workbench and enqueue validation
derive source_stream from timestamp-bounded _llm_scores queries in the
enterprise implementation.

Depends on https://github.com/openobserve/o2-enterprise/pull/2423

## Testing

- 5 querier routing tests
- Discovery response serialization test with the enterprise feature
- 16 enterprise annotation queue tests
- 14 enterprise Discovery tests
This commit is contained in:
udev
2026-08-17 05:24:31 +00:00
committed by GitHub
parent d770d0245a
commit 35860aff9d
2 changed files with 16 additions and 5 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ pub struct DiscoveryItemResponseBody {
pub trace_id: Option<String>,
pub session_id: Option<String>,
pub ref_timestamp: i64,
pub source_stream: Option<String>,
pub source_stream: String,
/// Derived quality: `issue` for one unhealthy dimension and `multiple` for
/// two or more unhealthy dimensions.
pub quality: String,
@@ -217,7 +217,7 @@ mod tests {
trace_id: Some("trace-1".to_string()),
session_id: None,
ref_timestamp: 123,
source_stream: Some("traces".to_string()),
source_stream: "traces".to_string(),
quality: DiscoveryQuality::Issue,
issue_count: 1,
context: Some(serde_json::json!({