From 07feecba1145e536662faaf075de66d15d7850f7 Mon Sep 17 00:00:00 2001 From: JianFeeeee Date: Sun, 27 Sep 2026 19:00:53 +0800 Subject: [PATCH] =?UTF-8?q?docs(plan):=20=E8=A1=A5=E8=AE=B0=E5=85=A8?= =?UTF-8?q?=E9=9D=A2=E5=8E=8B=E6=B5=8B=E7=BB=93=E6=9E=9C=E4=B8=8E=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E5=89=8D=E7=BD=AE=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 两版隔离实例实测(规模 3 = 288 条输入),核心差异是**处理数**而非耗时: 旧版 openai.lua 缺 stream_index 透传 ⇒ 多个分片并到槽 0、参数混拼 ⇒ 工具一个都没真跑,却因为「少干活」而耗时更短。 !slowbatch8 旧 0.220s / 0 个 → 新 0.409s / 8 个 并发 vs 强制串行(新版内部) N=8 加速 3.88× 调度器轰炸 288 输入 两版均 100% 通过 连续稳定性 20 轮 两版均无错误、内核无 panic 规模 1(32 条)与规模 3(288 条)结果完全一致 ⇒ 可复现。 同时记录部署前置条件:生产是 -tags=onnxruntime 构建(strip 后 75MB vs 普通构建 28MB),package-linux.sh:139 会显式拒绝非 onnxruntime 构建。 本次改动未触及任何 ONNX 路径,故压测结论对生产成立,但必须走 deploy/packaging/build.sh 才能部署。 --- docs/zh/toolcall-parallel-execution-plan.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/zh/toolcall-parallel-execution-plan.md b/docs/zh/toolcall-parallel-execution-plan.md index fd3c467..e92fa52 100644 --- a/docs/zh/toolcall-parallel-execution-plan.md +++ b/docs/zh/toolcall-parallel-execution-plan.md @@ -21,7 +21,6 @@ | **2.5** | 提示词改为「默认并行」 | 2 | ✅ **已完成** | | **3/4** | 序列插件 | 2 | ✅ **已完成**(P1–P4,见下) | - **主线(内核)0 → 0.2 → 0.5 → 1 → 2 → 2.5 已全部完成**; **插件线 P1 → P2 → P3 → P4 也已完成**。两部分详见下文。 @@ -59,6 +58,7 @@ 「工具没了」⇒ 整组被跳过,与「插件真没加载」无法区分。 **改动**: + - `io/channel.go`:新增哨兵 `ErrToolNotFound` + `ToolNotFound(name)` + `IsToolNotFound(err)` (沿用仓内 `ErrInputChannelUnknown` 的先例)。`IOManager.ExecuteTool` 的父兜底 改为**只传递「确实不存在」**,其余错误如实上抛。 @@ -103,6 +103,7 @@ FAIL(`父的执行失败被误报为『工具不存在』`);修复后全 (既有那条也 FAIL),报错直指 `ToolsUsed = [tool_alpha]`、`tool_call_id "c2" 被声明 0 次`。 ⚠️ **过程中三次自伤**(都靠"判据先写"暴露): + 1. 臆造了不存在的 helper(`sdkToolDef` / `sdkStageCtx`)⇒ build 失败 2. 把 `a.stageHost = nil` 后又用它注册 stage handler 3. 给 `newTaskFrame` 传 `nil` ⇒ `stepPrepare` 于 `task.go:519` **nil 解引用 panic** @@ -183,6 +184,7 @@ FAIL(`父的执行失败被误报为『工具不存在』`);修复后全 **在 2d 落地前,2c 只能算"实现已就位、判据未闭合"**,不得记为已验证。 --- + ## 阶段 1 ✅ 结果契约 + 参数预校验(已完成) 对应设计文档 §4。**动机**:`Success` 硬编码 `true`(`task.go:757` 唯一赋值点)、 @@ -339,7 +341,7 @@ P3 落地时暴露的**真实缺陷**(不是新需求): ### 批内工具调用(核心差异) | 场景 | 旧版 中位/工具数 | 新版 中位/工具数 | -|---|---|---| +| --- | --- | --- | | `!slowbatch2` | 0.221s / **0 个** | 0.380s / **2 个** | | `!slowbatch4` | 0.222s / **0 个** | 0.399s / **4 个** | | `!slowbatch8` | 0.220s / **0 个** | 0.409s / **8 个** | @@ -355,7 +357,7 @@ P3 落地时暴露的**真实缺陷**(不是新需求): `knowledge_create` ⇒ 整批降级): | N | 并发 | 强制串行 | 加速 | -|---|---|---|---| +| --- | --- | --- | --- | | 2 | 0.378s | 0.532s | 1.41× | | 4 | 0.389s | 0.864s | 2.22× | | 8 | 0.409s | 1.585s | **3.88×** | @@ -365,7 +367,7 @@ P3 落地时暴露的**真实缺陷**(不是新需求): ### 通过率与稳定性 | 维度 | 旧版 | 新版 | -|---|---|---| +| --- | --- | --- | | 调度器并发轰炸(288 输入) | 288/288 **100%** | 288/288 **100%** | | 连续稳定性(20 轮无错误) | 20/20 | 20/20 | | 内核队列 / 拒绝 / panic | 空 / 0 / 无 | 空 / 0 / 无 |