稳定Agent失败审计时序测试
等待 Runtime 失败后的审计记录有界落盘 保持 final-reply-failed 审计最终存在的强断言 连续五次验证流式连接中断回归
This commit is contained in:
@@ -757,11 +757,22 @@ async fn response_stream_final_disconnect_with_retry_disabled_fails_without_comm
|
||||
final_lifecycle[0]["requestSlot"],
|
||||
final_lifecycle[1]["requestSlot"]
|
||||
);
|
||||
assert!(read_agent_db_records_for_test(&root).iter().any(|record| {
|
||||
record["recordType"] == "agent.runtime.background_task.failed"
|
||||
&& record["runId"] == run_id
|
||||
&& record["failureKind"] == "final-reply-failed"
|
||||
}));
|
||||
let mut final_reply_failed_audit = false;
|
||||
for _ in 0..250 {
|
||||
final_reply_failed_audit = read_agent_db_records_for_test(&root).iter().any(|record| {
|
||||
record["recordType"] == "agent.runtime.background_task.failed"
|
||||
&& record["runId"] == run_id
|
||||
&& record["failureKind"] == "final-reply-failed"
|
||||
});
|
||||
if final_reply_failed_audit {
|
||||
break;
|
||||
}
|
||||
std::thread::sleep(Duration::from_millis(20));
|
||||
}
|
||||
assert!(
|
||||
final_reply_failed_audit,
|
||||
"final reply transport failure audit must eventually persist"
|
||||
);
|
||||
assert_response_stream_public_surfaces_exclude(&root, "design-director", &[planning_fallback]);
|
||||
|
||||
fs::remove_dir_all(root).ok();
|
||||
|
||||
Reference in New Issue
Block a user