Skip to content

fix: Event ordering#153

Merged
benbrandt merged 1 commit into
mainfrom
fix-ordering
May 18, 2026
Merged

fix: Event ordering#153
benbrandt merged 1 commit into
mainfrom
fix-ordering

Conversation

@benbrandt
Copy link
Copy Markdown
Member

Closes #143

TIL a lot about how events are queued due to "syntactic sugar" that has
more effects than I thought!

The change is able to get this test passing though!

Closes #143

TIL a lot about how events are queued due to "syntactic sugar" that has
more effects than I thought!

The change is able to get this test passing though!
@benbrandt
Copy link
Copy Markdown
Member Author

@anvilpete sorry for the delay here, but thanks for the detailed writeup, was able to use it as a driving test for the fix.

@benbrandt benbrandt merged commit 7b63226 into main May 18, 2026
6 checks passed
@benbrandt benbrandt deleted the fix-ordering branch May 18, 2026 21:06
@anvilpete
Copy link
Copy Markdown
Contributor

Many thanks for the fix, and all your work on this project!

That async/await behaviour was a surprise to me too, it's a shame that extra microtask hop is enough to break the event ordering. Hopefully the test is enough to prevent it from coming back in the future.

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.

ACP events processed out of order with multiple JSON-RPC messages in a chunk

2 participants