iter104 cluster-1 #1063: 删 StreamingProxyChatLifecycleFacade,fold 进 StreamingProxyGAgent#1069
Conversation
📊 PR open + 3 reviewers 派出(Phase 8 r1)
⟦AI:AUTO-LOOP⟧ |
🤖 Phase 8 Reviewer —
|
🤖 Phase 8 Reviewer —
|
🤖 Phase 8 Reviewer —
|
📊 r1 verdicts(architect+tests reject)→ fix r2
⟦AI:AUTO-LOOP⟧ |
📊 codex 进展 review-pr1069-architect-r1 (⏳ 进行中; 已跑 11 min)
|
📊 codex 进展 review-pr1069-quality-r1 (⏳ 进行中; 已跑 11 min)
|
📊 codex 进展 review-pr1069-tests-r1 (⏳ 进行中; 已跑 11 min)
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## auto-refact-dev #1069 +/- ##
===================================================
+ Coverage 83.05% 83.16% +0.11%
===================================================
Files 999 1001 +2
Lines 65296 65694 +398
Branches 8442 8489 +47
===================================================
+ Hits 54231 54635 +404
+ Misses 7408 7360 -48
- Partials 3657 3699 +42
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…treamingProxyGAgent Phase 9 r2 consensus(reflector r1 retry-fix narrowing → 3/3 unanimous): - 不新 actor type;reuse existing StreamingProxyGAgent - delete/fold StreamingProxyChatLifecycleFacade orchestration into actor handlers - 保留 deprecated compat endpoints - 禁 reuse LlmSessionGAgent(与 #1058 耦合) 违反 CLAUDE.md「Actor 设计」「业务推进内聚」「命令骨架内聚」: Application 层 facade 持 chat continuation lifecycle orchestration。 修法: - 删 StreamingProxyChatLifecycleFacade + DI 注册 - StreamingProxyEndpoints 保留 deprecated compat surface,只做 HTTP normalize + admission + dispatch/attach - StreamingProxyGAgent 加 typed self continuation StreamingProxyChatLifecycleContinuationRequested,actor handler 内推进 Nyx participant join/reply/terminal effects - 不新 actor;不动 LlmSessionGAgent;不动 NyxID/chrono-* 外部 verified: - build + AI tests (StreamingProxy filter) + Workflow Host API tests + Workflow SDK tests 全过 - architecture/test_stability guards 全过 closes #1063 ⟦AI:AUTO-LOOP⟧
…er 做 Nyx I/O r1 architect reject:HandleChatLifecycleContinuationRequested 在 actor handler 内调 StreamingProxyNyxParticipantCoordinator 做 Nyx/LLM streaming I/O,违反 "External Nyx streaming I/O stays outside actor turns"。 r1 tests reject:typed continuation lifecycle 无直接 GAgent 行为测试。 修法: - 删 actor handler 内 await StreamingProxyNyxParticipantCoordinator - actor 只 publish typed continuation request + persist actor-owned facts - 引入 outside-actor adapter/runner(host-side consumer)消费 typed continuation - adapter 完成 participant join/reply/terminal → typed event 回 actor commit state - 加 GAgent 行为测试:publish continuation(有/无 token)+ continuation handler verified: - build + AI tests + Workflow Host + Workflow SDK tests 全过 - architecture/test_stability guards 全过 ⟦AI:AUTO-LOOP⟧
da598d5 to
4122d97
Compare
📊 fix r2 已提交 → 派 r2 reviewers × 3
⟦AI:AUTO-LOOP⟧ |
🤖 Phase 8 Reviewer —
|
📊 codex 进展 review-pr1069-tests-r2 (⏳ 进行中; 已跑 4 min)REVIEW_DONE:1069:tests-r2:approve codex 结论: |
🤖 Phase 8 Reviewer —
|
🤖 Phase 8 Reviewer —
|
| 检查项 | 结论 |
|---|---|
| actor handler 是否只 publish + persist | 通过。StreamingProxyGAgent.cs:68-87 persist facts + SendToAsync,StreamingProxyGAgent.cs:95-109 compat handler 只转发 typed continuation。 |
| continuation runner 是否在 actor turn 外 | 通过。ServiceCollectionExtensions.cs:33-36 注册为 IHostedService,StreamingProxyChatLifecycleContinuationRunner.cs:35-41 在 host start 时订阅。 |
| runner 到 actor reply 是否 typed event/command | 通过。StreamingProxyChatLifecycleContinuationRunner.cs:82-107 外部 I/O 后调用 typed room command;StreamingProxyGAgent.cs:218-231 由 actor commit terminal state。 |
| self-doc 是否清晰 | 通过。新 runner 和 compat handler 都有 r2 old/new pattern comment,说明 actor-turn I/O 被移出。 |
📎 完整 codex 原始输出(存档备查)
---
pr: 1069
role: architect
verdict: approve
---
## Verdict
approve — r2 removes the r1 actor-turn Nyx/LLM streaming I/O violation by moving continuation execution to a hosted runner and returning outcomes through typed room commands.
## Evidence
- `agents/Aevatar.GAgents.StreamingProxy/StreamingProxyGAgent.cs:68` persists `StreamingProxyChatLifecycleAcceptedEvent`, and `:69` persists `GroupChatTopicEvent`; the actor owns lifecycle/topic facts before any continuation is requested.
- `agents/Aevatar.GAgents.StreamingProxy/StreamingProxyGAgent.cs:76` sends `StreamingProxyChatLifecycleContinuationRequested` to `ChatLifecycleContinuationRunnerStreamId`; no `StreamingProxyNyxParticipantCoordinator` call remains in `HandleChatRequest`.
- `agents/Aevatar.GAgents.StreamingProxy/StreamingProxyGAgent.cs:95`-`:109` keeps the compat `continueChatLifecycle` handler as a typed republish only. This satisfies the CLAUDE/AGENTS rule: "External Nyx streaming I/O stays outside actor turns" and "跨 actor 等待必须 continuation 化".
- `agents/Aevatar.GAgents.StreamingProxy/ServiceCollectionExtensions.cs:35` registers `StreamingProxyChatLifecycleContinuationRunner` as `IHostedService`, and `agents/Aevatar.GAgents.StreamingProxy/StreamingProxyChatLifecycleContinuationRunner.cs:35`-`:41` subscribes from host startup. This confirms the continuation consumer is outside the actor event handler.
- `agents/Aevatar.GAgents.StreamingProxy/StreamingProxyChatLifecycleContinuationRunner.cs:82`-`:98` is the only reviewed path that awaits Nyx participant join/reply streaming, and it lives in the hosted runner rather than the actor.
- `agents/Aevatar.GAgents.StreamingProxy/StreamingProxyChatLifecycleContinuationRunner.cs:100`-`:107` returns terminal outcome through `IStreamingProxyRoomCommandService.PublishTerminalStateAsync`; `agents/Aevatar.GAgents.StreamingProxy/StreamingProxyGAgent.cs:218`-`:231` commits the typed terminal request inside the actor, so there is no direct actor state mutation from the runner.
- `agents/Aevatar.GAgents.StreamingProxy/streaming_proxy_messages.proto:74`-`:82` adds a new request message with new field numbers only; no field renumber/reuse observed.
- Anti-pattern grep on the PR diff did not find new `actor.HandleEventAsync(`, `Task.Delay(` in production, `GetAwaiter().GetResult()`, `TypeUrl.Contains(...)`, `[Skip]`, raw `HttpClient` constructor in production, or host/application `SubscribeAsync<EventEnvelope>` use.
## What would change your verdict
N/A from architect angle.
REVIEW_DONE:1069:architect-r2:approveREVIEW_DONE:1069:architect-r2:approve
⟦AI:AUTO-LOOP⟧
✅ Phase 8 共识达成(r2 round)— 2 approve + 1 comment
结果:CI 验证通过后 auto-merge。
⟦AI:AUTO-LOOP⟧ |
Summary
Phase 9 r2 consensus(reflector r1 retry-fix narrowing → 3/3 unanimous):
不新 actor type;reuse existing
StreamingProxyGAgentdelete/fold
StreamingProxyChatLifecycleFacadeorchestration into actor handlers保留 deprecated compat endpoints
禁 reuse LlmSessionGAgent(与 [iter103 cluster-1] Responses/Messages 在 Application 层直接跑完整 LLM 会话(违反 actor-owned business progression) #1058 耦合)
Old:
StreamingProxyChatLifecycleFacade(Application 层)持 chat continuation lifecycle orchestration → 违反业务推进内聚New:
StreamingProxyGAgenttyped self continuationStreamingProxyChatLifecycleContinuationRequested推进 Nyx participant join/reply/terminal effects;Endpoints 只做 HTTP normalize+dispatch违反 CLAUDE.md:
Scope
Verification
dotnet build aevatar.slnx --nologo:0 errorscloses #1063
🤖 Auto-loop / codex-refactor-loop iter104
⟦AI:AUTO-LOOP⟧