Repository navigation
docs(zcode): 提供 Start Plan 系统块修复补丁与最小复现 - #343
Draft
Yiming-Zuo wants to merge 1 commit into
Draft
Yiming-Zuo wants to merge 1 commit into
Yiming-Zuo wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
迁入用草稿,目标
beta。本 PR 提供补丁与最小复现材料,不修改 beta 的运行时,也不宣称 beta 已修复;请维护者先将补丁迁入提供商插件,再决定后续集成。ZCode Start Plan 的账号测试可成功,但兼容客户端只要携带一条
system指令,就可能收到 HTTP 405 / code 3012。无系统提示与仅含一句中性系统提示的对照请求复现了这个差异。修复把客户端系统指令按原顺序并入第三个动态系统块,保留系统层级,不移入 user 消息,也不删除客户端指令。无客户端系统提示时,组装结果保持原样。
所附补丁仅修改 ZCode Start Plan 的系统块组装及回归测试。模型名、思考参数、账号路由、鉴权、人机验证和会话头均不变。关联 #339;不声称解决 #340 的子代理会话头问题。
Evidence
补丁位于
scripts/repro/zcode-start-plan-3012/system-blocks.patch;对照请求位于同目录的requests.json。迁入目标:ProvidersPlugin/Agent2Providers 的 plan.rs。最小复现
前提:网关已登录具有有效 Start Plan 额度的 ZCode 账号;该账号选择 Start Plan;测试网关 Key 限定为该提供商,避免其他提供商接管请求。使用自己的网关 Key 设置
AGENT2API_KEY,不要把密钥写进命令文件或日志。对照:仅删除上述
system消息,保留同一账号、模型和 user 消息。printf ZCODE_TOOL_OK,再返回工具结果本地实际请求验证基于 v3.0.1 的同一补丁;没有重放完整长对话来验收修复,不将这些结果外推为所有 3012 情况均已解决。上述结果不含账号标识、密钥、聊天历史或原始请求日志。
回归测试
新增三项测试,直接调用实际
system_blocks:修改前:1 passed / 2 failed,失败分别为产生 4、5 个块而非 3 个。
修改后:3 passed / 0 failed。
以上命令是在 Agent2API v3.0.1 的
desktop-tauri/src-tauri下执行的记录;release 构建通过。源码、测试及分析口径未变,沿用本轮已有结果。提交前已将补丁路径适配到提供商插件,并对插件提交
a5697f1ca9ac7188964914c21349dc8e62fd2940执行git apply --check,结果通过。尚未编译或运行迁入后的插件;维护者应在插件仓库运行对应测试并做短请求验收。不要把旧版测试结果当作新插件已验收。Merge Danger
Door: two-way。本草稿仅增加复现夹具及补丁文件,没有运行时变更或迁移。插件采纳补丁后可直接回退该函数。
Blast Radius: ZCode Start Plan。客户端系统提示现在进入第三块的缓存范围;编码套餐及其他提供商不受此函数改动影响。上游检查可能继续变化,因此保留真实请求的小测试结果及适用范围,不把 3012 解释成唯一原因。
本条回复由 AI Agent 生成