Repository navigation
fix: 修复重建会话的规范化冲突与 WS 首帧恢复 - #860
Merged
ranxi2001 merged 8 commits intoNov 15, 2026
Merged
Conversation
…built-request-dispatch-20261115
Owner
Author
|
维护集成门禁补充(静态只读,不表示本 PR 已独审通过):固定 #860 head
这不是说两 PR 当前各自都与 production 冲突,而是不能依据两个 |
6 tasks done
This was referenced Nov 15, 2026
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.
解决的问题与行为变化
开启 409 有损续接后,HTTP 请求仍可能在“省略完成”之后被自己的兼容变换触发
wire_changed,或选中透传 API Key 后再被 dispatch 拒绝。WS 新连接首帧只有已知 owner 与可读任务、没有会话指针时,初始选号失败也没有进入重建。本次在原始快照校验通过后,为 HTTP 请求建立独立、有限的目标账号投影,处理 namespace、工具 schema、Lite 与手动时区;OAuth 的输出专用消息元数据在冻结 OAuth 表示前规范化。原始快照保留,最终 input/controls 校验仍执行。透传 API Key 的重建请求使用原生 Responses 发送与交付链;不支持重建的路线在选号阶段排除。WS 未调用任何 transport 的初始选号失败可重建一次,并消耗既有切换预算。
底层自动出口时区不再改写已重建/显式保护的正文;HTTP 时区请求头仍按出口设置。透传账号已接管并交付后,其后续单 owner 会话也保持已验证原生路线。namespace 摊平使用保留数字精度的解码,避免改变历史或工具 schema 的大整数。普通请求保持现有行为。固定阶段日志覆盖 HTTP/API Key/OAuth 投影来源与最终 controls,不记录内容或摘要。
关联记录与来源
production,固定开发基线aa8e596e6d6f3e4648d6beba73b39b240dd5357a(v2.21.3);随后普通合入production@aa0b1abfe5b32c483b32c70fe0c813659ef58083(fix: BPS 保护当前密文任务并取消固定压缩阈值 #857),两项产品改动文件不重叠。当前 head591bb9b9b917c0df2ae8c59abed672c0cddf5c1c。无外部源码引入。管理员新功能提示
复现与验收
使用虚构任务、loopback HTTP/WS provider 和隔离 Redis。A 交付 opaque 历史和一次工具调用,客户端执行一次后停调/冷却 A;同一任务由 B 继续,完成下一工具及最终回答。
协议、调度或传输改动补充
/v1/responsesJSON/SSE、API Key/OAuth;WS 首帧,五种已有适配器。实际验证
git diff --checkbackend中go test -race -json -tags=unit ./internal/service ./internal/handler -run '^TestOpenAI409(HTTPProjectionAndPassthrough|WSInitialWithoutPointer|PhysicalTimezonePreservesReadableTask|NamespaceProjectionPreservesNumbers)$' -count=1 -timeout=10m591bb9b9b917c0df2ae8c59abed672c0cddf5c1c兼容性与运行影响
文档与用户可见变化
更新
docs/encrypted-history-409-beta.md,说明发送表示、透传账号恢复、WS 首帧和自动时区例外。无 UI 变更,截图不适用。源码合并不代表发版或部署。Agent 使用声明
提交前自查