Skip to content

Commit 455536a

Browse files
ntammineediclaude
andcommitted
fix: add missing query_policy field to test OttoChatRequest initializers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3c770a7 commit 455536a

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

crates/ascend-tools-core/tests/client_http.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ fn otto_streaming_interrupted_when_sse_closes_without_terminal_event() {
417417
runtime_uuid: None,
418418
thread_id: None,
419419
model: None,
420+
query_policy: None,
420421
};
421422

422423
let mut observed_thread_id = None;
@@ -490,6 +491,7 @@ fn otto_streaming_completes_on_thread_done() {
490491
runtime_uuid: None,
491492
thread_id: None,
492493
model: None,
494+
query_policy: None,
493495
};
494496

495497
let mut text = String::new();
@@ -551,6 +553,7 @@ fn otto_streaming_completes_on_thread_stopped() {
551553
runtime_uuid: None,
552554
thread_id: None,
553555
model: None,
556+
query_policy: None,
554557
};
555558

556559
let mut text = String::new();
@@ -613,6 +616,7 @@ fn otto_streaming_cancelled_by_callback() {
613616
runtime_uuid: None,
614617
thread_id: None,
615618
model: None,
619+
query_policy: None,
616620
};
617621

618622
let mut delta_count = 0;
@@ -678,6 +682,7 @@ fn otto_streaming_handles_response_error_event() {
678682
runtime_uuid: None,
679683
thread_id: None,
680684
model: None,
685+
query_policy: None,
681686
};
682687

683688
let mut text = String::new();
@@ -751,6 +756,7 @@ fn otto_streaming_dispatches_tool_call_events() {
751756
runtime_uuid: None,
752757
thread_id: None,
753758
model: None,
759+
query_policy: None,
754760
};
755761

756762
let mut events_log: Vec<String> = Vec::new();
@@ -827,6 +833,7 @@ fn otto_streaming_skips_heartbeats_and_comments() {
827833
runtime_uuid: None,
828834
thread_id: None,
829835
model: None,
836+
query_policy: None,
830837
};
831838

832839
let mut text = String::new();
@@ -882,6 +889,7 @@ fn otto_streaming_sse_endpoint_returns_error() {
882889
runtime_uuid: None,
883890
thread_id: None,
884891
model: None,
892+
query_policy: None,
885893
};
886894

887895
let result = client.otto_streaming(&request, |_| ControlFlow::Continue(()), |_| {});
@@ -922,6 +930,7 @@ fn otto_streaming_thread_post_returns_error() {
922930
runtime_uuid: None,
923931
thread_id: None,
924932
model: None,
933+
query_policy: None,
925934
};
926935

927936
let result = client.otto_streaming(&request, |_| ControlFlow::Continue(()), |_| {});
@@ -968,6 +977,7 @@ fn otto_non_streaming_errors_on_interrupted_stream() {
968977
runtime_uuid: None,
969978
thread_id: None,
970979
model: None,
980+
query_policy: None,
971981
};
972982

973983
// otto() (non-streaming) should return an error for interrupted streams
@@ -1028,6 +1038,7 @@ fn otto_streaming_retries_409_on_follow_up() {
10281038
runtime_uuid: None,
10291039
thread_id: Some("t-existing".into()),
10301040
model: None,
1041+
query_policy: None,
10311042
};
10321043

10331044
let mut text = String::new();
@@ -1075,6 +1086,7 @@ fn otto_streaming_409_on_new_thread_returns_error() {
10751086
runtime_uuid: None,
10761087
thread_id: None, // new thread — no retry
10771088
model: None,
1089+
query_policy: None,
10781090
};
10791091

10801092
let result = client.otto_streaming(&request, |_| ControlFlow::Continue(()), |_| {});
@@ -1124,6 +1136,7 @@ fn otto_streaming_on_thread_id_called_before_events() {
11241136
runtime_uuid: None,
11251137
thread_id: None,
11261138
model: None,
1139+
query_policy: None,
11271140
};
11281141

11291142
let callback_order = std::sync::Mutex::new(Vec::<String>::new());
@@ -1185,6 +1198,7 @@ fn otto_streaming_empty_sse_stream_returns_interrupted() {
11851198
runtime_uuid: None,
11861199
thread_id: None,
11871200
model: None,
1201+
query_policy: None,
11881202
};
11891203

11901204
let response = client
@@ -1222,6 +1236,7 @@ fn otto_streaming_missing_thread_id_in_response() {
12221236
runtime_uuid: None,
12231237
thread_id: None,
12241238
model: None,
1239+
query_policy: None,
12251240
};
12261241

12271242
let result = client.otto_streaming(&request, |_| ControlFlow::Continue(()), |_| {});
@@ -1357,6 +1372,7 @@ fn otto_streaming_response_error_without_message() {
13571372
runtime_uuid: None,
13581373
thread_id: None,
13591374
model: None,
1375+
query_policy: None,
13601376
};
13611377

13621378
let response = client

crates/ascend-tools-tui/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3521,6 +3521,7 @@ mod tests {
35213521
runtime_uuid: None,
35223522
thread_id: None,
35233523
model: None,
3524+
query_policy: None,
35243525
});
35253526

35263527
// The main loop guard is: if !app.interrupting && let Some(req) = app.take_pending_request()

0 commit comments

Comments
 (0)