Fix OpenCode event session routing#2634
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review Changes event routing logic from session-specific subscription to global event stream with directory filtering. While the bug fix intent is clear and well-tested, runtime behavior changes to event processing warrant human review, especially given the 'wip' designation in the title. You can customize Macroscope's approvability policy. Learn more. |
8905c26 to
a4eb68f
Compare
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit a4eb68f. Configure here.
a4eb68f to
fb98a2a
Compare
Dismissing prior approval to re-evaluate fb98a2a
d1e2892 to
45b5d2c
Compare
45b5d2c to
58774a5
Compare
58774a5 to
fb8297c
Compare
Dismissing prior approval to re-evaluate fb8297c

Summary
Fixes #2633
Test plan
Note
Fix OpenCode session event routing to use
global.eventfiltered by directorystartEventPumpin OpenCodeAdapter.ts fromclient.event.subscribetoclient.global.event, which provides a single stream of all runtime events.context.directoryare forwarded tohandleSubscribedEvent.OpenCodeGlobalStreamEventandOpenCodeSubscribedEventfrom theglobal.eventsource.global.eventin OpenCodeAdapter.test.ts and throws on any call toevent.subscribeto enforce the new routing.payload(withtypeandproperties) are now silently dropped.Macroscope summarized fb8297c.