fix(audit): Batch 0-1 文档校准 + let _ = 静默错误修复
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Batch 0: - TRUTH.md 中间件层 14→15 (补 EvolutionMiddleware@78) - wiki/middleware.md 同步 15 层 + 优先级分类更新 - Store 数字确认 25 个 Batch 1: - approvals.rs: 3 处 map_err+let _ = 简化为 if let Err - director.rs: oneshot send 失败添加 debug 日志 - task.rs: 4 处子任务状态更新添加 debug 日志 - chat.rs: 流消息发送和事件 emit 添加 warn/debug 日志 - heartbeat.rs: 告警广播添加 debug 日志 + break 优化 全量测试通过: 719 passed, 0 failed
This commit is contained in:
@@ -112,12 +112,14 @@ impl Tool for TaskTool {
|
||||
let task_id = sub_agent_id.to_string();
|
||||
|
||||
if let Some(ref tx) = context.event_sender {
|
||||
let _ = tx.send(LoopEvent::SubtaskStatus {
|
||||
if tx.send(LoopEvent::SubtaskStatus {
|
||||
task_id: task_id.clone(),
|
||||
description: description.to_string(),
|
||||
status: "started".to_string(),
|
||||
detail: None,
|
||||
}).await;
|
||||
}).await.is_err() {
|
||||
tracing::debug!("[TaskTool] Subtask status dropped: parent loop ended");
|
||||
}
|
||||
}
|
||||
|
||||
// Create a fresh session for the sub-agent
|
||||
@@ -161,12 +163,14 @@ impl Tool for TaskTool {
|
||||
|
||||
// Emit subtask_running event
|
||||
if let Some(ref tx) = context.event_sender {
|
||||
let _ = tx.send(LoopEvent::SubtaskStatus {
|
||||
if tx.send(LoopEvent::SubtaskStatus {
|
||||
task_id: task_id.clone(),
|
||||
description: description.to_string(),
|
||||
status: "running".to_string(),
|
||||
detail: Some("子Agent正在执行中...".to_string()),
|
||||
}).await;
|
||||
}).await.is_err() {
|
||||
tracing::debug!("[TaskTool] Subtask status dropped: parent loop ended");
|
||||
}
|
||||
}
|
||||
|
||||
// Execute the sub-agent loop (non-streaming — collect full result)
|
||||
@@ -179,7 +183,7 @@ impl Tool for TaskTool {
|
||||
|
||||
// Emit subtask_completed event
|
||||
if let Some(ref tx) = context.event_sender {
|
||||
let _ = tx.send(LoopEvent::SubtaskStatus {
|
||||
if tx.send(LoopEvent::SubtaskStatus {
|
||||
task_id: task_id.clone(),
|
||||
description: description.to_string(),
|
||||
status: "completed".to_string(),
|
||||
@@ -187,7 +191,9 @@ impl Tool for TaskTool {
|
||||
"完成 ({}次迭代, {}输入token)",
|
||||
loop_result.iterations, loop_result.input_tokens
|
||||
)),
|
||||
}).await;
|
||||
}).await.is_err() {
|
||||
tracing::debug!("[TaskTool] Subtask status dropped: parent loop ended");
|
||||
}
|
||||
}
|
||||
|
||||
json!({
|
||||
@@ -204,12 +210,14 @@ impl Tool for TaskTool {
|
||||
|
||||
// Emit subtask_failed event
|
||||
if let Some(ref tx) = context.event_sender {
|
||||
let _ = tx.send(LoopEvent::SubtaskStatus {
|
||||
if tx.send(LoopEvent::SubtaskStatus {
|
||||
task_id: task_id.clone(),
|
||||
description: description.to_string(),
|
||||
status: "failed".to_string(),
|
||||
detail: Some(e.to_string()),
|
||||
}).await;
|
||||
}).await.is_err() {
|
||||
tracing::debug!("[TaskTool] Subtask status dropped: parent loop ended");
|
||||
}
|
||||
}
|
||||
|
||||
json!({
|
||||
|
||||
Reference in New Issue
Block a user