新增: B5 续作引擎完整批: 自领+停靠恢复+监控推送+提交冻结
- B5 引擎: 看板轮询自动领单(G2 门禁 fail-closed, 领单原子写), parked 自动恢复优先, 收敛回读续作, 3 次熔断自停, KV 配置默认关
- 引擎配套: 提交冻结同步(df-commit-frozen), 工具结果外载过期清理, 工具失败快速记忆, 自监控快照飞书推送(df-monitor-chat-id)
- 领单判据收紧: 正文以 🔴 开头才判高危(正文提及字样不误判)
- 28 注入末轮竞态: 补充指令落末轮时顺延轮次预算(封顶 8)
- 停靠卡继续伪失败根修: ai_continue_loop 非 active 时分流 parked 恢复内核(recover_parked_inner 单一事实源)
- 实测: 写板 70 秒自动领单, 领单→执行→销账→回读→领下一单 全链闭环, 2050 测试过
This commit is contained in:
@@ -24,6 +24,7 @@ use crate::commands::now_millis;
|
||||
use crate::state::AppState;
|
||||
|
||||
use super::risk_str;
|
||||
use crate::commands::ai::tool_result_offload;
|
||||
|
||||
/// 构造一条工具执行审计记录(纯函数,单条 [`audit_tool_call`] / 批量插入路径共用)。
|
||||
///
|
||||
@@ -41,6 +42,12 @@ pub(crate) fn build_audit_record(
|
||||
message_id: Option<&str>,
|
||||
) -> AiToolExecutionRecord {
|
||||
let executed_at = if decided_by.is_some() { Some(now_millis()) } else { None };
|
||||
// D2a 结果外置:超 8KB 的审计 result 落盘留句柄,治 DB 膨胀(devflow.db 193.7MB 实证)。
|
||||
// 失败/未注入 base 时原样返回,降级安全。仅 completed/failed 有 result 的记录受益。
|
||||
let result = match result {
|
||||
Some(r) if !r.is_empty() => Some(tool_result_offload::offload_result(tool_call_id, tool_name, &r)),
|
||||
other => other,
|
||||
};
|
||||
AiToolExecutionRecord {
|
||||
id: new_id(),
|
||||
conversation_id: Some(conv_id.to_string()),
|
||||
|
||||
Reference in New Issue
Block a user