You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #452 refines GAgent registry command/query/admission semantics for issue #348. During review, StreamingProxy room creation still has host/endpoint code directly orchestrating business lifecycle work.
StreamingProxyEndpoints.HandleCreateRoomAsync currently performs the full lifecycle from the HTTP surface:
validate caller scope
create the room actor through IActorRuntime
send the initialization envelope
register scope ownership in the registry
perform rollback across registry and actor runtime
The new registry ownership canon says HTTP endpoints should validate caller scope and delegate to an application command surface. CLAUDE.md / AGENTS.md also state that API/Host should be composition-only and should not own core business orchestration.
Problem
The endpoint currently owns business lifecycle sequencing and depends directly on actor runtime details. That makes the host layer responsible for command-side lifecycle semantics and rollback ordering, rather than delegating to an application command contract.
Desired direction
Introduce a focused application command surface for StreamingProxy room lifecycle, for example a room creation/preparation command port/service that owns:
actor creation
room initialization command/envelope construction
registry registration and admission-visible receipt handling
rollback semantics
The HTTP endpoint should remain responsible for caller-scope validation, request/response mapping, and delegating to that command surface.
Acceptance criteria
StreamingProxy room create endpoint no longer directly calls IActorRuntime.CreateAsync or constructs initialization envelopes
room lifecycle sequencing lives behind an application-layer command/service abstraction
rollback semantics remain ownership-first: unregister registry membership before destroying actor when cleanup is needed
endpoint tests continue to cover HTTP behavior, while application tests cover lifecycle orchestration
Context
PR #452 refines GAgent registry command/query/admission semantics for issue #348. During review, StreamingProxy room creation still has host/endpoint code directly orchestrating business lifecycle work.
StreamingProxyEndpoints.HandleCreateRoomAsynccurrently performs the full lifecycle from the HTTP surface:IActorRuntimeThe new registry ownership canon says HTTP endpoints should validate caller scope and delegate to an application command surface. CLAUDE.md / AGENTS.md also state that API/Host should be composition-only and should not own core business orchestration.
Problem
The endpoint currently owns business lifecycle sequencing and depends directly on actor runtime details. That makes the host layer responsible for command-side lifecycle semantics and rollback ordering, rather than delegating to an application command contract.
Desired direction
Introduce a focused application command surface for StreamingProxy room lifecycle, for example a room creation/preparation command port/service that owns:
The HTTP endpoint should remain responsible for caller-scope validation, request/response mapping, and delegating to that command surface.
Acceptance criteria
IActorRuntime.CreateAsyncor constructs initialization envelopes