#1424 first slice: WorkflowChatSource.Direct() address-free#1433
Conversation
由 Phase 9 split first-slice 产生。详见 GitHub issue #1424 body。 ⟦AI:AUTO-LOOP⟧
📊 当前状态 — Phase 8 r1 reviewer 派出(❌ 不需要人介入)
下一步自动会做:3 reviewer 全 approve + CI 绿 → auto-merge;reject → fix r2。 🤖 controller status banner ⟦AI:AUTO-LOOP⟧ |
🤖 quality review: commentTL;DR
详细说明
其他 quality 项未发现问题: 📎 完整 codex 原始输出(存档备查)pr: 1433
|
🤖 Architect review: approve, no blocking architecture regressionTL;DR
详细说明我按 架构上,这个 first slice 保持在 issue #1424 声明范围内: 📎 完整 codex 原始输出(存档备查)---
pr: 1433
role: architect
verdict: approve
---
## Verdict
approve: no architectural concerns; the PR removes the Direct-source actor-address carrier without adding a parallel path or new CLAUDE/AGENTS violation.
## Evidence
- `src/workflow/Aevatar.Workflow.Application.Abstractions/Runs/WorkflowChatRunModels.cs:75`: `WorkflowChatSource.ActorId` no longer returns an actor id for `Direct`, aligning with CLAUDE.md: "API 字段单一语义:一个字段只表达一个含义,禁止双重语义(如\"名称查找 + inline 内容\")。"
- `src/workflow/Aevatar.Workflow.Application.Abstractions/Runs/WorkflowChatRunModels.cs:111`: the changed `Direct()` factory has the required Old/New refactor comment and makes `Direct` address-free; this supports CLAUDE.md: "`actorId` 对调用方不透明:不得解析前缀/类型名/实现来源,不得把字面模式当业务判断条件。"
- `src/workflow/Aevatar.Workflow.Application/Runs/WorkflowRunActorResolver.cs:224`: `ResolveSourceActorId` only binds `DefinitionActor` and `InlineYamlBundle`, so `Direct` no longer performs actor binding lookup; this keeps query/command identity semantics separated under CLAUDE.md: "追踪标识与目标身份分离:`commandId/correlationId` 追踪请求,`actorId` 标识实体;禁止混用或假设一一对应。"
- `src/workflow/Aevatar.Workflow.Infrastructure/CapabilityApi/ChatRunRequestNormalizer.cs:170`: typed `source.kind=direct + actorId` is rejected instead of silently aliasing to actor-targeted execution, matching the issue #1424 first-slice scope and CLAUDE.md: "删除优先:空转发、重复抽象、无业务价值代码直接删除,不保留兼容空壳。"
- Scope honesty: the diff touches only the declared first-slice areas from issue #1424: workflow chat source model, run actor resolver, normalizer, and corresponding tests. No `.proto` or `docs/canon/*.md` changes are present.
- Anti-pattern scan: no production diff hits for `actor.HandleEventAsync(`, `SubscribeAsync<EventEnvelope>`, JSON state/payload serialization, `Task.Delay(`, `GetAwaiter().GetResult()`, `TypeUrl.Contains(...)`, raw `new HttpClient(`, disabled tests, `*WriteActor`/`*ReadActor`/`*Store` splits, or NyxID/chrono references. The only `Dictionary<,>` diff hit is a test-local fake in `WorkflowRunActorResolverTests`, not middle-layer cross-request fact state.
REVIEW_DONE:1433:architect:approve⟦AI:AUTO-LOOP⟧ |
🤖 tests reviewer:PR 1433 测试覆盖通过TL;DR
详细说明本轮只看测试角度。 我也检查了 touched tests 中的 📎 完整 codex 原始输出(存档备查)---
pr: 1433
role: tests
verdict: approve
---
## Verdict
Test coverage and quality are adequate for the direct-source address-free change.
## Evidence
- `test/Aevatar.Workflow.Application.Tests/WorkflowRunActorResolverTests.cs:97` adds `ResolveOrCreateAsync_ShouldNotReadSourceActorBinding_WhenSourceIsDirect`, which asserts the resolver still creates the default direct run and that the binding reader is never called.
- `test/Aevatar.Workflow.Host.Api.Tests/WorkflowCapabilityEndpointsCoverageTests.cs:500` adds `ChatRunRequestNormalizer_ShouldRejectDirectSourceActorId`, covering the new typed-direct branch that rejects an actor id instead of smuggling it into `Direct`.
- `test/Aevatar.Workflow.Host.Api.Tests/WorkflowCapabilityEndpointsCoverageTests.cs:472` updates the direct alias case to assert an address-free `Direct` source (`ActorId == null`) rather than preserving an actor id.
- Checked touched tests for `Task.Delay`, `Thread.Sleep`, `WaitUntilAsync`, `[Skip]`, manual traits, `Assert.True(true)`, and `NotThrow`; no new violations found.
- Verification: `dotnet test test/Aevatar.Workflow.Application.Tests/Aevatar.Workflow.Application.Tests.csproj --nologo --filter FullyQualifiedName~WorkflowRunActorResolverTests` passed: 24 passed, 0 failed, 0 skipped.
- Verification: `dotnet test test/Aevatar.Workflow.Host.Api.Tests/Aevatar.Workflow.Host.Api.Tests.csproj --nologo --filter FullyQualifiedName~WorkflowCapabilityEndpointsCoverageTests` passed: 37 passed, 0 failed, 0 skipped.REVIEW_DONE:1433:tests:approve ⟦AI:AUTO-LOOP⟧ |
✅ Phase 8 r1 共识达成
下一步自动会做:CI 全绿 → auto-merge + close #1424。 🤖 controller status banner ⟦AI:AUTO-LOOP⟧ |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## auto-refact-dev #1433 +/- ##
================================================
Coverage 83.70% 83.71%
================================================
Files 1012 1012
Lines 68261 68257 -4
Branches 8832 8830 -2
================================================
+ Hits 57135 57138 +3
+ Misses 7232 7228 -4
+ Partials 3894 3891 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
🤖 conflict-resolve 报告 — #1433
验证:
CONFLICT_RESOLVED:1433:resolved:1:tests-pass |
…ssue1424-first # Conflicts: # src/workflow/Aevatar.Workflow.Infrastructure/CapabilityApi/ChatRunRequestNormalizer.cs
🤖 Tests review: approveTL;DR
详细说明新增测试覆盖了本次核心行为: 我同时检查了触达测试 diff,没有新增 📎 完整 codex 原始输出(存档备查)pr: 1433
|
🤖 architect review: comment,refactor 注释前缀需统一TL;DR
详细说明我按最新 需要 surfacing 的点是 reviewer checklist 明确要求每个 refactored type/method 使用 📎 完整 codex 原始输出(存档备查)---
pr: 1433
role: architect
verdict: comment
---
## Verdict
comment-only: no blocking architecture regression, but the new refactor self-doc comments do not use the checklist-required `iterN/cluster-XXX` prefix.
## Evidence
- `src/workflow/Aevatar.Workflow.Application.Abstractions/Runs/WorkflowChatRunModels.cs:111`, `src/workflow/Aevatar.Workflow.Application/Runs/WorkflowRunActorResolver.cs:226`, and `src/workflow/Aevatar.Workflow.Infrastructure/CapabilityApi/ChatRunRequestNormalizer.cs:134`: each new Old/New refactor comment is meaningful, but the prefix is `// Refactor (phase9/cluster-349):` instead of the role checklist's required `// Refactor (iterN/cluster-XXX): Old pattern: … New principle: …`. This is a review checklist miss, not a CLAUDE/AGENTS architecture violation.
- `src/workflow/Aevatar.Workflow.Application.Abstractions/Runs/WorkflowChatRunModels.cs:75` and `src/workflow/Aevatar.Workflow.Infrastructure/CapabilityApi/ChatRunRequestNormalizer.cs:160`: the net behavior makes `Direct` address-free and rejects typed direct actor ids, which aligns with CLAUDE.md: "API 字段单一语义:一个字段只表达一个含义,禁止双重语义(如"名称查找 + inline 内容")。"
- Scope honesty: current diff is limited to workflow chat source normalization/resolution plus corresponding tests; no `.proto` or `docs/canon/*.md` changes are present, and no NyxID / chrono-* references are introduced.
- Anti-pattern scan: no production diff hits for `actor.HandleEventAsync(`, `SubscribeAsync<EventEnvelope>`, JSON state/payload serialization, `Task.Delay(`, `GetAwaiter().GetResult()`, `TypeUrl.Contains(...)`, raw `new HttpClient(`, disabled tests, `*WriteActor`/`*ReadActor`/`*Store` splits, or NyxID/chrono references. The only `Dictionary<,>` diff hit is a test-local fake in `WorkflowRunActorResolverTests`, not middle-layer cross-request fact state.
## What would change your verdict
Update the three new refactor comment prefixes from `phase9/cluster-349` to the mandated `iterN/cluster-349` form, preserving their existing Old pattern / New principle content.
REVIEW_DONE:1433:architect:comment |
🤖 quality review:approveTL;DR
详细说明本轮按三点检查:先确认 PR base/head 是 质量结论是 approve:新增 self-doc comment 都有 📎 完整 codex 原始输出(存档备查)---
pr: 1433
role: quality
verdict: approve
---
## Verdict
Approve: the change is focused, names keep the source semantics clear, no dead code or over-engineering was introduced, and the required refactor self-docs are readable.
## Evidence
- src/workflow/Aevatar.Workflow.Application.Abstractions/Runs/WorkflowChatRunModels.cs:111 documents the old address-smuggling pattern and replaces it with an address-free `Direct()` factory, which makes the public source variant single-purpose.
- src/workflow/Aevatar.Workflow.Application/Runs/WorkflowRunActorResolver.cs:224 keeps actor-id lookup restricted to actor-addressed variants; the method stays small and branch count remains straightforward.
- src/workflow/Aevatar.Workflow.Infrastructure/CapabilityApi/ChatRunRequestNormalizer.cs:132 rejects typed `direct` sources carrying an actor id instead of silently reusing another source shape, avoiding ambiguous field semantics.
- test/Aevatar.Workflow.Application.Tests/WorkflowRunActorResolverTests.cs:97 adds a focused regression test with a reachable private test helper at line 718; no unused helper or production-only abstraction is added.
- test/Aevatar.Workflow.Host.Api.Tests/WorkflowCapabilityEndpointsCoverageTests.cs:526 keeps the alias matrix consistent and adds a narrow direct+actor rejection case at line 558.
REVIEW_DONE:1433:quality:approve ⟦AI:AUTO-LOOP⟧ |
摘要
closes #1424(由 Phase 9 split first-slice 产生)
详见 GitHub issue body 完整方案 + 关联 audit + judge artifact。
Stacked-PR
base =
auto-refact-dev。🤖 Auto-loop / codex-refactor-loop
⟦AI:AUTO-LOOP⟧