Repository navigation
fix: 定位 WS 桥接残余 409 的具体拒绝阶段 - #875
Merged
Merged
Conversation
…esidual-409-20261116
…esidual-409-20261116 # Conflicts: # .github/workflows/encrypted-history-400.yml # .github/workflows/free-fast-customer-cost-details.yml
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.
解决的问题与行为变化
#870 部署后,原 owner_conflict 在前五分钟消失,但账号492仍产生第2轮、before_upstream_write 的 wire_changed。现有日志 subreason=unknown;定向 errors-only 采集未保留这些精确请求,尚不能确定是请求不满足续接条件还是校验误拒绝。
本次把 WS 发送前五处通用拒绝细分为四个固定阶段:请求体不可读、可读源快照不匹配、桥接投影完整性不匹配、响应指针被移除。仅记录 input 数量/类型、store 枚举及字段存在性/相等性,不记录内容、指针值、工具数据或摘要。返回码、公开文案和原拒绝条件不变。此提交提供定位证据,不能单独声称解决剩余409。
CI实际失败另外定位到两项固定Playwright 1.56.1的截图任务:ubuntu-latest已变为26.04,浏览器安装不支持。只将encrypted-history-400/settings与free-fast/frontend固定到ubuntu-24.04,截图与原测试均保留;不将环境失败算作业务反例。
旧head另有WS历史RED编译失败:#872后加BPS diagnostics/race夹具依赖历史基线不存在的搜索API。历史树准备脚本仅在基线文件不存在、候选blob和历史contract均匹配时隔离这两份未被选中的测试;所有候选GREEN和原WS业务断言保留。
另已修复HTTP/shadow完整历史RED恢复旧目录时缺少mkdir与Git索引的问题。同步#874后,旧恢复基线保留其Account契约,仅在disposable RED隔离后加的OAuth首次配置测试并恢复对应旧插件快照夹具;候选GREEN全部保留。
关联记录与来源
Refs #870。base
production,已同步5d7ebb9bf(包含#872、#874),最初诊断基线ff1082fd51038f10dcb3a8ecb1d5a738258b0f66;没有外仓提交。线上只读证据和采集记录保存在独立运维仓库,真实客户内容不进入本仓库。管理员新功能提示
不适用:没有新UI/菜单/设置,提示ID、NewFeatureBadge位置、关闭联动、沿用/重新公告、A→B→C及刷新/重新登录验证均不适用。
复现与验收
复用真实 begin 边界的
TestOpenAIWSPlaintextBridgeProjectionGuards:输入、controls、source、pointer、account、store、config、scope、response 篡改继续拒绝,同时持久化固定 ws_projection_integrity 子因。合法投影、未知工具和原owner变化的既有断言保留。协议、调度或传输补充
Responses WS / API Key / HTTP bridge;无实际发送、重试、会话、owner、调度、并发、计费或取消语义变化。公开 status/code/message 不变;日志仅固定类别、数值与布尔值。不读取真实请求内容。
实际验证
git diff --checkgo test -race -json -tags=unit,plaintextowner ./internal/service -run '^TestOpenAIWSPlaintextBridgeProjectionGuards$' -count=1 -timeout=2m兼容性与运行影响
文档与用户可见变化
管理员日志和错误元数据能区分具体拒绝阶段,客户端错误保持原协议。无UI截图适用项。
Agent 使用声明
Codex:源码核对、实现、回归补充和文案。精确模型ID和推理强度未知,当前环境未提供可核实值;本轮没有子Agent。
提交前自查
最终 head 验证补记
1166c5ee0aaf7dce16984466c54ac260c8e96617已分页回读121项最新check:75success、46条件skip,无失败/取消/未完成;传统statuses为0。WS专项真实传输23子用例、投影保护12子用例通过,原始JSONL已下载核对。固定产物run43823531080成功,源码tree09b74bd8207e86e85b530d84bfa2df2bf871827a与预览合并树一致。未执行本地应用测试/构建;旧head的pending超时边界失败、截图环境失败和历史树准备失败均保留,不混算为业务RED。此PR仍只是残余诊断,不宣称已修复所有409。