Repository navigation
fix: 保留 BPS 搜索失败的安全阶段与 HTTP 诊断 - #872
Merged
ranxi2001 merged 4 commits intoNov 16, 2026
Merged
Conversation
ranxi2001
marked this pull request as ready for review
November 16, 2026 05:42
This was referenced Nov 16, 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.
解决的问题与行为变化
当前 head:
78e339c03192d15d357c2030908c899d90887453。独立源码复审 SOURCE CLEAR;精确 head 远程验收已完成,尚未合并。历史搜索故障真实根因未知,线上恢复未验证。basispoints_search_failed,实际搜索阶段、原因、已观察 HTTP 状态在错误规范化时丢失。upstream_status。缺失值为 unknown,不伪造 HTTP;不传递任意错误文本、响应正文、凭据、查询、URL 或身份。upstreamBody,与主调用构建结果 metadata 时的读取竞争。本候选将演进 repair 请求体隔离为 bridge goroutine 独占的repairUpstreamBody,不改写主调用请求体;两次合法纠错继续保留历史。关联记录与来源
ranxi2001/sub2api,baseproduction,原基线ff1082fd51038f10dcb3a8ecb1d5a738258b0f66。7c8ac6d8→b0633ade→551d0f75→78e339c0;无 force/rebase,无第三方提交。管理员新功能提示
复现与验收
OpenAIGatewayService.Forward;不是生产复现。TestExcelBPSSearchRepairOwnershipRaceThroughForward用 channel rendezvous 保证后台 repair 已进入、主调用暂停在 metadata 边界,覆盖两条修复路线 × success/failed × 三种模式。保留原 provenance 回归,远程-race -count=20,逐场景核对 PASS 次数。b0633ade的真实 search-protocol 作业已检测 production 数据竞争,位置openai_excel_bps.go:806/861;不是凭空推测。openai_excel_bps_search_diagnostics_test.go、openai_excel_bps_search_race_test.go、basispoints/web_search_failure_test.go及既有搜索回归。协议、调度或传输改动补充
/v1/responses;实际模型映射/代理沿用旧逻辑,fixture 模型名不是生产支持证明。{"code":"basispoints_search_failed","type":"server_error","status":502,"search_diagnostic":{"phase":"search_http","reason":"http_rejected","upstream_status":403}};403 仅为测试示例。实际验证
git diff HEAD^ HEAD --check、干净 worktree、普通 push 与远程 ref/read-back551d0f75,非仅 writer 自述b0633adedelta 关闭;551d0f75三文件 ownership/回归/workflow delta 再次 SOURCE CLEAR。源码结论不代替动态验收b0633ade隔离旧代码 RED / clean 候选 GREENb0633adesearch-protocol race551d0f75完整 CI / search RED-GREEN / race repeat兼容性与运行影响
文档与用户可见变化
backend/internal/service/basispoints/WEB_SEARCH.md说明安全诊断与 raw correction 边界。用户可看到安全阶段/原因摘要;无 UI 变更。已普通 push 并创建本 Draft;未 merge、发版、部署或生产写入。Agent 使用声明
gpt-6.1-sol;推理强度未知,接口没有可确认的实际 effort metadata。turn_context,模型gpt-6.1-sol,推理强度ultra。turn_context,模型gpt-6.1-sol,推理强度ultra。/root/readonly_review只读子 Agent:边界/回归静态建议;精确实际模型与推理强度未知(接口未暴露),未运行动态检查;后续修补没有 children。提交前自查
当前 lint 修补状态
551d0f7 的 push/PR lint 原始日志均报同一 QF1008:新 test context selector 可去掉嵌入字段。78e339c0 仅将 c.Context.Done() 改为 c.Done(),保留必须显式的 Context.Value 防递归;父级已核对一行等价 diff、diffcheck、远端 ref 和本 PR head。前一生产源码复审结论保留,当前完整远程动态 gate 重新等待,旧头结果不迁移为新头通过。
父级最终精确头验收
当前 78e339c:43 个 workflow 最新 attempt 全部 completed(26 success / 17 skip),103 个最新 attempt jobs 全部完成(57 success / 46 skip),traditional statuses 0。filter=all 全历史 104 check runs 中保留 1 个首轮失败:WS proof_pending 期望 owner_conflict 实得 store_unavailable;原始 artifact 已保留。未改代码/断言,单次重跑 attempt2 全部通过,父级下载 cases.jsonl 核实 24 子场景及根测试 PASS;不把首轮失败改写为成功。当前检查无 pending/cancelled/failed,历史失败已被同 run 新 attempt 替代。
搜索 run43807165799 全部步骤 success;父级下载原始 artifact 验证 RED baseline ff1082f 诊断指定断言失败、clean78e339 GREEN通过;12个 ownership 场景各20次PASS(240),6个 provenance场景各20次PASS(120),无DATA RACE。原搜索/race/repository integration 均success。两套lint成功。live base ff1082f,merge-tree无冲突。源码独审已完成;真实故障恢复仍未执行,Refs871不关闭。