Fix stale model cleanup and prevent deleted discovered models from reappearing#263
Merged
KilimiaoSix merged 3 commits intoMay 24, 2026
Merged
Conversation
0194808 to
efecfd3
Compare
Collaborator
|
CodeX 审查意见:当前不建议直接合并。 PR 已覆盖 disabled/deleted aggregate source 的清理路径,但仍遗漏 active aggregate API 同步时“单个模型从上游消失”的场景。 具体风险:第一次同步发现 建议合并前补充:
我已用临时边界测试验证该问题可以复现,因此建议修复后再合并。 |
KilimiaoSix
approved these changes
May 24, 2026
Collaborator
KilimiaoSix
left a comment
There was a problem hiding this comment.
Reviewed current head 56bddfe. Previous aggregate cleanup concern has been addressed and targeted regression tests pass. Approving.
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.
变更摘要
改动范围
主要文件
crates/service/src/apikey/apikey_models.rscrates/core/src/storage/model_sources.rscrates/core/tests/storage.rs验证
pnpm -C apps run testpnpm -C apps run buildpnpm -C apps run test:uicargo test --workspace已执行的实际验证:
未执行的验证与原因:
风险与影响面
upsert_discovered_model_source_models由“仅上插”调整为“同步语义(会清理同 source 同 discovery_kind 的陈旧项)”,可能影响依赖旧行为(保留历史 discovered 项)的场景。model_source_mappings,以避免删除后模型被残留路由重建;该行为符合“同步结果应收敛到当前发现集”的预期。备注