Skip to content

Fix run command executor race condition#10666

Merged
kevinyang372 merged 1 commit into
masterfrom
kevin/fix-runcommand-executor-race
May 11, 2026
Merged

Fix run command executor race condition#10666
kevinyang372 merged 1 commit into
masterfrom
kevin/fix-runcommand-executor-race

Conversation

@kevinyang372
Copy link
Copy Markdown
Member

@kevinyang372 kevinyang372 commented May 11, 2026

Description

We were calling initialize_bootstrapped_session (which downstream calls command executor before sending the notification to the server). This happens in the case when shell bootstrap happens before the server establishes connection

This ordering could cause problems because we have not sent the session bootstrapped notification to the server yet. Hence the following run command execution within initialize_bootstrapped_session will fail on the server with this sentry error: https://warpdotdev.sentry.io/issues/7468335682/events/ded45b2a39c64373900a13f84095a97f/

@cla-bot cla-bot Bot added the cla-signed label May 11, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 11, 2026

@kevinyang372

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR reorders legacy SSH remote-server bootstrapping so the daemon receives SessionBootstrapped before local session initialization emits subscriber events that can enqueue RunCommand requests. The changed ordering appears consistent with the remote-server client queueing model and I did not find a concrete security issue in the diff.

Concerns

  • Manual testing is required for changes that can be manually tested. This is a user-perceivable behavior fix, but the PR description leaves local manual testing unchecked and includes no screenshot, recording, or justification for why manual testing evidence is not possible.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@kevinyang372 kevinyang372 requested a review from MaggieShan May 11, 2026 21:50
Copy link
Copy Markdown
Contributor

@MaggieShan MaggieShan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@kevinyang372 kevinyang372 merged commit 91b4f09 into master May 11, 2026
37 of 38 checks passed
@kevinyang372 kevinyang372 deleted the kevin/fix-runcommand-executor-race branch May 11, 2026 22:08
cephalonaut pushed a commit that referenced this pull request May 12, 2026
## Description
We were calling `initialize_bootstrapped_session` (which downstream
calls command executor before sending the notification to the server).
This happens in the case when shell bootstrap happens before the server
establishes connection

This ordering could cause problems because we have not sent the session
bootstrapped notification to the server yet. Hence the following run
command execution within initialize_bootstrapped_session will fail on
the server with this sentry error:
https://warpdotdev.sentry.io/issues/7468335682/events/ded45b2a39c64373900a13f84095a97f/
dagmfactory pushed a commit that referenced this pull request May 12, 2026
## Description
We were calling `initialize_bootstrapped_session` (which downstream
calls command executor before sending the notification to the server).
This happens in the case when shell bootstrap happens before the server
establishes connection

This ordering could cause problems because we have not sent the session
bootstrapped notification to the server yet. Hence the following run
command execution within initialize_bootstrapped_session will fail on
the server with this sentry error:
https://warpdotdev.sentry.io/issues/7468335682/events/ded45b2a39c64373900a13f84095a97f/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants