iter26 cluster-026: responses route user catalog cache cleanup#798
Conversation
📊 状态卡片 — reviewer 派出
🤖 controller status banner ⟦AI:AUTO-LOOP⟧ |
📊 状态卡片 — reviewer 派出
🤖 controller status banner ⟦AI:AUTO-LOOP⟧ |
📊 状态卡片 — reviewer 派出
🤖 controller status banner ⟦AI:AUTO-LOOP⟧ |
🤖 架构评审通过:未发现 CLAUDE/AGENTS 回归TL;DR
详细说明本次 diff 只动了 mainnet host 的 Responses/Messages 路由解析链路和对应测试。 对照 CLAUDE/AGENTS,本次改动符合“事实源唯一”和“禁止中间层维护 ID -> 上下文/事实状态的进程内映射”。剩余 📎 完整 codex 原始输出(存档备查)pr: 798
|
🤖 架构复审:comment-only,未发现阻塞项TL;DR
详细说明我按三点 diff 检查了 核心架构方向是正确的: 📎 完整 codex 原始输出(存档备查)pr: 798
|
🤖 Quality review: comment,测试文件名残留旧缓存语义TL;DR
详细说明主要问题是 其它质量点看起来正常: 建议修改:把 📎 完整 codex 原始输出(存档备查)---
pr: 798
role: quality
verdict: comment
---
## Verdict
Comment: the implementation is readable and focused, but one touched test file name still says `Caching...` after the PR removes the caching behavior.
## Evidence
- test/Aevatar.Hosting.Tests/CachingResponsesRouteResolverTests.cs:1 - the file now contains `ResponsesRouteResolverTests` and verifies current-catalog reads, but the filename still advertises the removed `CachingResponsesRouteResolver`; that stale name makes test discovery and future grep-based navigation misleading.
- src/Aevatar.Mainnet.Host.Api/Responses/ResponsesRouteResolver.cs:20 - `ResponsesRouteResolver` is a straightforward single-purpose replacement, with no dead cache fields or unused helper methods left behind.
- src/Aevatar.Mainnet.Host.Api/Responses/ResponsesRouteResolver.cs:22, src/Aevatar.Mainnet.Host.Api/Responses/ResponsesEndpoints.cs:158, src/Aevatar.Mainnet.Host.Api/Messages/MessagesEndpoints.cs:126, src/Aevatar.Mainnet.Host.Api/Hosting/MainnetHostBuilderExtensions.cs:95, test/Aevatar.Hosting.Tests/CachingResponsesRouteResolverTests.cs:61 - the required `Refactor (iter26/cluster-026-responses-route-user-catalog-cache)` Old/New comments are present and understandable.
## What would change your verdict (only if comment or reject)
Rename `test/Aevatar.Hosting.Tests/CachingResponsesRouteResolverTests.cs` to `test/Aevatar.Hosting.Tests/ResponsesRouteResolverTests.cs` so the file name matches the type and the new no-cache behavior.
⟦AI:AUTO-LOOP⟧⟦AI:AUTO-LOOP⟧ |
🤖 测试评审:建议补一条 no-cache 源码回归断言TL;DR
详细说明这次变更删除 里的按 bearer 进程内缓存。现有测试已经验证了两个关键行为:同一 slug 第二次读取会看到 catalog 新值,以及不同 bearer 会分别读取 catalog;这不是只涨行数的伪覆盖。 缺口在 cluster 规则本身:PR 文字和代码注释都强调“不在 singleton process memory 存用户 route facts”,但测试没有 这类源码回归断言。建议对 断言不包含 、、、。另外测试类已改为 ,文件仍叫 ,最好一起重命名,避免后续按类型找测试时误导。 📎 完整 codex 原始输出(存档备查)---
pr: 798
role: tests
verdict: comment
---
## Verdict
Test coverage is adequate for the behavior change, but the no-regression rule around removing the singleton route cache should be locked by a source assertion before landing.
## Evidence
- `test/Aevatar.Hosting.Tests/CachingResponsesRouteResolverTests.cs:58` (`ResolveRouteValueAsync_ShouldReadCurrentCatalogOnEachCall`) is a real behavior test: it mutates the catalog result and asserts the second resolution returns `/api/v1/llm/anthropic/v2`, so this is not bump-only coverage.
- `test/Aevatar.Hosting.Tests/CachingResponsesRouteResolverTests.cs:83` (`ResolveRouteValueAsync_ShouldReadCatalogForEachBearer`) asserts two bearer resolutions perform two catalog reads, covering the removed per-bearer cache behavior.
- `test/Aevatar.Hosting.Tests/CachingResponsesRouteResolverTests.cs:1` lacks a source-regression assertion such as reading `ResponsesRouteResolver.cs` and asserting it does not contain cache state tokens (`ConcurrentDictionary`, `CacheTtl`, `_cache`, `CacheEntry`). This cluster explicitly introduces the no-regression rule “do not store user route facts in singleton process memory,” so a source guard is the missing test-quality piece.
- `test/Aevatar.Hosting.Tests/CachingResponsesRouteResolverTests.cs:8` renames the test class to `ResponsesRouteResolverTests`, but the file path is still `CachingResponsesRouteResolverTests.cs`. That is minor, but it makes the matching test-file convention stale after deleting `CachingResponsesRouteResolver`.
- The PR test diff adds no `Task.Delay`, `Thread.Sleep`, `WaitUntilAsync`, `[Skip]`, or `[Trait("Category","Manual")]`; I did not see weakened assertions in the touched test file.
## What would change your verdict
Add a small source-regression test for `ResponsesRouteResolver.cs` that asserts the forbidden singleton-cache tokens are absent, and rename the test file to `ResponsesRouteResolverTests.cs` so the test file matches the production type.
REVIEW_DONE:798:tests:comment
⟦AI:AUTO-LOOP⟧⟦AI:AUTO-LOOP⟧ |
🤖 测试评审:建议补一条 no-cache 源码回归断言TL;DR
详细说明这次变更删除 缺口在 cluster 规则本身:PR 文字和代码注释都强调“不在 singleton process memory 存用户 route facts”,但测试没有 📎 完整 codex 原始输出(存档备查)---
pr: 798
role: tests
verdict: comment
---
## Verdict
Test coverage is adequate for the behavior change, but the no-regression rule around removing the singleton route cache should be locked by a source assertion before landing.
## Evidence
- `test/Aevatar.Hosting.Tests/CachingResponsesRouteResolverTests.cs:58` (`ResolveRouteValueAsync_ShouldReadCurrentCatalogOnEachCall`) is a real behavior test: it mutates the catalog result and asserts the second resolution returns `/api/v1/llm/anthropic/v2`, so this is not bump-only coverage.
- `test/Aevatar.Hosting.Tests/CachingResponsesRouteResolverTests.cs:83` (`ResolveRouteValueAsync_ShouldReadCatalogForEachBearer`) asserts two bearer resolutions perform two catalog reads, covering the removed per-bearer cache behavior.
- `test/Aevatar.Hosting.Tests/CachingResponsesRouteResolverTests.cs:1` lacks a source-regression assertion such as reading `ResponsesRouteResolver.cs` and asserting it does not contain cache state tokens (`ConcurrentDictionary`, `CacheTtl`, `_cache`, `CacheEntry`). This cluster explicitly introduces the no-regression rule “do not store user route facts in singleton process memory,” so a source guard is the missing test-quality piece.
- `test/Aevatar.Hosting.Tests/CachingResponsesRouteResolverTests.cs:8` renames the test class to `ResponsesRouteResolverTests`, but the file path is still `CachingResponsesRouteResolverTests.cs`. That is minor, but it makes the matching test-file convention stale after deleting `CachingResponsesRouteResolver`.
- The PR test diff adds no `Task.Delay`, `Thread.Sleep`, `WaitUntilAsync`, `[Skip]`, or `[Trait("Category","Manual")]`; I did not see weakened assertions in the touched test file.
## What would change your verdict
Add a small source-regression test for `ResponsesRouteResolver.cs` that asserts the forbidden singleton-cache tokens are absent, and rename the test file to `ResponsesRouteResolverTests.cs` so the test file matches the production type.
REVIEW_DONE:798:tests:comment
⟦AI:AUTO-LOOP⟧⟦AI:AUTO-LOOP⟧ |
📊 codex 进展 review-pr798-quality-r1 (⏳ 进行中; 已跑 9 min)
|
📊 codex 进展 review-pr798-tests-r1 (⏳ 进行中; 已跑 9 min)
|
🤖 reviewer r1 + CI green → auto-merge
CI: state=CLEAN + 0 fail。 → squash merge。iter26 cluster-026 完成。 ⟦AI:AUTO-LOOP⟧ |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## auto-refact-dev #798 +/- ##
================================================
Coverage 82.99% 82.99%
================================================
Files 970 970
Lines 61266 61266
Branches 8000 8000
================================================
Hits 50845 50845
Misses 6967 6967
Partials 3454 3454
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Summary / 摘要
English
iter26 cluster-026-responses-route-user-catalog-cache (medium, CLAUDE.md §"事实源唯一" §"中间层状态约束").
中文
iter26 cluster-026 — responses route 内的 user catalog 缓存清理。
详见 audit cluster, implement summary.
Stacked-PR
iter26 batch 1. Base =
auto-refact-dev. Rollup target =dev.🤖 Auto-loop / codex-refactor-loop iter26
⟦AI:AUTO-LOOP⟧