fix(codex): publish projection only for active router when MultiRouters share a target (closes #46) - #47
Closed
zhushihao wants to merge 1 commit into
Closed
Conversation
…le MultiRouters share a target 多个 MultiRouter 共享同一 target provider 时,任一 router 变更都会 发布投影并覆盖 target 的 catalog,导致另一个 router 的模型配置被 静默改写。persist_provider_mutation 改为仅对 active router 发布 投影。
BigStrongSun
added a commit
that referenced
this pull request
Aug 24, 2026
Re-audit PRs #37, #39, #45, #47, and #49 against their complete runtime contracts rather than file-level overlap. Unify v2 auth ownership through raw passthrough, default missing modelSelection in the backend schema, enforce unambiguous shared projection ownership, normalize DeepSeek role aliases, and recover documented partial ReplaceFileW states with an explicit backup. Add focused regressions for each missed path and record the corrected audit in release notes and repository memory.\n\n本次提交由BigStrongsSun完成
Contributor
Author
|
已在 v3.19.2-17 以等价实现覆盖(母仓库作者按自己的理解修复,未直接合并本 PR),故关闭。/ Superseded by the equivalent implementation shipped in v3.19.2-17; closing. |
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.
Closes #46
概述
配置了多个 MultiRouter(如公司 + 个人各一个),且它们共享同一个 target provider 时,切换/保存其中一个 router 的路由规则或子 Agent 配置,会静默改写另一个 router 的模型投影——另一个 router 的模型列表/顺序在 Codex 端被错误覆盖。
根因
persist_provider_mutation在保存任一 router 时无条件发布该 router 的投影产物到共享 target 的 catalog。target 同一时刻只能承载一份投影,多个 router 轮番发布 → 互相覆盖,最后保存的 router 生效,其余 router 的配置"消失"(不是被删,是被投影覆盖)。修复
mutation.rs::persist_provider_mutation:仅当该 router 是**当前 active(is_current)**时才发布投影到共享 target;非 active router 的保存只更新自身 settings_config,不发布投影,避免互相覆盖。测试
cargo check:零警告