修复 workflow llm_call ToolContext 传播#1664
Conversation
Remove the lossy runtime LLM override mirror so llm_call derives its child request from the workflow ToolContext single source of truth. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🤖 PR #1664 测试覆盖 Review: approveTL;DR
详细说明
稳定性和测试质量方面,触达测试 diff 没有新增 📎 完整 codex 原始输出(存档备查)---
pr: 1664
role: tests
verdict: approve
---
## Verdict
Approve: the changed workflow ToolContext propagation behavior has focused tests with concrete payload assertions, and the diff does not add polling waits, skips, manual traits, or weakened assertions.
## Evidence
- `test/Aevatar.Integration.Tests/WorkflowAdditionalModulesCoverageTests.cs:2001` (`LlmCallModule_ShouldForwardTypedRuntimeContextOverrides`) exercises the new `LLMCallModule` dispatch path from runtime `AgentToolExecutionContext` to `ChatRequestEvent`, asserting all seven `LlmControl` fields plus child `ToolContext` sections (`Request`, `Caller`, `Channel`, sender binding, connected services, external metadata, and skill recovery) and verifying request metadata remains a single passthrough entry.
- `test/Aevatar.Integration.Tests/WorkflowAdditionalModulesCoverageTests.cs:2095` (`LlmCallModule_ShouldForwardControlOnlyRuntimeContextWithoutChildToolContext`) covers the control-only branch: control fields are promoted into `chatRequest.LlmControl`, while `chatRequest.ToolContext` remains null.
- `test/Aevatar.Workflow.Core.Tests/Execution/WorkflowExecutionRuntimeContextTests.cs:48` (`SetToolContext_ShouldStoreToolContextAsOnlyRuntimeFact`) and `:144` (`SetRequestMetadata_ShouldNotMutateExistingToolContext`) cover the runtime-context contract change: `ToolContext` is the stored fact, `LlmOverrides` is absent, and request metadata updates do not erase an existing tool context.
- `test/Aevatar.Workflow.Core.Tests/Execution/WorkflowExecutionContextAdapterTests.cs:31` keeps adapter coverage for exposing the same runtime context and verifies the new `ToolContext` value through the adapter.
- Static diff scan over touched tests found no added `[Skip]`, `[Trait("Category","Manual")]`, `Task.Delay(...)`, `WaitUntilAsync(...)`, `Assert.True(true)`, or not-throw-only tests; `tools/ci/test_polling_allowlist.txt` is unchanged.
⟦AI:AUTO-LOOP⟧
REVIEW_DONE:1664:tests:approve⟦AI:AUTO-LOOP⟧ |
🤖 Architect review approve: ToolContext 单一事实源合规TL;DR
详细说明本次只看 PR #1664 / issue #1652。
📎 完整 codex 原始输出(存档备查)pr: 1664
|
🤖 代码质量审查:通过TL;DR:从 readability / naming / simplicity 角度看,本 PR 可以通过。 详细说明
Raw artifact---
pr: 1664
role: quality
verdict: approve
---
## Verdict
Approve: the change is focused, readable, and keeps the ToolContext-to-LLM-control mapping simple without adding dead code or unnecessary abstraction.
## Evidence
- `src/workflow/Aevatar.Workflow.Core/Execution/WorkflowExecutionRuntimeContext.cs:24` keeps the runtime context surface small after removing the separate `LlmOverrides` mirror; `ApplyToolContext` at line 67 now stores the tool context directly with no extra state copy.
- `src/workflow/Aevatar.Workflow.Core/Modules/LLMCallModule.cs:336` uses the intent-revealing `ApplyWorkflowToolContext` entry point, and it is reachable from dispatch at line 655.
- `src/workflow/Aevatar.Workflow.Core/Modules/LLMCallModule.cs:352` through line 402 splits the mapping and presence checks into small, direct helpers; no helper introduces a new abstraction or unused private surface.
- `test/Aevatar.Integration.Tests/WorkflowAdditionalModulesCoverageTests.cs:2001` and line 2095 cover both full ToolContext forwarding and control-only forwarding without adding unrelated fixture complexity.
- `${HOST_REFACTOR_COMMENT_POLICY:-none}` resolved to `none`; the PR does not add new refactor self-doc comments in the changed code and deletes the obsolete `WorkflowLlmRuntimeOverrides` self-doc block with the removed type.
## What would change your verdict (only if comment or reject)
N/A.
⟦AI:AUTO-LOOP⟧
REVIEW_DONE:1664:quality:approve⟦AI:AUTO-LOOP⟧ |
📊 当前状态 — review-gate 通过, 等 CI 完成(不需要人介入)
下一步自动会做:等待 🤖 controller status banner ⟦AI:AUTO-LOOP⟧ |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## auto-work-dev #1664 +/- ##
================================================
Coverage ? 83.05%
================================================
Files ? 1015
Lines ? 67502
Branches ? 8746
================================================
Hits ? 56062
Misses ? 7635
Partials ? 3805
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
摘要
修复 #1652:
workflow llm_call子请求现在从 workflow runtimeToolContext单一事实源派生上下文。WorkflowLlmRuntimeOverrides/LlmOverridesruntime mirror。LLMCallModule从 runtimeToolContext派生 childLlmControl七个窄字段。ToolContext只在存在 caller/channel/sender binding/connected services/external metadata/skill recovery 等非控制面工具执行语义时写入;LlmControl-only 场景不写 childToolContext。Scope / 范围
6 files changed, 208 insertions, 97 deletions.
src/workflow/Aevatar.Workflow.Core/Execution/WorkflowExecutionRuntimeContext.cssrc/workflow/Aevatar.Workflow.Core/Modules/LLMCallModule.cstest/Aevatar.Integration.Tests/WorkflowAdditionalModulesCoverageTests.cstest/Aevatar.Integration.Tests/WorkflowGAgentCoverageTests.cstest/Aevatar.Workflow.Core.Tests/Execution/WorkflowExecutionContextAdapterTests.cstest/Aevatar.Workflow.Core.Tests/Execution/WorkflowExecutionRuntimeContextTests.cs验证
dotnet build aevatar.slnx --nologo— passeddotnet test test/Aevatar.Workflow.Core.Tests/Aevatar.Workflow.Core.Tests.csproj --filter "FullyQualifiedName~WorkflowExecutionRuntimeContext|FullyQualifiedName~WorkflowExecutionContextAdapter|FullyQualifiedName~LLMCallModule" --nologo— passed, 24 testsdotnet test test/Aevatar.Integration.Tests/Aevatar.Integration.Tests.csproj --filter "FullyQualifiedName~LlmCallModule_ShouldForwardTypedRuntimeContextOverrides|FullyQualifiedName~WorkflowRunGAgent" --nologo— passed, 36 testsdotnet test test/Aevatar.Integration.Tests/Aevatar.Integration.Tests.csproj --filter "FullyQualifiedName~LlmCallModule_ShouldForwardControlOnlyRuntimeContextWithoutChildToolContext" --nologo— passed, 1 testbash tools/ci/test_stability_guards.sh— passedbash tools/ci/architecture_guards.sh— passedConsensus-rnd
structuralIMPLEMENT_DONE:issue-1652:okVERIFY_DONE:issue-1652:pass🤖 Auto-loop / codex-refactor-loop issue-1652
⟦AI:AUTO-LOOP⟧