Skip to content

call: Log LiveKit connection info refresh outcomes in retry loop - #59205

Merged
osiewicz merged 1 commit into
mainfrom
livekit-retry-observability
Jun 12, 2026
Merged

call: Log LiveKit connection info refresh outcomes in retry loop#59205
osiewicz merged 1 commit into
mainfrom
livekit-retry-observability

Conversation

@osiewicz

Copy link
Copy Markdown
Member

Follow-up to #59195. While verifying that fix against prod we hit a log that couldn't distinguish "retrying with a fresh token that is still revoked" from "silently retrying with the same dead token because the server returned no connection info" (e.g. a collab deploy predating #59195). Make the retry loop self-diagnosing:

  • Warn when RejoinRoomResponse carries no live_kit_connection_info, since the loop then reuses the existing token.
  • On refresh, log whether the token actually changed.

Release Notes:

  • N/A

🤖 Generated with Claude Code

Make the LiveKit reconnect retry loop self-diagnosing: log when the
server returns no fresh connection info (old collab deploys) and
whether a refreshed token actually differs from the one that failed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 12, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Jun 12, 2026
@osiewicz
osiewicz added this pull request to the merge queue Jun 12, 2026
Merged via the queue into main with commit abbe85a Jun 12, 2026
43 checks passed
@osiewicz
osiewicz deleted the livekit-retry-observability branch June 12, 2026 16:51
@zed-zippy zed-zippy Bot added the PR state:needs review Used to label PRs that are in need of a post-merge approval label Jun 16, 2026
@bennetbo

Copy link
Copy Markdown
Member

@zed-industries/approved

@zed-zippy zed-zippy Bot removed the PR state:needs review Used to label PRs that are in need of a post-merge approval label Jun 17, 2026
This was referenced Jun 18, 2026
@osiewicz osiewicz mentioned this pull request Jun 22, 2026
5 tasks
NsdHSO pushed a commit to NsdHSO/zed that referenced this pull request Jun 23, 2026
- **Revert "livekit: Preserve tokens on channel rejoin (zed-industries#59388)"**
- **Revert "call: Log LiveKit connection info refresh outcomes in retry
loop (zed-industries#59205)"**
- **Revert "audio: Fix phantom presence in channels (zed-industries#59195)"**
- **proto: Reserve RejoinRoomResponse field 4 after revert**

We've observed a spike of phantom collaborator issues after this fixes.
This sucks and I'm quite unhappy about it.

# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, use "Fixes #X" for each issue as
[described in the GitHub
docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).

## Solution

- Describe the solution used to achieve the objective above.

## Testing

- Did you test these changes? If so, how?
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

## Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

## Showcase

> This section is optional. If this PR does not include a visual change
or does not add a new user-facing feature, you can delete this section.

- Help others understand the result of this PR by showcasing your
awesome work!
- If this PR includes a visual change, consider adding a screenshot,
GIF, or video
- A before/after comparison is very useful for changes to existing
features!

While a showcase should aim to be brief and digestible, you can use a
toggleable section to save space on longer showcases:

<details>
  <summary>Click to view showcase</summary>

My super cool demos here

</details>

---

Release Notes:

- N/A

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
saranblock3 pushed a commit to saranblock3/zed that referenced this pull request Jun 23, 2026
- **Revert "livekit: Preserve tokens on channel rejoin (zed-industries#59388)"**
- **Revert "call: Log LiveKit connection info refresh outcomes in retry
loop (zed-industries#59205)"**
- **Revert "audio: Fix phantom presence in channels (zed-industries#59195)"**
- **proto: Reserve RejoinRoomResponse field 4 after revert**

We've observed a spike of phantom collaborator issues after this fixes.
This sucks and I'm quite unhappy about it.

# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, use "Fixes #X" for each issue as
[described in the GitHub
docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).

## Solution

- Describe the solution used to achieve the objective above.

## Testing

- Did you test these changes? If so, how?
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

## Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

## Showcase

> This section is optional. If this PR does not include a visual change
or does not add a new user-facing feature, you can delete this section.

- Help others understand the result of this PR by showcasing your
awesome work!
- If this PR includes a visual change, consider adding a screenshot,
GIF, or video
- A before/after comparison is very useful for changes to existing
features!

While a showcase should aim to be brief and digestible, you can use a
toggleable section to save space on longer showcases:

<details>
  <summary>Click to view showcase</summary>

My super cool demos here

</details>

---

Release Notes:

- N/A

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
weihuoya pushed a commit to weihuoya/zed that referenced this pull request Jun 25, 2026
- **Revert "livekit: Preserve tokens on channel rejoin (zed-industries#59388)"**
- **Revert "call: Log LiveKit connection info refresh outcomes in retry
loop (zed-industries#59205)"**
- **Revert "audio: Fix phantom presence in channels (zed-industries#59195)"**
- **proto: Reserve RejoinRoomResponse field 4 after revert**

We've observed a spike of phantom collaborator issues after this fixes.
This sucks and I'm quite unhappy about it.

# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, use "Fixes #X" for each issue as
[described in the GitHub
docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).

## Solution

- Describe the solution used to achieve the objective above.

## Testing

- Did you test these changes? If so, how?
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

## Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

## Showcase

> This section is optional. If this PR does not include a visual change
or does not add a new user-facing feature, you can delete this section.

- Help others understand the result of this PR by showcasing your
awesome work!
- If this PR includes a visual change, consider adding a screenshot,
GIF, or video
- A before/after comparison is very useful for changes to existing
features!

While a showcase should aim to be brief and digestible, you can use a
toggleable section to save space on longer showcases:

<details>
  <summary>Click to view showcase</summary>

My super cool demos here

</details>

---

Release Notes:

- N/A

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…-industries#59205)

Follow-up to zed-industries#59195. While verifying that fix against prod we hit a log
that couldn't distinguish "retrying with a fresh token that is still
revoked" from "silently retrying with the same dead token because the
server returned no connection info" (e.g. a collab deploy predating
zed-industries#59195). Make the retry loop self-diagnosing:

- Warn when `RejoinRoomResponse` carries no `live_kit_connection_info`,
since the loop then reuses the existing token.
- On refresh, log whether the token actually changed.

Release Notes:

- N/A

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
- **Revert "livekit: Preserve tokens on channel rejoin (zed-industries#59388)"**
- **Revert "call: Log LiveKit connection info refresh outcomes in retry
loop (zed-industries#59205)"**
- **Revert "audio: Fix phantom presence in channels (zed-industries#59195)"**
- **proto: Reserve RejoinRoomResponse field 4 after revert**

We've observed a spike of phantom collaborator issues after this fixes.
This sucks and I'm quite unhappy about it.

# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, use "Fixes #X" for each issue as
[described in the GitHub
docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).

## Solution

- Describe the solution used to achieve the objective above.

## Testing

- Did you test these changes? If so, how?
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

## Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

## Showcase

> This section is optional. If this PR does not include a visual change
or does not add a new user-facing feature, you can delete this section.

- Help others understand the result of this PR by showcasing your
awesome work!
- If this PR includes a visual change, consider adding a screenshot,
GIF, or video
- A before/after comparison is very useful for changes to existing
features!

While a showcase should aim to be brief and digestible, you can use a
toggleable section to save space on longer showcases:

<details>
  <summary>Click to view showcase</summary>

My super cool demos here

</details>

---

Release Notes:

- N/A

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants