稳定Agent失败审计时序测试
Project CI / Repository checks (push) Successful in 1m1s
Project CI / Frontend tests (push) Successful in 2m58s
Project CI / Backend tests (push) Successful in 4m0s
Project CI / Native shell tests (push) Successful in 14m15s

等待 Runtime 失败后的审计记录有界落盘
保持 final-reply-failed 审计最终存在的强断言
连续五次验证流式连接中断回归
This commit is contained in:
2026-08-12 22:38:59 +08:00
parent da7c4dc71c
commit f395a6ed36
@@ -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();