iter43 issue-865 streaming-proxy-room-chat-host-orchestration: reuse StreamingProxyGAgent + 删 coordinator/side-store#874
Conversation
…StreamingProxyGAgent + 删 coordinator/side-store 按 issue #865 Phase 9 r2 consensus(meta-judge: reuse-existing-room-actor): 1. StreamingProxyGAgent 扩展拥有 participant facts / rounds / failures / terminal-state(典型 actor-owned events) 2. Endpoint: 删 IActorRuntime 注入,改 typed command/interaction service only 3. Coordinator: StreamingProxyNyxParticipantCoordinator 大幅 shrink — 仅作 Nyx external catalog/provider adapter call(无 business decision) 4. Participant side-store: ActorBackedStreamingProxyParticipantStore 转 projection readmodel(read-only),通过 StreamingProxyRoomParticipantsProjector + ReadModel snapshot 5. 新增 StreamingProxyRoomParticipantsQueryPort + Snapshot + Projector + MetadataProvider 6. streaming_proxy_messages.proto: 扩展 typed events 7. Host/API: typed command submission + projection/SSE observation only(无 actor 实例 / 无 envelope 构造) 不引入新 actor type(复用 StreamingProxyGAgent)。 Closes #865 ⟦AI:AUTO-LOOP⟧
🤖 Phase 8 Reviewer —
|
🤖 Phase 8 Reviewer —
|
🤖 Phase 8 Reviewer —
|
📊 状态 — r1 architect substantive comment(credential safety)→ 派 fix-r2
🤖 controller status banner ⟦AI:AUTO-LOOP⟧ |
📊 codex 进展 review-pr874-architect-r1 (⏳ 进行中; 已跑 11 min)
|
📊 codex 进展 review-pr874-quality-r1 (⏳ 进行中; 已跑 11 min)
|
📊 codex 进展 review-pr874-tests-r1 (⏳ 进行中; 已跑 11 min)
|
🤖 fix-codex round 2 — credential safetyPR: #874 Applied
Review Notes
Verification
FIX_DONE:874:round-2:applied-4:rejected-0:blocked-0 ⟦AI:AUTO-LOOP⟧ |
…r token 改 opaque handle 按 PR #874 r1 architect substantive comment(security): - 移除 StreamingProxyRoomChatRequested.access_token proto 字段 - 新 StreamingProxyRoomCredentialHandles.cs: opaque credential handle 模式(actor-local short-lived,non-persisted) - StreamingProxyRoomChatCommand 改携 credential_handle_id,actor turn 内 adapter 边界 resolve - StreamingProxyEndpoints/GAgent/RoomInteraction/NyxParticipantCoordinator 适配 handle 流 - ServiceCollectionExtensions 注册 handle registry - StreamingProxyCoverageTests 更新覆盖 credential boundary(+96 行测试) 确保 bearer token 不再进 proto domain/command payload,避免 EventEnvelope 持久化/日志/replay/dead-letter 风险。 applied=4 rejected=0 blocked=0(per fix-pr874-r2 codex) ⟦AI:AUTO-LOOP⟧
🤖 Phase 8 Reviewer —
|
🤖 Phase 8 Reviewer —
|
Phase 8 Reviewer - tests - PR #874 round r2VerdictREVIEW_DONE:874:tests:comment Finding
Coverage Assessment
Verification
REVIEW_DONE:874:tests:comment ⟦AI:AUTO-LOOP⟧ |
📊 状态 — r2 1 approve + 2 comment(无 reject)→ 派 fix-r3 解 tests narrow comment
🤖 controller status banner ⟦AI:AUTO-LOOP⟧ |
📊 codex 进展 review-pr874-architect-r2 (⏳ 进行中; 已跑 9 min)
|
📊 codex 进展 review-pr874-quality-r2 (⏳ 进行中; 已跑 9 min)
|
📊 codex 进展 review-pr874-tests-r2 (⏳ 进行中; 已跑 9 min)
|
🤖 fix-codex round 3 — credential handle lifecycle testsPR: #874 Applied
Files Changed
Verification
FIX_DONE:874:round-3:applied-2:rejected-0:blocked-0 ⟦AI:AUTO-LOOP⟧ |
…e + expiry) 按 PR #874 r2 tests narrow comment 补: - StreamingProxyRoomCredentialHandles: single-use test(handle 用过 invalidate) - expiry test(TTL 到 expired) applied=2 rejected=0 blocked=0(per fix-pr874-r3 codex) ⟦AI:AUTO-LOOP⟧
🤖 Phase 8 Reviewer —
|
Phase 8 Reviewer - tests - PR #874 round r3VerdictREVIEW_DONE:874:tests:approve Assessmentr3 resolves the r2 tests comment. The new focused coverage directly exercises
The endpoint and actor changes consistently pass the scoped handle through the existing command path: the endpoint creates the handle with room/scope/session, the protobuf/EventEnvelope still carries only Verification
No new tests finding. REVIEW_DONE:874:tests:approve ⟦AI:AUTO-LOOP⟧ |
Phase 8 Reviewer -
|
✅ 状态 — r3 3/3 unanimous approve → merge
🤖 controller status banner ⟦AI:AUTO-LOOP⟧ |
📊 codex 进展 review-pr874-architect-r3 (⏳ 进行中; 已跑 10 min)
|
📊 codex 进展 review-pr874-quality-r3 (⏳ 进行中; 已跑 10 min)
|
📊 codex 进展 review-pr874-tests-r3 (⏳ 进行中; 已跑 10 min)
|
… facade + actor-owned compensation (#885) * iter47 issue-877 chat-endpoints-own-lifecycle-and-compensation: typed lifecycle facades + actor 拥有 compensation/terminal-state 按 issue #877 Phase 9 r1 consensus(meta-judge: structural,no new actor): 1. NyxIdChatLifecycleFacade.cs(新) + StreamingProxyChatLifecycleFacade.cs(新):typed lifecycle command facade 2. NyxIdChatEndpoints: 删 IActorRuntime / IRegistryCommandPort / IChatHistoryStore 注入,改 facade only 3. StreamingProxyEndpoints: 进一步收窄(与 #874 不冲突) 4. NyxIdChatGAgent / StreamingProxyGAgent: 扩展 lifecycle + compensation events(actor-owned) 5. agent_run.proto: typed lifecycle event 字段 6. ServiceCollectionExtensions: 注册 facade + 删 store injection 7. 测试覆盖 endpoint adapter only + facade dispatch + actor compensation events 不引入新 actor / 不 saga actor。 Closes #877 ⟦AI:AUTO-LOOP⟧ * fix(pr885 r2): review 反馈 — typed lifecycle facade + actor compensation 完整化 3 reviewer r1: architect/tests reject、quality approve。r2 应用 2 处: - NyxIdChat / StreamingProxy chat lifecycle facade 与 actor compensation 全链路对齐 - 测试覆盖 facade dispatch / actor compensation / terminal-state readmodel ⟦AI:AUTO-LOOP⟧ * fix(pr885 r3): review r2 4 处 blocking — explicit CreatedLocally + admission gate + room unregister + real-actor compensation tests 1. ARCHITECT: NyxId create resolver 显式 set CreatedLocally(ForwardToGagent=false / fresh=true);actor 不再从 id prefix 推断 → 既有路由 actor 不会被误销毁 2. QUALITY-1: StreamingProxy room delete 补回 IGAgentActorRegistryCommandPort 注销(facade 漏抄);delete-side fail 时返回失败 3. QUALITY-2: NyxId delete resolver non-accepted admission 时拒绝解析 → 403/404 路径不再触发 actor unregister/delete history 4. TESTS: NyxIdChatGAgentTests 加真 envelope test 覆盖 HandleCreationCompensationAsync(createdLocally=true|false 双 branch)+ HandleDeletionCompensationAsync(registration restore);endpoint helper 不再 short-circuit 修后 lifecycle 127 passed + test_stability_guards passed。 ⟦AI:AUTO-LOOP⟧ * fix(pr885 r4): await actor outcome — replace pre-dispatch ACK with continuation event architect+tests r3 同根 BLOCKER:CreateConversationAsync 返 200 基于 pre-dispatch ACK,actor 后续可 compensate/destroy 不抛 → endpoint 报 success 但 actor 没真注册。 修法 A(continuation): - 新 ICommandDispatchService.DispatchAndAwaitOutcomeAsync<TOutcome> + ActorOutcomeSubscription + CommandOutcomeDispatchResult - NyxIdChatGAgent 完成 create handler 后发 typed NyxIdChatConversationCreationOutcome continuation event(success/RegistrationUnavailable/Destroyed) - NyxIdChatLifecycleFacade 改 await continuation,基于真 actor outcome 构 receipt - endpoint 200 / 503 / 等基于真 outcome - 删 InlineNyxIdCreateLifecycleDispatchService fake → endpoint test 走真 dispatch + 真 actor + 假 registry 注入失败 加 tests: - 真 actor compensation test(真 envelope 经真 CommandDispatchService) - delete admission negative(Denied/ScopeMismatch/Unavailable)— 验证无 actor delete dispatch、无 history delete、无 unregister 副作用 ⟦AI:AUTO-LOOP⟧ * fix(pr885 r5): StreamActorOutcomeChannel + subscribe-before-dispatch + real DELETE pipeline architect r4 3 个 BLOCKER: 1. InMemoryDict 违 actor/distributed 规则 → 改 StreamActorOutcomeChannel(Orleans IStreamProvider) 2. dispatch-before-outcome 顺序倒置 → subscribe-before-dispatch + actor failure 只发 outcome 不 rethrow 3. DELETE endpoint 测试仍 inline fake → 删,走真 dispatch pipeline 修法: - 删 InMemoryActorOutcomeChannel.cs - 新 StreamActorOutcomeChannel.cs(IStreamProvider 后端,multi-silo OK) - DefaultCommandOutcomeDispatchService subscribe 先,然后 dispatch,await outcome(支持 dispatch 异常 fallthrough) - 约束 outcome dispatch 只接受 protobuf 消息 - NyxIdChatGAgent registration failure 时发 unavailable outcome 后**不 rethrow**(endpoint 基于 outcome map 503) - 删 DELETE endpoint inline fake dispatch helper;tests 走真 DefaultCommandDispatchService → ActorCommandTargetDispatcher → NyxIdChatGAgent.HandleDeleteConversationAsync - 加 endpoint 503 assertion(真 outcome 路径) 41/41 + 72/72 PASS,test_stability_guards PASS。 ⟦AI:AUTO-LOOP⟧
|
PR #874 merge-conflict investigation complete.\n\nResult: escalate, not mechanically resolvable. The conflict is between iter43 actor-owned StreamingProxy room-chat orchestration and newer base changes centered on StreamingProxyChatLifecycleFacade / lifecycle endpoint composition. No business conflict files were resolved; the test merge was aborted. CI checks are still absent (statusCheckRollup is empty).\n\nDetails: https://github.com/aevatarAI/aevatar/blob/4004674cac4018479d01d602926b65751cadb463/.refactor-loop/runs/investigation-pr874-merge-conflict.md |
📊 状态 — 已收到 maintainer 评论(daemon 识别)
🤖 comment-monitor.sh daemon ⟦AI:AUTO-LOOP⟧ |
Reflection — PR #874 after #885/#893Date: 2026-05-23 Scope
GitHub State Observed
What #874 Was Trying To Fix#865 identified that StreamingProxy room chat facts were being advanced outside the room actor:
#874's valuable direction was: What #885 Already Supersedes#885 supersedes the endpoint/lifecycle part of #874:
That means #874's endpoint rewrite and much of its command/interaction scaffolding should not be manually merged. It would regress or duplicate the #885 surface. What #893 Covers#893 covers the participant authority / dual-store part of #874:
This supersedes #874's side-store/readmodel migration direction, but #893 is not merged yet at inspection time. Remaining GapThere is one real #874 idea not cleanly covered by #885 + #893 as currently observed:
That is a legitimate follow-up concern, but it should be redesigned as a small patch on top of #885 and the #893 participant-authority surface. It should not be rescued by manually merging #874. DecisionChoose C: Drop + redesign. Rationale:
META_RESOLVED:drop-redesign:#874 is stale after #885 and #893 direction; do not manually merge, redesign only the remaining coordinator-adapter gap on top of the new facade/room-authority surface ⟦AI:AUTO-LOOP⟧ |
✅ Closed as superseded (per reflector META_RESOLVED:drop-redesign)#885 实现了 chat lifecycle facade + StreamActorOutcomeChannel(merged)。#893 实现了 room actor 单 authority + actor-owned idempotent join(待 merge)。两者共同覆盖了 #874 的主要范围。 唯一未覆盖的窄缝: 详见 reflection artifact 和 #893。 ⟦AI:AUTO-LOOP⟧ |
📊 codex 进展 reflect-pr874 (⏳ 进行中; 已跑 7 min)
|
摘要
issue #865 cluster-043-streaming-proxy-room-chat-host-orchestration(high,多 CLAUDE 条款:top-layering / read-write-split / command-skeleton / runtime-shape-not-fact / authoritative-state / actor-lifecycle / ai-streaming)。
Phase 9 共识来源
r1 三 solver(minimal 复用 / structural 新 actor / delete 删多轮)→ converge:round-2:"new session-scoped actor vs reuse with self-continuation"。r2 三 solver 都收敛到 reuse StreamingProxyGAgent + delete multi-round coordinator + remove side-store write authority(避开 hardcoded trigger #2 new actor)。
META_JUDGE_DONE:consensus:reuse-existing-room-actor:Reuse StreamingProxyGAgent as the authoritative room/session fact owner; move retained chat progression into typed actor-owned sub-state and self-continuation only if multi-step behavior remains; delete or shrink StreamingProxyNyxParticipantCoordinator; remove participant side-store write authority; keep Host/API as typed command submission plus projection/SSE observation only.改动范围
16 files (+828/-1169,净 -341 LOC 删 coordinator + side-store write):
本地验证:
dotnet build aevatar.slnx --nologo✅ · architecture_guards / test_stability_guards / query_projection_priming_guard / projection_state_version_guard ✅ · StreamingProxy 测试 ✅。详见 implement summary 和 meta-judge r2。
Closes #865
📢 cc 原作者: @loning @eanzhao
🤖 Auto-loop / codex-refactor-loop iter43
⟦AI:AUTO-LOOP⟧