-
Notifications
You must be signed in to change notification settings - Fork 152
Add deployment to SimulationRun create for AgentDispatch pinning - #1780
Add deployment to SimulationRun create for AgentDispatch pinning #1780rdysell wants to merge 1 commit into
Conversation
Empty/unset stays production, matching CreateAgentDispatchRequest. Cloud simulations targeting a shared agent name cannot select staging/dev until this field exists and is copied onto AgentDispatch. Fixes livekit#1778 Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: 4a663ee The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
rdysell
commented
Sep 8, 2026
CLI companion: livekit/livekit-cli#966
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 Approval recommended
The change is purely additive at the proto level with consistent regenerated outputs and no detected field-number conflicts or compatibility issues.
Pull request overview
This PR extends the Agent Simulation protocol to support deployment pinning when creating Cloud simulations against a live agent name, enabling safe use of shared agent names across production/staging/dev by propagating the target deployment through simulation run creation and related metadata.
Changes:
- Add
deploymenttoSimulationRun.Create.Request(request-time selection) andSimulationRun(persisted/returned targeting info). - Add
deploymenttoSimulationDispatch(room metadata payload) and regenerate Go protobuf + Twirp outputs. - Add a changeset bump for both the Go module and the JS package.
File summaries
| File | Description |
|---|---|
| protobufs/livekit_agent_simulation.proto | Adds deployment fields with documented semantics (empty/unset = production) across request, persisted run, and dispatch metadata. |
| livekit/livekit_agent_simulation.pb.go | Regenerated Go protobuf bindings reflecting the new fields and accessors. |
| livekit/livekit_agent_simulation.twirp.go | Regenerated Twirp descriptor output consistent with the updated proto. |
| .changeset/simulation-run-deployment.md | Declares patch releases for Go + JS packages and documents the new deployment fields. |
Review details
Files not reviewed (2)
- livekit/livekit_agent_simulation.pb.go: Generated file
- livekit/livekit_agent_simulation.twirp.go: Generated file
- Files reviewed: 2/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
CLA assistant check
All committers have signed the CLA.
CLAassistant
commented
Sep 8, 2026
CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
Rob Dysell seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
Summary
SimulationRun.Create.Requesthad nodeploymentfield, so Cloud simulations against a live agent (agent_name) could not pin a non-production worker. OmittedCreateAgentDispatchRequest.deploymentdefaults to production. Projects that share one Cloud agent name across production + staging + dev cannot run staging simulations safely until this field exists and the Cloud simulation service copies it onto AgentDispatch.Companion CLI: livekit/livekit-cli#965
Tracking: #1778
Docs: Non-production deployments — omit
--deployment/ empty string = production.Protocol change
SimulationRun.Create.Requeststring deployment = 14SimulationRunstring deployment = 23SimulationDispatchstring deployment = 5Empty/unset remains production, matching
CreateAgentDispatchRequest.deployment.Cloud backend (required for the pin)
A proto field the simulation service ignores is not a pin. Please copy
Create.Request.deploymentontoCreateAgentDispatchRequest.deployment(or equivalent job routing) so the simulated user waits in the same room the pinned worker joins. Rewriting--agent-nameplus a separatelk dispatch create --deploymentdoes not work: Cloud simulate waits for the original agent name in its own room.Codegen
Regenerated with
go tool mage protoand protoc 35.1 (same pin as.github/workflows/generate.yaml). JS gen left to the Generate workflow /pnpm --filter @livekit/protocol run generate:proto.Backwards compatibility
Purely additive. Existing callers that omit
deploymentkeep production dispatch.