Skip to content

Clarify TargetActorId ownership for deferred channel LLM replies #394

@eanzhao

Description

@eanzhao

Context

Follow-up from PR #392.

ChannelConversationTurnRunner.BuildLlmReplyRequest still sets:

TargetActorId = ConversationGAgent.BuildActorId(activity.Conversation!.CanonicalKey)

PR #392 changed ConversationGAgent.HandleInboundActivityCoreAsync to clone the request and overwrite TargetActorId = Id before enqueue/persist. That is the correct behavior for scoped conversation actors because the actual actor id may include a :scope:<owner> suffix.

Problem

The runner-side assignment is now effectively a placeholder and can mislead future readers into thinking the canonical-key-only actor id is authoritative. In scoped deployments, using that value directly would route LlmReplyReadyEvent to a different unscoped actor.

Proposal

Either:

  • remove the runner-side TargetActorId assignment if the actor always owns final routing, or
  • leave it as an explicit placeholder with a short comment explaining that ConversationGAgent overwrites it with the live actor Id before dispatch.

Notes

Low priority cleanup; not blocking PR #392.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions