Repository navigation
feat: allow optional encrypted agent owner routing policy - #807
Merged
Merged
Conversation
ranxi2001
marked this pull request as ready for review
November 11, 2026 22:02
This was referenced Nov 11, 2026
6 tasks done
Merged
12 tasks done
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.
解决的问题与行为变化
已完成的加密 agent 历史归属 A 时,A 限流会使有合格 B 的账号池仍只能等待。新增默认
false的gateway.disable_encrypted_agent_owner_binding/GATEWAY_DISABLE_ENCRYPTED_AGENT_OWNER_BINDING;显式true时允许完整历史按普通池规则尝试 B,保留 owner 证据、普通准入、交付屏障和禁止不安全重放。旧 A 输入不会因被 B 消费重新发布为 B;新 B 输出仍先 pending,实际成功下游写后才 commit。HTTP/WS 的实际发送前校验保留完整 input 和工具结果;
previous_response_id仍绑定其服务端账号。HTTP、WS HTTP bridge 的实际上游拒绝保留错误身份,不能通过删改输入、池内重试或重放连接最初的 warmup 变成成功。当前 head:
73f1605f1ada541b18d801e7d180bcc3fc52db96。远程验收与固定 SHA 独立源码审查已完成,以下完整 scope 已逐项验收:关联记录与来源
2cfdda4aeae1f482efd8a2ca6551b7f40f6e9d66;目标仓库ranxi2001/sub2api,baseproduction。管理员新功能提示
复现与验收
-race -count=1全部通过,无 skip / DATA RACE;真实网络输入断言、跨节点 pending/commit、错误/取消、混合 owner 回 strict 及三个 WS adapter 均在此范围。openai_issue805_owner_policy_test.go、openai_issue805_delivery_test.go、openai_issue805_ws_test.go;service 的openai_issue805_owner_policy_test.go;config 的issue805_owner_policy_test.go。协议、调度或传输补充
/v1/responses,合成 gpt-5.1,API-key HTTP JSON/SSE 与 WS ctx_pool/passthrough/http_bridge 的真实 adapter;不代表付费提供商加密兼容。实际验证
git diff --check、静态自查go test -race -tags=unit ./internal/handler ./internal/service ./internal/config -run '^TestIssue805' -count=1 -v -timeout=10m已核对全部 19 个成功 run 的 raw checkout 日志。两个既有多主机 PR workflow 默认检出 GitHub 合并提交
2f48e35e…(与最终候选同树);其 exact-head 门禁证明分别使用成功的 Caddy push 43102324204 和 full-app push 43102324121,均实际检出最终 head。合并检查单独记录,不冒充 head checkout;条件 skipped 不算测试通过。初始 CI 曾出现 GitHub internal startup_failure、零 jobs/checks、log404;按用户覆盖指令先实现,再完成上述独立 baseline 比较。因此没有宣称事前 RED-first TDD 的时间顺序。初始基础设施失败和随后修复前的候选失败日志另行保留,均未被当作业务通过证据。
兼容性与运行影响
文档与用户可见变化
已补 YAML、环境变量、四个 Compose 模板透传、
docs/encrypted-agent-owner-policy.md,并从原续接文档链接新策略;说明统一节点切换、旧连接生命周期、fresh missing 与已知记录丢失的区别以及 strict 回滚限制。不发版、不部署、不改生产开关;由本任务唯一独立验收/merge owner 在 fresh 门禁后固定 SHA 合并。Agent 使用声明
gpt-6-astra,xhigh(监督核对实际 rollout turn_context);service_tier fast requested,无 delivered fast 元数据证明。gpt-6.1-sol;推理强度未知(运行未暴露)。gpt-6.1-sol;推理强度未知(运行未暴露)。提交前自查
最终独立验收结论
Hermes Agent 独立读取原 Issue805 全部六项验收、25 文件 diff 与调用上下文、19 个成功 workflow 的官方原始日志及 focused artifact。固定 head
73f1605f1ada541b18d801e7d180bcc3fc52db96,base2cfdda4aeae1f482efd8a2ca6551b7f40f6e9d66,未发现本范围阻断问题。20 顶级测试组,105 RUN/PASS entries 含父子,不等于105个独立真实Redis用例;service/config部分为内存fixture。真实Redis handler与localhost网络拒绝已执行,不是付费供应商密文兼容实验。当前 head 88 check-runs / 88 jobs 对账:49 success、39条件skipped;34 workflows:19 success、15条件skipped,全attempt1,statuses=[]。历史旧head的失败、cancelled和未完成run保留,不宣称所有历史workflow通过;b611d1c0的group-query fixture、7f74c59e的final-admission fixture和bridge错误吞没已定位并保留断言修复,当前head通过。初始startup_failure仍分类GitHub internal,非YAML或业务RED。
UI截图:不适用,无UI修改。独立审查实际模型
gpt-6.1-sol,推理档位未知(runtime未暴露);writer实际Astra/xhigh,fast仅requested。Issue805明确不要求通用供应商密文兼容,本PR的六项业务验收已满足;Release、部署、生产开关启用均未执行。