Skip to content

feat(projects): Wait for project config#5642

Open
jjbayer wants to merge 7 commits intomasterfrom
feat/project-await
Open

feat(projects): Wait for project config#5642
jjbayer wants to merge 7 commits intomasterfrom
feat/project-await

Conversation

@jjbayer
Copy link
Member

@jjbayer jjbayer commented Feb 16, 2026

Add a way to await the resolution of a project (i.e. for it to become non-pending).

Needed for #5638.

///
/// Returns an empty [`Err`] if the project config cannot be resolved in the given time.
pub async fn ready_project(&self, timeout: Duration) -> Result<SharedProject, ()> {
tokio::time::timeout(timeout, self.ready_project_inner())
Copy link
Member Author

Choose a reason for hiding this comment

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

It might be slightly more elegant to put the timeout in the outermost function, but this way it is unit-testable.

@jjbayer jjbayer marked this pull request as ready for review February 17, 2026 11:37
@jjbayer jjbayer requested a review from a team as a code owner February 17, 2026 11:37
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Register the Notified future before checking the pending state to
prevent missed notifications from notify_waiters(). Also fixes a
snapshot inconsistency where to_shared_project() could load a
different state than the one checked.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant