Repository navigation
fix: 保留普通 OAuth 桥接续轮的完整助手历史 - #1002
Merged
ranxi2001 merged 2 commits intoNov 22, 2026
Merged
Conversation
ranxi2001
marked this pull request as ready for review
November 22, 2026 09:15
This was referenced Nov 22, 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.
解决的问题与行为变化
store=false后续只发送增量时,历史只保存工具上下文,已交付的助手消息在第二、三轮丢失。output_item.done的output_index重建,去重且排除明确未完成项。普通续接及账号切换使用同一份交付历史。关联记录与来源
337c218d4fb6c75c9ee803486733ddfbf4ffcbae)。已核查 fix: 修复大历史与 OAuth 桥接的 WebSocket 工具结果续接 #966 当前代码:它处理工具结果来源和投影,普通 OAuth 仍选择工具专用Items(),本次补助手历史,不重复引入旧修复。production,开发基线8dedf05db37c870265e04327defb9e96e7787603;head 为fix/issue999-bridge-assistant-history-20261122。管理员新功能提示
NewFeatureBadge展示位置:不适用,无新增 UI。复现与验收
ctx_pool,自动桥接阈值 15 MiB,首帧 24 MiB,读帧上限 64 MiB,stream=true、store=false、legacy 开启、owner binding 禁用、400/409 历史省略均关闭。只用 loopback HTTP/SSE mock 与真实 WS handler,不调用供应商。backend/internal/handler/openai_ws_http_bridge_history_test.go覆盖两种终态三轮、错误指针、显式跨线程与省略帧身份;backend/internal/service/openai_ws_http_bridge_history_test.go覆盖正常、失败、不完整、取消、异常 status/error、added-only、非法索引、未完成项、EOF、item/terminal 交付失败。现有 fix: 修复大历史与 OAuth 桥接的 WebSocket 工具结果续接 #966 工具保护 job 保留。协议、调度或传输改动补充
/v1/responses→ HTTP/SSE,普通 OpenAI OAuth;fixturegpt-6.1-sol,stream=true。排除托管连接、SIWC、Copilot、Excel 与 passthrough 特例。实际验证
合并前复核
61ce0190f0e2c80b0f3bbe1d856bfbe92e00363f。补齐续轮首次声明身份与省略身份的兼容,校验已交付终态。 GitHub Actions 共 88 项成功、12 项按工作流条件跳过。主 CI。git diff --checkgofmt -w backend/internal/service/openai_ws_http_bridge_history.go backend/internal/service/openai_ws_http_bridge_history_test.go backend/internal/handler/openai_ws_http_bridge_history_test.gogit push origin HEAD:refs/heads/fix/issue999-bridge-assistant-history-20261122go test -race -json -tags=unit,bridgewarmup ./internal/handler -run '^TestIssue999HTTPBridgeAssistantHistory$' -count=1 -timeout=8m。要求两个指定叶子均出现助手丢失行为断言,exit=1,拒绝 setup/compile/panic/race/timeout/skip/空运行go test -race -json -tags=unit,bridgewarmup ./internal/handler ./internal/service -run '^TestIssue999HTTPBridge' -count=1 -timeout=8m。要求全部指定叶子与包完成且 exit=0;保存 SHA、test hash、JSONL 与真实 exit兼容性与运行影响
文档与用户可见变化
已交付的助手文本应进入后续完整上下文,错误指针或显式跨作用域续接会拒绝。无设置和 UI 文档改动。
Agent 使用声明
合并维护使用 OpenAI Codex,负责失败诊断、在原 head 追加修复及 CI 验收。运行环境标识为 GPT-6,具体模型 ID 与推理强度未知,当前接口未提供。
主 Agent:OpenAI Codex,问题分析、唯一源码写入、回归与 CI 编写、PR 和交接。模型
gpt-6.1-sol,推理ultra。子 Agent
bridge_review:OpenAI Codex,只读源码与边界复核。模型gpt-6.1-sol,推理ultra。子 Agent
regression_design:OpenAI Codex,只读测试与远程 CI 方案复核。模型gpt-6.1-sol,推理ultra。三者已核查各自 session 的 turn_context 元数据,provider 为 OpenAI。用户请求 fast,但现有运行元数据无 provider service tier 确认,fast 未确认;不把请求配置写成实际服务等级。未修改全局配置。
提交前自查