Repository navigation
fix: 避免恢复等待截止掩盖独立存储错误 - #891
Merged
ranxi2001 merged 3 commits intoNov 16, 2026
Merged
Conversation
ranxi2001
marked this pull request as ready for review
November 16, 2026 20:16
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.
解决的问题与行为变化
ctx.Err()!=nil会把错误误归为delivery_pending,并把旧 pending 计为owner_pending=1。errors.Is(err, ctx.Err())匹配已结束的等待上下文时,才保留 pending 诊断;普通后端错误、存活等待中的独立 deadline,以及取消等待收到的独立 deadline 均返回store_unavailable。匹配的 deadline/cancel(含包装错误)继续返回delivery_pending。found=false + error。不扩展历史恢复策略;缓存接口不能区分来自不同来源但相同的context.DeadlineExceededsentinel,不宣称实现了更强的错误来源追踪。关联记录与来源
verifyOpenAIToolInputs同时检查 ctx 与errors.Is的边界,以及ws-tool-provenance.yml的隔离 RED/GREEN 模式。管理员新功能提示
NewFeatureBadge展示位置:不适用,无界面入口。复现与验收
production/dc3a5403be7053397c43c2ef4b1e4fff01536433;headfix/recovery-pending-storage-error-20261117/80b47dbc92687e23d4c0770e351588e8c3844fd7;虚构缓存数据,无真实供应商请求。testing/synctest首次 GET 返回 pending,进入第二次 GET 后才结束同一个等待 ctx,再返回预设错误。避免轮询 timer 与取消的调度竞争。delivery_pending。当前尚未运行行为测试,不能把静态推导当作已观察 RED。found=false、等待无 publish、独立错误计unknown;匹配自身 ctx 的错误保留 pending。backend/internal/service/openai_agent_pending_storage_error_test.go,先提交回归c9353e477,随后最小修复与 CI80b47dbc9。原openai_agent_pending_observation_test.go、openai_ws_owner_conflict_test.go和共用验证脚本保持原样。协议、调度或传输改动补充
GET -> pending; GET -> ctx ends + independent error。实际验证
go test -tags=unit ./internal/mihomo -run '^(TestBPSWarmPoolReusesIPManagementSourcesAndStatus|TestSubscriptionLifecyclePreservesExisting1024DynamicProxies)$' -count=5 -timeout=3mgit diff --check、提交前git diff --cached --check、最终git diff dc3a5403be7053397c43c2ef4b1e4fff01536433 HEAD --checkgh pr list --repo ranxi2001/sub2api --state open --limit 100;读取实际 production 的贡献指南与 PR 模板go test -race -p=2 -json -tags=unit,inheritedmodel ./internal/service -run '^TestOpenAIAgentPendingStorageError$' -count=1 -timeout=3mgo test -race -p=2 -json -tags=unit,inheritedmodel ./internal/service -run '^TestOpenAIAgentPendingObservation$' -count=1 -timeout=3mgo test -race -p=2 -json -tags=unit,ownerconflict ./internal/service -run '^TestOpenAIToolProvenancePendingDeadline$' -count=1 -timeout=3mpython3 -B -m unittest discover -s .github/scripts -p 'test_ws_inherited_model_evidence.py' -v兼容性与运行影响
found=false + error;没有新增授权、正文、凭据或后端原始错误日志。测试使用虚构值。文档与用户可见变化
不适用:无 UI、配置或用户操作变化;本 PR 正文记录诊断修正及边界。Draft 发布不代表已验收或上线。
Agent 使用声明
本次 CI 维护:Codex;参与日志定位、冲突处理、定向修复与验证、原 PR 推送及正文维护;模型具体 ID 和推理强度未知(本会话仅标识 GPT-6),未使用子 Agent。下列原实现披露保持原文。
维护补充披露:Codex独立主审(本次无子审);实现主代理及read_only_review子代理另按下表披露;本批相关Codex线程的实际turn_context逐项核验为
gpt-6.1-sol / ultra,service_tier均null,fast仅requested。Hermes Agent /gpt-6.1-sol(推理强度未知,环境未提供)负责父级源码/远端证据核对和正文更新;未本地运行动态检查、生产/付费/发版/部署。静态SOURCE CLEAR不等于业务验收。/rootgpt-6.1-sol(本次线程运行记录与维护任务 verified-profiles 核对)ultraread_only_reviewgpt-6.1-sol(继承当前父代理,无覆盖)ultra(继承)维护 brief 请求
sol/ultra/fast;运行记录确认 model / effort,service_tier字段为 null,不能据此声称 fast 已确认。Agent 静态判断不作为测试通过证据。提交前自查