test: strengthen durable correctness coverage for responses state#742
Open
YueZh127 wants to merge 2 commits into
Open
test: strengthen durable correctness coverage for responses state#742YueZh127 wants to merge 2 commits into
YueZh127 wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## dev #742 +/- ##
==========================================
+ Coverage 82.32% 82.51% +0.19%
==========================================
Files 932 941 +9
Lines 59485 60101 +616
Branches 7805 7872 +67
==========================================
+ Hits 48970 49594 +624
+ Misses 7155 7114 -41
- Partials 3360 3393 +33
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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 #667
Problem
Responses durable 主链已经有基本覆盖,但在
#667关注的几类边界上,测试还不够扎实:LlmSession对 forwarded tool call 的权威状态推进还缺少更完整的 durable contract 覆盖ResponsesAgentToolState对 terminal / expired state 的稳定读取与恢复语义覆盖不足/v1/responses对 expired / cancelled / terminal state 的错误表达还缺少更细的边界测试Solution
这次 PR 只补测试,不改生产语义、不改公开接口,围绕
#667增加 durable correctness coverage:LlmSessionGAgentTests中补 forwarded tool call durable lifecycle 覆盖ResponsesAgentToolStateGAgentTests中补 terminal / expired state 的稳定查询与恢复语义ResponsesAgentToolStateCurrentStateProjectorTests中补 current-state projector 对 terminal state 的对外呈现保护MainnetResponsesEndpointsTests中补 host 级 durable rejection coverage,确保 cancelled / expired / terminal state 不会被错误继续推进,也不会错误调用 providerScope
本 PR 仅包含测试改动,未修改生产代码。
涉及文件:
test/Aevatar.GAgentService.Tests/Core/LlmSessionGAgentTests.cstest/Aevatar.GAgentService.Tests/Core/ResponsesAgentToolStateGAgentTests.cstest/Aevatar.GAgentService.Tests/Projection/ResponsesAgentToolStateCurrentStateProjectorTests.cstest/Aevatar.Hosting.Tests/MainnetResponsesEndpointsTests.csKey Coverage Added
LlmSessionforwarded tool call 从Pending -> Received -> Resolved的 durable 状态闭环ResolvedAtResponsesAgentToolState在 expired / cancelled / resolved 等 terminal state 下可稳定查询previous_response_idexpired / cancelled 时返回结构化错误,而不是继续 provider pathtool_call_not_available,且不写入 tool result、不调用 providerValidation
已执行:
结果:
Aevatar.GAgentService.Tests目标过滤通过MainnetResponsesEndpointsTests通过