Map CLI agents directly to stable telemetry strings - #16252
Merged
Merged
Conversation
Remove the duplicate CLIAgentType enum and use an exhaustive explicit CLIAgent telemetry_name mapping. Preserve every analytics value, optional field, notification JSON wrapper, and session-sharing representation. Co-Authored-By: Warp Agent <agent@warp.dev>
Contributor
Author
|
This PR was generated with Warp. Comment |
Keep the production mapping and existing tests unchanged; this behavior-preserving representation refactor does not add tests at the requester's direction. Co-Authored-By: Warp Agent <agent@warp.dev>
acarl005
approved these changes
Oct 2, 2026
acarl005
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Replace
CLIAgentTypewith an exhaustiveCLIAgent::telemetry_name()mapping so Rust variant names can change without changing analytics values.Keep
CLIAgentandOption<CLIAgent>throughout all telemetry events and emitters. Convert to static strings only in outbound payloads and field serializers, including notifications and code review. Preserve all 19 values, includingCursor, optional/null fields, and the nested notification keyc_l_i_agent. LeaveCLIAgentserde and session-sharing serialization unchanged. Notification telemetry is outbound-only and implementsSerialize, notDeserialize.Linked Issue
Approved request; no tracked issue or spec for this scoped refactor.
ready-to-specorready-to-implement. Not applicable; implementation was approved directly.Testing
cargo check -p warp --tests --locked— passed; existing test targets compile.cargo clippy -p warp --all-targets --tests --locked -- -D warnings— passed../script/formatandgit diff --check— passed.No new tests: this representation-only refactor preserves emitted behavior. No tests were executed in this validation pass. Checks ran on Linux; cross-platform/workspace CI remains unverified.
./script/run. Not applicable; no rendered behavior changed.Agent Mode
CHANGELOG-NONE