Two inline comments still described the hook payload as "buffered" after
e2cbc8a8a corrected the top docstring. Probing both delivery branches of
workflow/hook.ts shows every hook case in this file taking the
promises.length > 0 immediate path, so payloadsQueue.push never fires and no
payload is buffered. The direct-await control also gave the wrong reason for
staying green: its hook hydration slot being queued on the serial promiseQueue
ahead of the step_completed slot is equally true of the reproducing for-await
case, so it cannot be what separates them. The difference is consumer hop
count.
Also records what these five cases cannot detect. Every consumer here reaches
its next useStep in the fewest possible microtask hops, so they pass for a fix
that merely delays step resolution by a hop or two without ordering deliveries
at all -- a revision of the companion fix did exactly that, and diverged again
under a consumer padded with one extra await. Padded consumers are covered by
step-delivery-hop-count.test.ts on the fix branch.
Comments only; no assertions, test bodies, or expected-failure markers changed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
Getting Started
The Workflow SDK lets you easily add durability, reliability, and observability to async JavaScript. Build apps and AI agents that can suspend, resume, and maintain state with ease.
Visit https://workflow-sdk.dev to view the full documentation.
Community
The Workflow SDK community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects with other people.
Contributing
Contributions to Workflow SDK are welcome and highly appreciated. Please use GitHub issues and discussions to collaborate with the team and wider community.
Author list
Workflow SDK was built by engineers at Vercel and the Open Source Community.
The initial core contributing engineers are:
- Adrian Lam (@adriandlam)
- Dillon Mulroy (@dmmulroy)
- Gal Schlezinger (@Schniz)
- JJ Kasper (@ijjk)
- Nathan Rajlich (@TooTallNate)
- Peter Wielander (@VaguelySerious)
- Pranay Prakash (@pranaygp)
The Workflow SDK logo was designed by Cecilio Ruiz @ceciliorz
Security
If you believe you have found a security vulnerability in Workflow SDK, we encourage you to responsibly disclose this and not open a public issue.
To participate in our Open Source Software Bug Bounty program, please email responsible.disclosure@vercel.com. We will add you to the program and provide further instructions for submitting your report.