Skip to content

feat(api): use Redis PubSub for state transition#2099

Merged
jakubno merged 12 commits intomainfrom
feat/sandbox-state-pubsub
Mar 24, 2026
Merged

feat(api): use Redis PubSub for state transition#2099
jakubno merged 12 commits intomainfrom
feat/sandbox-state-pubsub

Conversation

@jakubno
Copy link
Member

@jakubno jakubno commented Mar 11, 2026

Improves the speed for transitions, prevents spamming redis with repeated polls, reduced the risk of blocking all connections by polling state change

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.

@jakubno jakubno assigned dobrac and unassigned sitole Mar 23, 2026
@jakubno jakubno marked this pull request as ready for review March 23, 2026 17:57
@jakubno jakubno force-pushed the feat/sandbox-state-pubsub branch from 9af4a6e to d9f2e19 Compare March 23, 2026 17:57
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9f2e199d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

cancel context.CancelFunc
}

func newSubscriptionManager(ctx context.Context, redisClient redis.UniversalClient) *subscriptionManager {
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of passing in a ctx and automatically subscribing, it's probably more comfortable to expose a Start and Stop functions. That makes closing these structs easier and safer.

@jakubno jakubno merged commit f4eaad3 into main Mar 24, 2026
35 checks passed
@jakubno jakubno deleted the feat/sandbox-state-pubsub branch March 24, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants