修复最终回复失败测试重试超时
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 7m5s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 7m17s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 7m18s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 7m41s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m31s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m26s
Project CI / Repository checks (pull_request) Successful in 4m2s
Project CI / Frontend tests (pull_request) Successful in 5m29s
Project CI / Backend tests (pull_request) Successful in 8m18s
Project CI / Native shell tests (pull_request) Successful in 9m38s
Project CI / AI game creator shell web tests (pull_request) Successful in 5m10s
Project CI / AI game creator shell Rust shard 1/4 (push) Successful in 6m44s
Project CI / AI game creator shell Rust shard 2/4 (push) Successful in 6m26s
Project CI / AI game creator shell Rust shard 3/4 (push) Successful in 5m13s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m59s
Project CI / AI game creator shell Rust shard 4/4 (push) Successful in 4m25s
Project CI / AI game creator shell Rust crates (push) Successful in 1m19s
Project CI / Repository checks (push) Successful in 4m54s
Project CI / Frontend tests (push) Successful in 5m52s
Project CI / Backend tests (push) Successful in 7m4s
Project CI / AI game creator shell web tests (push) Successful in 2m38s
Project CI / Native shell tests (push) Successful in 8m0s

最终回复失败测试显式关闭 Provider 重试

让非法回复 mock 按实际请求次数监听

同步运行态公共失败审计测试的 mock 参数
This commit was merged in pull request #415.
This commit is contained in:
2026-09-18 04:55:05 +08:00
parent 30c377d0f0
commit a2e6f205d6
2 changed files with 5 additions and 7 deletions
@@ -1576,6 +1576,7 @@ pub(crate) fn spawn_mock_llm_server_responses(response_contents: Vec<String>) ->
pub(crate) fn spawn_mock_llm_tool_plan_then_invalid_final_reply(
planning_response: String,
final_reply_requests: usize,
) -> String {
let listener = bind_test_tcp_listener("mock invalid final reply bind");
let base_url = format!("http://{}", listener.local_addr().expect("mock llm addr"));
@@ -1617,11 +1618,7 @@ pub(crate) fn spawn_mock_llm_tool_plan_then_invalid_final_reply(
.write_all(planning_response.as_bytes())
.expect("mock tool plan response");
// Autonomous runs enforce a 12-retry floor. Return the same malformed
// response for the initial final-reply request and every retry so this
// fixture tests deserialize exhaustion rather than an accidental
// connection-refused fallback after the first malformed response.
for _ in 0..=12 {
for _ in 0..final_reply_requests.max(1) {
let (mut final_stream, _) = listener.accept().expect("mock final reply accept");
drop(read_mock_http_request(&mut final_stream));
let invalid_body = "{invalid-json";
@@ -5934,7 +5931,7 @@ async fn background_agent_runtime_marks_response_plan_step_failed_when_final_rep
"response": ""
})
.to_string();
let base_url = spawn_mock_llm_tool_plan_then_invalid_final_reply(plan_json);
let base_url = spawn_mock_llm_tool_plan_then_invalid_final_reply(plan_json, 1);
let _config_guard = write_test_local_config(format!(
r#"{{
"agentLlm": {{
@@ -5943,6 +5940,7 @@ async fn background_agent_runtime_marks_response_plan_step_failed_when_final_rep
"baseUrl": {base_url:?},
"model": "design-runtime-model",
"apiKind": "openai_responses",
"maxRetries": 0,
"retryBackoffMs": 1
}}
}}
@@ -1147,7 +1147,7 @@ async fn background_final_reply_failure_keeps_private_conversation_and_hashes_pu
"response": ""
})
.to_string();
let base_url = spawn_mock_llm_tool_plan_then_invalid_final_reply(planning_response);
let base_url = spawn_mock_llm_tool_plan_then_invalid_final_reply(planning_response, 1);
replace_test_local_config(
&config_path,
format!(